From f9ad71af1a77c921526528311fabc8f0cd6de361 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 21:37:25 +0200 Subject: [PATCH 1/6] Rename reference-results-metadata.txt to .md --- changelog-entries/811.md | 2 +- tools/tests/README.md | 6 +++--- tools/tests/docker-compose.field_compare.template.yaml | 2 +- tools/tests/generate_reference_results.py | 4 ++-- ....txt.template => reference-results-metadata.md.template} | 0 5 files changed, 7 insertions(+), 7 deletions(-) rename tools/tests/{reference-results-metadata.txt.template => reference-results-metadata.md.template} (100%) diff --git a/changelog-entries/811.md b/changelog-entries/811.md index 8a8bfc6ae..3faffb362 100644 --- a/changelog-entries/811.md +++ b/changelog-entries/811.md @@ -1 +1 @@ -- Store each `reference-results-metadata.txt` inside the case directory of its reference results archive instead of sharing one metadata file between all archives of a tutorial. The SHA256 checksum of the outer archive is no longer included, because the metadata now lives inside that archive [#882](https://github.com/precice/tutorials/pull/882). +- Store each `reference-results-metadata.md` inside the case directory of its reference results archive instead of sharing one metadata file between all archives of a tutorial. The SHA256 checksum of the outer archive is no longer included, because the metadata now lives inside that archive [#882](https://github.com/precice/tutorials/pull/882). diff --git a/tools/tests/README.md b/tools/tests/README.md index f0e44adb8..a51921e4e 100644 --- a/tools/tests/README.md +++ b/tools/tests/README.md @@ -107,7 +107,7 @@ To reproduce the comparison locally, use the [same fieldcompare command](https:/ ```bash fieldcompare dir precice-exports/ reference-results-unpacked// \ --ignore-missing-reference-files \ - --exclude-files reference-results-metadata.txt \ + --exclude-files reference-results-metadata.md \ --ignore-unsupported-file-formats \ -rtol 3e-7 ``` @@ -177,7 +177,7 @@ The two options cannot be combined: defining any overrides to `reference_version The results will be added to a Git LFS, but you will need special push access: just use the aforementioned GitHub Actions workflow, instead. -Each generated reference archive contains a `reference-results-metadata.txt` file +Each generated reference archive contains a `reference-results-metadata.md` file inside its case directory. This file records the component versions and machine information used to generate that archive. @@ -289,7 +289,7 @@ Metadata and workflow/script files: - `docker-compose.template.yaml`: Describes how to prepare each test (Docker Compose service template) - `docker-compose.field_compare.template.yaml`: Describes how to compare results with fieldcompare (Docker Compose service template) - `components.yaml`: Declares the available components and their parameters/options - - `reference-results-metadata.txt.template`: Template for reporting the versions and machine used to generate each reference results archive + - `reference-results-metadata.md.template`: Template for reporting the versions and machine used to generate each reference results archive - `reference_versions.yaml`: List of arguments to use for generating the reference results - `tests.yaml`: Declares the available tests, grouped in test suites diff --git a/tools/tests/docker-compose.field_compare.template.yaml b/tools/tests/docker-compose.field_compare.template.yaml index 8a789b109..9b120d739 100644 --- a/tools/tests/docker-compose.field_compare.template.yaml +++ b/tools/tests/docker-compose.field_compare.template.yaml @@ -6,4 +6,4 @@ services: command: - /runs/{{ tutorial_folder }}/{{ precice_output_folder }} - /runs/{{ tutorial_folder }}/{{ reference_output_folder }} - - "-rtol {{ tolerance }} --ignore-missing-reference-files --exclude-files reference-results-metadata.txt --ignore-unsupported-file-formats --diff" + - "-rtol {{ tolerance }} --ignore-missing-reference-files --exclude-files reference-results-metadata.md --ignore-unsupported-file-formats --diff" diff --git a/tools/tests/generate_reference_results.py b/tools/tests/generate_reference_results.py index c2f3b4425..be40d5de8 100644 --- a/tools/tests/generate_reference_results.py +++ b/tools/tests/generate_reference_results.py @@ -33,7 +33,7 @@ def create_reference_tar_gz( shutil.rmtree(staging) shutil.copytree(exports_dir, exports_staging) try: - (exports_staging / "reference-results-metadata.txt").write_text(metadata) + (exports_staging / "reference-results-metadata.md").write_text(metadata) with tarfile.open(output_filename, "w:gz") as tar: tar.add(exports_staging, arcname=stem) if iterations_logs: @@ -89,7 +89,7 @@ def render_reference_results_info( } jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR)) - template = jinja_env.get_template("reference-results-metadata.txt.template") + template = jinja_env.get_template("reference-results-metadata.md.template") return template.render(render_dict) diff --git a/tools/tests/reference-results-metadata.txt.template b/tools/tests/reference-results-metadata.md.template similarity index 100% rename from tools/tests/reference-results-metadata.txt.template rename to tools/tests/reference-results-metadata.md.template From 847c4c2ff1ef3d4d3a9f0bc4850d2357dc23d923 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 21:40:22 +0200 Subject: [PATCH 2/6] Remove lscpu from the metadata --- tools/tests/generate_reference_results.py | 13 ++----------- tools/tests/reference-results-metadata.md.template | 4 ---- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/tests/generate_reference_results.py b/tools/tests/generate_reference_results.py index be40d5de8..d9fbe874f 100644 --- a/tools/tests/generate_reference_results.py +++ b/tools/tests/generate_reference_results.py @@ -59,33 +59,24 @@ def command_is_avail(command: str): return rc == 0 uname_info = "uname not available on the machine the systemtests were executed." - lscpu_info = "lscpu not available on the machine the systemtests were executed." if (command_is_avail("uname")): result = subprocess.run(["uname", "-a"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) if result.returncode == 0: uname_info = result.stdout - if (command_is_avail("lscpu") and command_is_avail("grep")): - result_lscpu = subprocess.run(["lscpu"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - result = subprocess.run(["grep", "-v", "Vulner"], input=result_lscpu.stdout, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - if result.returncode == 0: - lscpu_info = result.stdout - - return (uname_info, lscpu_info) + return uname_info def render_reference_results_info( archive_name: str, arguments_used: SystemtestArguments, time: str): - uname, lscpu = get_machine_informations() + uname = get_machine_informations() render_dict = { 'arguments': arguments_used.arguments, 'archive_name': archive_name, 'time': time, 'uname': uname, - 'lscpu': lscpu, } jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR)) diff --git a/tools/tests/reference-results-metadata.md.template b/tools/tests/reference-results-metadata.md.template index 2e196c865..3a1155176 100644 --- a/tools/tests/reference-results-metadata.md.template +++ b/tools/tests/reference-results-metadata.md.template @@ -27,7 +27,3 @@ the arguments and machine used to generate them. ### uname -a {{ uname }} - -### lscpu - -{{ lscpu }} \ No newline at end of file From 16c030af6ded211af371315ae86f4e1e05efd0e6 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 21:40:48 +0200 Subject: [PATCH 3/6] Rename get_machine_informations() to get_machine_information() --- tools/tests/generate_reference_results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/generate_reference_results.py b/tools/tests/generate_reference_results.py index d9fbe874f..f6574d9aa 100644 --- a/tools/tests/generate_reference_results.py +++ b/tools/tests/generate_reference_results.py @@ -50,7 +50,7 @@ def create_reference_tar_gz( shutil.rmtree(logs_staging, ignore_errors=True) -def get_machine_informations(): +def get_machine_information(): def command_is_avail(command: str): try: rc = subprocess.call(['which', command], stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -71,7 +71,7 @@ def render_reference_results_info( archive_name: str, arguments_used: SystemtestArguments, time: str): - uname = get_machine_informations() + uname = get_machine_information() render_dict = { 'arguments': arguments_used.arguments, 'archive_name': archive_name, From b33e19192bee45010c273e64fce3723c6ea3aebd Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 21:46:35 +0200 Subject: [PATCH 4/6] Simplify the template --- .../reference-results-metadata.md.template | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/tools/tests/reference-results-metadata.md.template b/tools/tests/reference-results-metadata.md.template index 3a1155176..16d9169b2 100644 --- a/tools/tests/reference-results-metadata.md.template +++ b/tools/tests/reference-results-metadata.md.template @@ -1,29 +1,17 @@ -# Reference Results +# Reference results -This file describes the reference results in `{{ archive_name }}` and includes -the arguments and machine used to generate them. +- Archive: `{{ archive_name }}` +- Generated at: {{ time }} +- Host: `{{ uname }}` -## Archive - -| name | generated at | -|------|--------------| -| {{ archive_name }} | {{ time }} | - -## Arguments used to generate the results +## System tests arguments used to generate the results | name | value | -|------|------| +| --- | --- | {% for name,value in arguments.items() -%} | {{ name }} | {{ value }} | {% endfor -%} - - -## Information about the machine - -### uname -a - -{{ uname }} From ec53aa4f54e2d37d6e657ffd61a29f23333de994 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 21:57:24 +0200 Subject: [PATCH 5/6] Adjust changelog entry --- changelog-entries/{811.md => 882.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename changelog-entries/{811.md => 882.md} (79%) diff --git a/changelog-entries/811.md b/changelog-entries/882.md similarity index 79% rename from changelog-entries/811.md rename to changelog-entries/882.md index 3faffb362..cf64c817f 100644 --- a/changelog-entries/811.md +++ b/changelog-entries/882.md @@ -1 +1 @@ -- Store each `reference-results-metadata.md` inside the case directory of its reference results archive instead of sharing one metadata file between all archives of a tutorial. The SHA256 checksum of the outer archive is no longer included, because the metadata now lives inside that archive [#882](https://github.com/precice/tutorials/pull/882). +- Store each `reference-results-metadata.md` inside the case directory of its reference results archive instead of sharing one metadata file between all archives of a tutorial. The SHA256 checksum of the outer archive is no longer included, because the metadata now lives inside that archive [#882](https://github.com/precice/tutorials/pull/882), [#894](https://github.com/precice/tutorials/pull/894). From 5c1bcd475d7c637cf2e3da8a1aeafea2af5e4903 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 9 Aug 2026 22:02:32 +0200 Subject: [PATCH 6/6] Add code formatting for all values --- tools/tests/reference-results-metadata.md.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/reference-results-metadata.md.template b/tools/tests/reference-results-metadata.md.template index 16d9169b2..bc88bd9f2 100644 --- a/tools/tests/reference-results-metadata.md.template +++ b/tools/tests/reference-results-metadata.md.template @@ -5,7 +5,7 @@ This file has been generated by the generate_reference_results.py script and sho # Reference results - Archive: `{{ archive_name }}` -- Generated at: {{ time }} +- Generated at: `{{ time }}` - Host: `{{ uname }}` ## System tests arguments used to generate the results @@ -13,5 +13,5 @@ This file has been generated by the generate_reference_results.py script and sho | name | value | | --- | --- | {% for name,value in arguments.items() -%} -| {{ name }} | {{ value }} | +| `{{ name }}` | `{{ value }}` | {% endfor -%}