From 1077b448dd6c9397cfa5a3c2773ea4b8863f3016 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Mon, 26 Nov 2018 16:01:13 +0100 Subject: Report: versioning Change-Id: I890d52b4b5b87cd1b3952b3d4bb3cbbff069a9c7 Signed-off-by: Tibor Frank --- docs/report/index.html.template | 4 ++-- docs/report/index.pdf.template | 4 ++-- docs/report/introduction/report_history.rst | 10 +++++++++- resources/tools/presentation/conf.py | 6 +++--- resources/tools/presentation/generator_report.py | 20 +++++++++----------- resources/tools/presentation/pal.py | 8 ++++---- resources/tools/presentation/run_report.sh | 2 +- resources/tools/presentation/specification.yaml | 4 ++-- 8 files changed, 32 insertions(+), 26 deletions(-) diff --git a/docs/report/index.html.template b/docs/report/index.html.template index b28fcec515..35d0447bc6 100644 --- a/docs/report/index.html.template +++ b/docs/report/index.html.template @@ -1,5 +1,5 @@ -CSIT 18.10 -========== +CSIT 1810 +========= .. toctree:: :maxdepth: 2 diff --git a/docs/report/index.pdf.template b/docs/report/index.pdf.template index 40e6aa5145..dfb835432b 100644 --- a/docs/report/index.pdf.template +++ b/docs/report/index.pdf.template @@ -1,5 +1,5 @@ -CSIT 18.10 -========== +CSIT 1810 +========= .. toctree:: :numbered: diff --git a/docs/report/introduction/report_history.rst b/docs/report/introduction/report_history.rst index e3dee313db..47be05cbca 100644 --- a/docs/report/introduction/report_history.rst +++ b/docs/report/introduction/report_history.rst @@ -1,10 +1,13 @@ Document History ================ +The version of this document is expressed as: **CSIT-YYMM.WW** where YY is the +year, MM is the month and WW is the calendar week. + +---------+--------------------------------------------------------------------+ | Version | Change | +=========+====================================================================+ -| .w48 | 1. Added configurations for Denverton: | +| .48 | 1. Added configurations for Denverton: | | | | | | a. Packet throughput :ref:`vpp_perf_configurations_2n_dnv` | | | b. MRR :ref:`vpp_mrr_configurations_2n_dnv` | @@ -28,6 +31,11 @@ Document History | | f. Speedup Multi-Core - IPv6 Routing - | | | :ref:`speedup_graphs_ip6-2n-dnv-x553` | | | | +| | 4. Replaced old Denverton data with new data delivered on Nov-27. | +| | | +| | 5. Changed versioning of this document, see description on the top | +| | of this page. | +| | | +---------+--------------------------------------------------------------------+ | .w47 | 1. Added automated wrapping of long test names in graphs. | | | 2. Changed data and time format in the header. | diff --git a/resources/tools/presentation/conf.py b/resources/tools/presentation/conf.py index 8ba22b57ef..5a60833d59 100644 --- a/resources/tools/presentation/conf.py +++ b/resources/tools/presentation/conf.py @@ -45,7 +45,7 @@ source_suffix = ['.rst', '.md'] master_doc = 'index' # General information about the project. -project = u'FD.io CSIT-18.10.w48' +project = u'FD.io CSIT-1810.48' copyright = u'2018, FD.io' author = u'FD.io CSIT' @@ -70,7 +70,7 @@ rst_epilog = """ .. |virl-image-ubuntu| replace:: {csit_ubuntu_ver} .. |virl-image-centos| replace:: {csit_centos_ver} -.. _pdf version of this report: https://docs.fd.io/csit/{release}/report/_static/archive/csit_{release}_{report_version}.pdf +.. _pdf version of this report: https://docs.fd.io/csit/{release}/report/_static/archive/csit_{release}.{report_week}.pdf .. _tag documentation rst file: https://git.fd.io/csit/tree/docs/tag_documentation.rst?h={release} .. _TRex intallation: https://git.fd.io/csit/tree/resources/tools/trex/trex_installer.sh?h={release} .. _TRex driver: https://git.fd.io/csit/tree/resources/tools/trex/trex_stateless_profile.py?h={release} @@ -105,7 +105,7 @@ rst_epilog = """ .. _CSIT Testbed Setup: https://git.fd.io/csit/tree/resources/tools/testbed-setup/README.md?h={release} .. _K8s configuration files: https://github.com/FDio/csit/tree/{release}/resources/templates/kubernetes """.format(release='rls1810', - report_version='w48', + report_week='48', prev_release='rls1807', srelease='1810', csitrelease='18.10', diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py index a7b2d64af0..13ca75c1b9 100644 --- a/resources/tools/presentation/generator_report.py +++ b/resources/tools/presentation/generator_report.py @@ -105,15 +105,15 @@ PDF_BUILDER = 'sphinx-build -v -c . -a ' \ '{build_dir}' -def generate_report(release, spec, report_version): +def generate_report(release, spec, report_week): """Generate all formats and versions of the report. :param release: Release string of the product. :param spec: Specification read from the specification file. - :param report_version: Version of the report. + :param report_week: Calendar week when the report is published. :type release: str :type spec: Specification - :type report_version: str + :type report_week: str """ logging.info("Generating the report ...") @@ -124,7 +124,7 @@ def generate_report(release, spec, report_version): } for report_format, versions in spec.output["format"].items(): - report[report_format](release, spec, versions, report_version) + report[report_format](release, spec, versions, report_week) archive_input_data(spec) @@ -155,7 +155,6 @@ def generate_html_report(release, spec, versions, report_version): cmd = HTML_BUILDER.format( release=release, - report_version=report_version, date=datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC'), working_dir=working_dir, build_dir=spec.environment["paths"]["DIR[BUILD,HTML]"]) @@ -172,17 +171,17 @@ def generate_html_report(release, spec, versions, report_version): logging.info(" Done.") -def generate_pdf_report(release, spec, versions, report_version): +def generate_pdf_report(release, spec, versions, report_week): """Generate html format of the report. :param release: Release string of the product. :param spec: Specification read from the specification file. :param versions: List of versions to generate. Not implemented yet. - :param report_version: Version of the report. + :param report_week: Calendar week when the report is published. :type release: str :type spec: Specification :type versions: list - :type report_version: str + :type report_week: str """ logging.info(" Generating the pdf report, give me a few minutes, please " @@ -210,7 +209,6 @@ def generate_pdf_report(release, spec, versions, report_version): build_dir = spec.environment["paths"]["DIR[BUILD,LATEX]"] cmd = PDF_BUILDER.format( release=release, - report_version=report_version, date=datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC'), working_dir=working_dir, build_dir=build_dir) @@ -226,12 +224,12 @@ def generate_pdf_report(release, spec, versions, report_version): 'pdflatex -interaction nonstopmode csit.tex || true'. format(build_dir=build_dir), 'cd {build_dir} && ' - 'cp csit.pdf ../{archive_dir}/csit_{release}_{report_version}.pdf &&' + 'cp csit.pdf ../{archive_dir}/csit_{release}.{week}.pdf &&' 'cp csit.pdf ../{archive_dir}/csit_{release}.pdf'. format(build_dir=build_dir, archive_dir=archive_dir, release=release, - report_version=report_version) + week=report_week) ] for cmd in cmds: diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py index 72493cb0d3..5e419210aa 100644 --- a/resources/tools/presentation/pal.py +++ b/resources/tools/presentation/pal.py @@ -49,10 +49,10 @@ def parse_args(): default="master", type=str, help="Release string of the product.") - parser.add_argument("-v", "--version", - default="0.1", + parser.add_argument("-w", "--week", + default="1", type=str, - help="Version of the product.") + help="Calendar week when the report is published.") parser.add_argument("-l", "--logging", choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], @@ -108,7 +108,7 @@ def main(): generate_files(spec, data) if spec.output["output"] == "report": - generate_report(args.release, spec, args.version) + generate_report(args.release, spec, args.week) logging.info("Successfully finished.") elif spec.output["output"] == "CPTA": sys.stdout.write(generate_cpta(spec, data)) diff --git a/resources/tools/presentation/run_report.sh b/resources/tools/presentation/run_report.sh index 077d74b8d6..fbc06dacb3 100755 --- a/resources/tools/presentation/run_report.sh +++ b/resources/tools/presentation/run_report.sh @@ -38,7 +38,7 @@ export PYTHONPATH=`pwd` python pal.py \ --specification specification.yaml \ --release ${RELEASE} \ - --version "w48" \ + --week "48" \ --logging INFO \ --force diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index 96733d28ee..ea8cb5c777 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -75,8 +75,8 @@ urls: URL[JENKINS,CSIT]: "https://jenkins.fd.io/view/csit/job" URL[JENKINS,HC]: "https://jenkins.fd.io/view/hc2vpp/job" - # URL[VIRL,DNV]: "http://10.30.51.28/download/denverton/1810/robot-plugin.zip" - URL[VIRL,DNV]: "http://download.it/from/nexus" + URL[VIRL,DNV]: "http://10.30.51.28/download/denverton/1810/robot-plugin.zip" + # URL[VIRL,DNV]: "http://download.it/from/nexus" URL[NEXUS]: "https://docs.fd.io/csit" DIR[NEXUS]: "report/_static/archive" -- cgit 1.2.3-korg