Skip to content

Commit

Permalink
move report to auto-installer
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Sep 19, 2024
1 parent 9b2afc9 commit 862771a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 70 deletions.
87 changes: 17 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ jobs:
run: |
tail -n +1 data/example/logs_metacal/*
- name: Create output report
if: ${{ always() }}
run: |
python bin/make_output_report.py data/example/outputs_metacal metacal-report.md
pandoc metacal-report.md -o metacal-report.pdf
- name: Upload output report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: metacal-report
path: metacal-report.pdf

Metadetect_Pipeline:
runs-on: ubuntu-latest
needs: Download_Data
Expand Down Expand Up @@ -154,21 +141,7 @@ jobs:
- name: Show logs
if: ${{ always() }}
run: |
tail -n +1 data/example/logs_metadetect/*
- name: Create output report
if: ${{ always() }}
run: |
python bin/make_output_report.py data/example/outputs_metadetect metadetect-report.md
pandoc metadetect-report.md -o metadetect-report.pdf
- name: Upload output report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: metadetect-report
path: metadetect-report.pdf

tail -n +1 data/example/logs_metadetect/*
Metadetect_Source_Only_Pipeline:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -207,19 +180,6 @@ jobs:
run: |
tail -n +1 data/example/metadetect_source_only/*
- name: Create output report
if: ${{ always() }}
run: |
python bin/make_output_report.py data/example/outputs_metadetect_source_only metadetect-source-only-report.md
pandoc metadetect-source-only-report.md -o metadetect-source-only-report.pdf
- name: Upload output report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: metadetect-source-only-report
path: metadetect-source-only-report.pdf

Lensfit_Pipeline:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -259,19 +219,6 @@ jobs:
run: |
tail -n +1 data/example/logs_lensfit/*
- name: Create output report
if: ${{ always() }}
run: |
python bin/make_output_report.py data/example/outputs_lensfit lensfit-report.md
pandoc lensfit-report.md -o lensfit-report.pdf
- name: Upload output report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: lensfit-only-report
path: lensfit-report.pdf

Redmagic_Pipeline:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -309,21 +256,7 @@ jobs:
- name: Show logs
if: ${{ always() }}
run: |
tail -n +1 data/example/logs_redmagic/*
- name: Create output report
if: ${{ always() }}
run: |
python bin/make_output_report.py data/example/outputs_redmagic redmagic-report.md
pandoc redmagic-report.md -o redmagic-report.pdf
- name: Upload output report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: redmagic-report
path: redmagic-report.pdf

tail -n +1 data/example/logs_redmagic/*
Other_Pipeline_Dry_Runs:
Expand Down Expand Up @@ -356,7 +289,7 @@ jobs:
- os: ubuntu-latest
INSTALL_DEPS: sudo apt-get update && sudo apt-get -y install wget
- os: macos-14
INSTALL_DEPS: brew update-reset && brew install wget
INSTALL_DEPS: brew update-reset && brew install wget && brew install --cask mactex-no-gui
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -388,6 +321,20 @@ jobs:
source ./conda/bin/activate
ceci examples/metadetect/pipeline.yml
- name: Create output report
if: $${{ matrix.os == 'macos-14' }}
run: |
python bin/make_output_report.py data/example/outputs_metadetect metadetect-report.md
pandoc metadetect-report.md -o metadetect-report.pdf
- name: Upload output report
if: $${{ matrix.os == 'macos-14' }}
uses: actions/upload-artifact@v4
with:
name: metadetect-report
path: metadetect-report.pdf


- name: Show logs
if: ${{ always() }}
run: |
Expand Down
4 changes: 4 additions & 0 deletions bin/make_output_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def main(input_directory, output_file):
unused_files = []
with open(output_file, "w") as out:

if not os.path.exists(input_directory) or not os.path.listdir(input_directory):
out.write("# No report generated\n\n")
out.write("No input directory, or directory is empty.")

for filename in os.listdir(input_directory):
if filename.startswith("inprogress"):
continue
Expand Down

0 comments on commit 862771a

Please sign in to comment.