From 6547fefbe055e3825b7b437ac31124ff3acf38a4 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 17:32:58 +0530 Subject: [PATCH 01/14] Add regression data comparison workflow --- .github/workflows/compare-regdata.yml | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/compare-regdata.yml diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml new file mode 100644 index 00000000000..747cf3357a6 --- /dev/null +++ b/.github/workflows/compare-regdata.yml @@ -0,0 +1,113 @@ +# For more information about TARDIS pipelines, please refer to: +# +# https://tardis-sn.github.io/tardis/development/continuous_integration.html + +name: compare-regdata + +on: + push: + branches: + - master + pull_request: + branches: + - master + types: + - opened + - reopened + - synchronize + +env: + CACHE_NUMBER: 0 # increase to reset cache manually + PYTEST_FLAGS: --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --cov=tardis --cov-report=xml --cov-report=html --cov-append + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + +defaults: + run: + shell: bash -l {0} + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + test-cache: + uses: ./.github/workflows/lfs-cache.yml + with: + atom-data-sparse: false + regression-data-repo: tardis-sn/tardis-regression-data + allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'git-lfs-pull') }} + + tests: + name: ${{ matrix.continuum }} continuum ${{ matrix.os }} ${{ inputs.pip_git && 'pip tests enabled' || '' }} + if: github.repository_owner == 'tardis-sn' + needs: [test-cache] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + label: [osx-arm64, linux-64] + continuum: ['not', ''] + include: + - label: osx-arm64 + os: macos-latest + prefix: /Users/runner/miniconda3/envs/tardis + + - label: linux-64 + os: ubuntu-latest + prefix: /usr/share/miniconda3/envs/tardis + steps: + - uses: actions/checkout@v4 + + - name: Setup LFS + uses: ./.github/actions/setup_lfs + + - name: Setup environment + uses: ./.github/actions/setup_env + with: + os-label: ${{ matrix.label }} + + - name: Install package editable + if: ${{ !inputs.pip_git }} + run: | + pip install -e . --user + + - name: Install package git + if: ${{ inputs.pip_git }} + run: | + pip install git+https://github.com/tardis-sn/tardis.git@master + + - name: Install qgridnext + if: ${{ !inputs.pip_git }} + run: | + pip install qgridnext + + + - name: Regression Data Generation tests + run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" + + - name: Commit regression data + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add tardis + git commit -m "Update regression data for commit ${GITHUB_SHA}" + working-directory: ${{ github.workspace }}/tardis-regression-data + + - name: Update compare.py from fork + run: | + curl -s https://raw.githubusercontent.com/atharva-2001/tardis-regression-data/refs/heads/update_notebook/compare.py > compare.py + working-directory: ${{ github.workspace }}/tardis-regression-data + + - name: Run comparison notebook + run: | + jupyter nbconvert --execute compare_regression_data.ipynb \ + --to html \ + --output=compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html \ + working-directory: ${{ github.workspace }}/tardis-regression-data + + - name: Upload comparison notebook + uses: actions/upload-artifact@v4 + with: + name: compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html + include-hidden-files: true + path: ${{ github.workspace }}/tardis-regression-data/compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html From a9525ee051e614a6293df1d841041ba18b5aadd6 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 17:47:16 +0530 Subject: [PATCH 02/14] Push to repository to deploy --- .github/workflows/compare-regdata.yml | 62 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 747cf3357a6..711821d965e 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -8,7 +8,7 @@ on: push: branches: - master - pull_request: + pull_request_target: branches: - master types: @@ -35,7 +35,7 @@ jobs: with: atom-data-sparse: false regression-data-repo: tardis-sn/tardis-regression-data - allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'git-lfs-pull') }} + allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request_target.labels.*.name, 'git-lfs-pull') }} tests: name: ${{ matrix.continuum }} continuum ${{ matrix.os }} ${{ inputs.pip_git && 'pip tests enabled' || '' }} @@ -111,3 +111,61 @@ jobs: name: compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html include-hidden-files: true path: ${{ github.workspace }}/tardis-regression-data/compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html + + deploy-comparison: + needs: tests + if: github.event_name == 'pull_request_target' + runs-on: ubuntu-latest + env: + DEPLOY_BRANCH: main + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: comparison-artifacts + + - name: Set destination directory + run: | + if [[ $EVENT == pull_request_target ]]; then + echo "DEST_DIR=pull/$PR" >> $GITHUB_ENV + else + echo "DEST_DIR=commit/$GITHUB_SHA" >> $GITHUB_ENV + fi + env: + EVENT: ${{ github.event_name }} + PR: ${{ github.event.number }} + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + personal_token: ${{ secrets.BOT_TOKEN }} + publish_branch: ${{ env.DEPLOY_BRANCH }} + publish_dir: comparison-artifacts + destination_dir: ${{ env.DEST_DIR }} + external_repository: tardis-sn/reg-data-comp + user_name: "TARDIS Bot" + user_email: "tardis.sn.bot@gmail.com" + + - name: Find Comment + uses: peter-evans/find-comment@v1 + id: fc + with: + issue-number: ${{ github.event.number }} + body-includes: Regression data comparison results + + - name: Post comment + uses: peter-evans/create-or-update-comment@v2 + with: + token: ${{ secrets.BOT_TOKEN }} + issue-number: ${{ github.event.number }} + comment-id: ${{ steps.fc.outputs.comment-id }} + edit-mode: replace + body: | + ### Regression Data Comparison Results + + The comparison results have been generated and can be viewed here: + - [View comparison results](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}) + + You can also download the artifacts directly from the [Actions tab](${{ env.ARTIFACT_URL }}). + env: + ARTIFACT_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} From 1101a200d0397b94be4e264383aef31d36498c00 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 18:01:54 +0530 Subject: [PATCH 03/14] Test pull request --- .github/workflows/compare-regdata.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 711821d965e..32cd56a6f65 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -8,7 +8,7 @@ on: push: branches: - master - pull_request_target: + pull_request: branches: - master types: @@ -35,7 +35,7 @@ jobs: with: atom-data-sparse: false regression-data-repo: tardis-sn/tardis-regression-data - allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request_target.labels.*.name, 'git-lfs-pull') }} + allow_lfs_pull: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'git-lfs-pull') }} tests: name: ${{ matrix.continuum }} continuum ${{ matrix.os }} ${{ inputs.pip_git && 'pip tests enabled' || '' }} @@ -114,7 +114,7 @@ jobs: deploy-comparison: needs: tests - if: github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' runs-on: ubuntu-latest env: DEPLOY_BRANCH: main @@ -126,7 +126,7 @@ jobs: - name: Set destination directory run: | - if [[ $EVENT == pull_request_target ]]; then + if [[ $EVENT == pull_request ]]; then echo "DEST_DIR=pull/$PR" >> $GITHUB_ENV else echo "DEST_DIR=commit/$GITHUB_SHA" >> $GITHUB_ENV From dd94ab01770743c0250a0a500739c3b257080f59 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 19:25:01 +0530 Subject: [PATCH 04/14] Test using plasma tests --- .github/workflows/compare-regdata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 32cd56a6f65..1eb1672bb2f 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -83,7 +83,7 @@ jobs: - name: Regression Data Generation tests - run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" + run: pytest tardis/plasma/tests ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" - name: Commit regression data run: | From 6ffe9d9a7d7e8793348facd1d9b3719e7702b9eb Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 19:33:07 +0530 Subject: [PATCH 05/14] Test using plasma tests --- .github/workflows/compare-regdata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 1eb1672bb2f..44db84c2238 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -83,7 +83,7 @@ jobs: - name: Regression Data Generation tests - run: pytest tardis/plasma/tests ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" + run: pytest tardis/plasma/tests/test_complete_plasmas.py tardis/transport/montecarlo/tests/test_continuum.py ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" - name: Commit regression data run: | From 5ece77b6f6a62bf46d25ec637945fb9f0d9d90b8 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 19:49:10 +0530 Subject: [PATCH 06/14] Comments --- .github/workflows/compare-regdata.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 44db84c2238..ba9dbd6b802 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -164,7 +164,11 @@ jobs: ### Regression Data Comparison Results The comparison results have been generated and can be viewed here: - - [View comparison results](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}) + + - [macOS (not continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/compare_regression_data_${{ github.sha }}_not_macos-latest.html) + - [macOS (continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/compare_regression_data_${{ github.sha }}__macos-latest.html) + - [Ubuntu (not continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html) + - [Ubuntu (continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/compare_regression_data_${{ github.sha }}__ubuntu-latest.html) You can also download the artifacts directly from the [Actions tab](${{ env.ARTIFACT_URL }}). env: From d7a096d5e9a8ff6bca035d96eb14179478a15ab4 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 20:04:59 +0530 Subject: [PATCH 07/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index ba9dbd6b802..983ffc042fd 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -97,6 +97,10 @@ jobs: run: | curl -s https://raw.githubusercontent.com/atharva-2001/tardis-regression-data/refs/heads/update_notebook/compare.py > compare.py working-directory: ${{ github.workspace }}/tardis-regression-data + + - name: Add environment variable to save plots + run: | + echo "SAVE_COMP_IMG=1" >> $GITHUB_ENV - name: Run comparison notebook run: | @@ -110,7 +114,10 @@ jobs: with: name: compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html include-hidden-files: true - path: ${{ github.workspace }}/tardis-regression-data/compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html + path: | + ${{ github.workspace }}/tardis-regression-data/compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html + ${{ github.workspace }}/tardis-regression-data/comparison_plots* + deploy-comparison: needs: tests @@ -151,7 +158,7 @@ jobs: id: fc with: issue-number: ${{ github.event.number }} - body-includes: Regression data comparison results + body-includes: Regression Data Comparison Results - name: Post comment uses: peter-evans/create-or-update-comment@v2 @@ -170,6 +177,20 @@ jobs: - [Ubuntu (not continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html) - [Ubuntu (continuum)](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/compare_regression_data_${{ github.sha }}__ubuntu-latest.html) +
+ 📊 View Comparison Plots + + ### Spectrum Comparison + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/spectrum.png) + + ### Same Name Differences + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/same_name_diff.png) + + ### Key Differences + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/diff_keys.png) + +
+ You can also download the artifacts directly from the [Actions tab](${{ env.ARTIFACT_URL }}). env: ARTIFACT_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} From f2ca74bffcfe96ee49c7f26014029ed915ec96ed Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 20:10:07 +0530 Subject: [PATCH 08/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 983ffc042fd..67ccccf5961 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -101,6 +101,10 @@ jobs: - name: Add environment variable to save plots run: | echo "SAVE_COMP_IMG=1" >> $GITHUB_ENV + + - name: Install Kaleido + run: | + pip install kaleido - name: Run comparison notebook run: | From b0302a39850f657bdc840a3670886afd6e9e7110 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 20:24:13 +0530 Subject: [PATCH 09/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 67ccccf5961..7e75fdba50d 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -184,14 +184,25 @@ jobs:
📊 View Comparison Plots - ### Spectrum Comparison - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/spectrum.png) + ### macOS (not continuum) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/diff_keys.png) - ### Same Name Differences - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/same_name_diff.png) + ### macOS (continuum) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/diff_keys.png) - ### Key Differences - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/comparison_plots/diff_keys.png) + ### Ubuntu (not continuum) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/diff_keys.png) + + ### Ubuntu (continuum) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/diff_keys.png)
From ad3ddf16bf46a52b9eedede26a3ccc070167ae50 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 20:42:10 +0530 Subject: [PATCH 10/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 38 ++++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 7e75fdba50d..6c68bead5c1 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -121,7 +121,7 @@ jobs: path: | ${{ github.workspace }}/tardis-regression-data/compare_regression_data_${{ github.sha }}_${{ matrix.continuum }}_${{ matrix.os }}.html ${{ github.workspace }}/tardis-regression-data/comparison_plots* - + deploy-comparison: needs: tests @@ -135,6 +135,18 @@ jobs: with: path: comparison-artifacts + - name: Get comparison plots paths + id: get_paths + run: | + for os in "macos-latest" "ubuntu-latest"; do + for cont in "" "not_"; do + dir=$(find comparison-artifacts -type d -name "comparison_plots*" -path "*${cont}${os}*" | head -n1) + if [ -n "$dir" ]; then + echo "${cont}${os}_path=${dir}" >> $GITHUB_OUTPUT + fi + done + done + - name: Set destination directory run: | if [[ $EVENT == pull_request ]]; then @@ -185,24 +197,24 @@ jobs: 📊 View Comparison Plots ### macOS (not continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_macos-latest.html/comparison_plots*/diff_keys.png) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/diff_keys.png) ### macOS (continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__macos-latest.html/comparison_plots*/diff_keys.png) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/diff_keys.png) ### Ubuntu (not continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}_not_ubuntu-latest.html/comparison_plots*/diff_keys.png) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/diff_keys.png) ### Ubuntu (continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/compare_regression_data_${{ github.sha }}__ubuntu-latest.html/comparison_plots*/diff_keys.png) + ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/spectrum.png) + ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/same_name_diff.png) + ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/diff_keys.png) From 61e49377f3ee5654bb7810e94013f00b492a760e Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 21:00:30 +0530 Subject: [PATCH 11/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 6c68bead5c1..17fdd600f2a 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -197,24 +197,24 @@ jobs: 📊 View Comparison Plots ### macOS (not continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/spectrum.png) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/same_name_diff.png) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/diff_keys.png) ### macOS (continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/spectrum.png) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/same_name_diff.png) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/diff_keys.png) ### Ubuntu (not continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/spectrum.png) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/same_name_diff.png) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/diff_keys.png) ### Ubuntu (continuum) - ![Spectrum Comparison](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/spectrum.png) - ![Same Name Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/same_name_diff.png) - ![Key Differences](https://tardis-sn.github.io/reg-data-comp/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/spectrum.png) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/same_name_diff.png) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/diff_keys.png) From 24f43054d4ada73ce0a738ee4f1683e59436eaab Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 21:13:27 +0530 Subject: [PATCH 12/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 17fdd600f2a..ae4da930061 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -142,7 +142,8 @@ jobs: for cont in "" "not_"; do dir=$(find comparison-artifacts -type d -name "comparison_plots*" -path "*${cont}${os}*" | head -n1) if [ -n "$dir" ]; then - echo "${cont}${os}_path=${dir}" >> $GITHUB_OUTPUT + clean_dir=$(echo $dir | sed 's|^comparison-artifacts/||') + echo "${cont}${os}_path=${clean_dir}" >> $GITHUB_OUTPUT fi done done From a21a41705327962fe7bbade8282837587ee2e802 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 21:24:39 +0530 Subject: [PATCH 13/14] Plot visualisation --- .github/workflows/compare-regdata.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index ae4da930061..1a327d0267b 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -198,24 +198,24 @@ jobs: 📊 View Comparison Plots ### macOS (not continuum) - ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/spectrum.png) - ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/same_name_diff.png) - ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/spectrum.png?raw=true) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/same_name_diff.png?raw=true) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_macos-latest_path }}/diff_keys.png?raw=true) ### macOS (continuum) - ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/spectrum.png) - ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/same_name_diff.png) - ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/spectrum.png?raw=true) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/same_name_diff.png?raw=true) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.macos-latest_path }}/diff_keys.png?raw=true) ### Ubuntu (not continuum) - ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/spectrum.png) - ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/same_name_diff.png) - ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/spectrum.png?raw=true) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/same_name_diff.png?raw=true) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.not_ubuntu-latest_path }}/diff_keys.png?raw=true) ### Ubuntu (continuum) - ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/spectrum.png) - ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/same_name_diff.png) - ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/diff_keys.png) + ![Spectrum Comparison](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/spectrum.png?raw=true) + ![Same Name Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/same_name_diff.png?raw=true) + ![Key Differences](https://github.com/tardis-sn/reg-data-comp/blob/main/pull/${{ github.event.number }}/${{ steps.get_paths.outputs.ubuntu-latest_path }}/diff_keys.png?raw=true) From 929f02d64eabbd5aa7d7453235b4a12dfa161633 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Mon, 24 Feb 2025 21:49:11 +0530 Subject: [PATCH 14/14] All tests --- .github/workflows/compare-regdata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compare-regdata.yml b/.github/workflows/compare-regdata.yml index 1a327d0267b..44069dd7eec 100644 --- a/.github/workflows/compare-regdata.yml +++ b/.github/workflows/compare-regdata.yml @@ -83,7 +83,7 @@ jobs: - name: Regression Data Generation tests - run: pytest tardis/plasma/tests/test_complete_plasmas.py tardis/transport/montecarlo/tests/test_continuum.py ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" + run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum" - name: Commit regression data run: |