Run Comparison Notebook #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Comparison Notebook | |
on: | |
workflow_dispatch: | |
inputs: | |
ref1_hash: | |
description: 'First commit hash to compare' | |
required: false | |
default: '' | |
ref2_hash: | |
description: 'Second commit hash to compare' | |
required: false | |
default: '' | |
custom_ref1_spectrum_path: | |
description: 'Custom path for first reference spectrum' | |
required: false | |
default: '' | |
custom_ref2_spectrum_path: | |
description: 'Custom path for second reference spectrum' | |
required: false | |
default: '' | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
run-notebook: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup TARDIS environment | |
uses: ./.github/actions/setup_env | |
- name: Run notebook | |
env: | |
REF1_HASH: ${{ github.event.inputs.ref1_hash }} | |
REF2_HASH: ${{ github.event.inputs.ref2_hash }} | |
CUSTOM_REF1_SPECTRUM_PATH: ${{ github.event.inputs.custom_ref1_spectrum_path }} | |
CUSTOM_REF2_SPECTRUM_PATH: ${{ github.event.inputs.custom_ref2_spectrum_path }} | |
run: | | |
jupyter nbconvert --to notebook --execute compare_regression_data.ipynb --output executed_notebook.ipynb | |
jupyter nbconvert --to html executed_notebook.ipynb --output comparison_report.html | |
- name: Upload notebook artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: comparison-results | |
path: | | |
executed_notebook.ipynb | |
comparison_report.html |