Skip to content

Update makenucleardecayfile.py #151

Update makenucleardecayfile.py

Update makenucleardecayfile.py #151

Workflow file for this run

---
name: Test
on:
push:
merge_group:
schedule:
- cron: 0 13 * * 1
workflow_dispatch:
jobs:
lint:
name: Format, lint, and type check
runs-on: macos-15
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools mypy
python -m pip install -r requirements.txt
- name: Install artisatomic
run: |
python -m pip install -e .
- name: Lint with flake8
working-directory: artisatomic/
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with mypy
run: |
mypy --install-types --non-interactive
- name: Run Ruff
if: always()
uses: astral-sh/ruff-action@v2
with:
version: 0.8.1
args: check --exit-non-zero-on-fix --no-fix
- name: Run Ruff Format
if: always()
uses: astral-sh/ruff-action@v2
with:
version: 0.8.1
args: format --check
pytest:
runs-on: macos-15
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
- name: Install artisatomic
run: |
python -m pip install -e .
- name: Cache CMFGEN atomic data
uses: actions/cache@v4
id: cache-cmfgendata
with:
path: atomic-data-hillier/atomic_data_15nov16.tar.xz
key: atomic-data-hillier/atomic_data_15nov16.tar.xz
- name: Download/extract CMFGEN atomic data
working-directory: atomic-data-hillier/
run: source ./setup_cmfgen_data.sh
- name: Test with pytest
run: pytest
tests:
strategy:
matrix:
testname: [cmfgen, jplt]
fail-fast: false
runs-on: macos-15
timeout-minutes: 45
name: test ${{ matrix.testname }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
- name: Install artisatomic
run: |
python -m pip install -e .
- name: Cache CMFGEN atomic data
uses: actions/cache@v4
id: cache-cmfgendata
with:
path: atomic-data-hillier/atomic_data_15nov16.tar.xz
key: atomic-data-hillier/atomic_data_15nov16.tar.xz
- name: Download/extract CMFGEN atomic data
working-directory: atomic-data-hillier/
run: source ./setup_cmfgen_data.sh
- name: Cache JPLT atomic data
if: matrix.testname == 'jplt'
uses: actions/cache@v4
id: cache-jpltdata
with:
path: atomic-data-tanaka-jplt/data_v1.1/**
key: atomic-data-tanaka-jplt/data_v1.1
- name: Download/extract JPLT atomic data
if: matrix.testname == 'jplt'
working-directory: atomic-data-tanaka-jplt/
run: source ./setup_jplt_data.sh
- name: Generate artis atomic data files
run: |
cp tests/${{ matrix.testname }}/artisatomicionhandlers.json .
makeartisatomicfiles -output_folder tests/${{ matrix.testname }}/output
- name: Checksum output files
working-directory: tests/${{ matrix.testname }}/output
run: |
cat compositiondata.txt
cat *.json
md5sum *.txt
md5sum -c ../checksums.txt
- name: tar and zip output files
if: always()
run: |
tar -cvzf artis_files_${{ matrix.testname }}.tar.gz tests/${{ matrix.testname }}/output/*
- name: Upload output files
if: always()
uses: actions/upload-artifact@v4
with:
name: artis_files_${{ matrix.testname }}.tar.gz
path: artis_files_${{ matrix.testname }}.tar.gz