Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmarks oct 23 fix #37

Merged
merged 35 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
99247ae
Allow Simulation Tests to Run Independently (#2407)
atharva-2001 Sep 15, 2023
7312e0b
Pre-release 2023.09.17 (#2411)
tardis-bot Sep 17, 2023
a9be74f
upgrading env in 2022 (#2410)
wkerzendorf Sep 20, 2023
ff5a120
In gamma ray code : Changed times to np.geomspace (#2415)
Knights-Templars Sep 21, 2023
aea441c
rename RadialModel1D to SimulationState (#2417)
wkerzendorf Sep 26, 2023
f89e125
rename simulation_state2 (#2421)
wkerzendorf Oct 2, 2023
14084ae
Ignore tests in docstr coverage (#2424)
atharva-2001 Oct 4, 2023
255a45b
Disabled formal integral for continuum interaction (#2426)
AlexHls Oct 4, 2023
70fcf0b
add linelist exposure to atom data and reader, built on current (#2428)
jvshields Oct 4, 2023
5fffd73
Modified how setup input energy takes isotope name. Earlier it was ga…
Knights-Templars Oct 9, 2023
ecd011c
Added a function to calculate shell masses (#2434)
Knights-Templars Oct 9, 2023
d2b0306
Fix duplicate entries in continuum line list (#2443)
AlexHls Oct 13, 2023
50f3c03
Fix numba parallel issues (#2447)
AlexHls Oct 17, 2023
74afced
Change glob patterns in `setup.cfg` (#2441)
atharva-2001 Oct 18, 2023
1503684
restructure of geometry (#2422)
wkerzendorf Oct 19, 2023
d32f323
Add FAQ section to documentation (#2450)
AlexHls Oct 20, 2023
4b7d92f
Remove lock file creation from pre release workflow (#2432)
atharva-2001 Oct 20, 2023
cfce38d
Pre-release 2023.10.20 (#2452)
tardis-bot Oct 20, 2023
a16acb9
Add verbose assert to NLTE rate equation (#2457)
AlexHls Nov 1, 2023
33bea12
Fix bug in relativistic packet source (#2453)
chvogl Nov 1, 2023
1931b91
Enable nlte ionization as plasma component (#2458)
AlexHls Nov 1, 2023
dce9041
Update docstr-cov.yml to fix failing action (#2462)
andrewfullard Nov 2, 2023
98c19ee
NLTE Ionization solver polish (#2461)
AlexHls Nov 2, 2023
28c0126
Pre-release 2023.11.05 (#2466)
tardis-bot Nov 5, 2023
87e8f3a
Tests Plasma Using Syrupy (#2413)
atharva-2001 Nov 6, 2023
84cf2e6
Add astropy import guard (#2470)
AlexHls Nov 15, 2023
0599113
Reading in decay radiation data in atom data (#2471)
Knights-Templars Nov 20, 2023
8e0b349
Pre-release 2023.11.26 (#2477)
tardis-bot Nov 26, 2023
a7534c1
Update plasma configuration documentation (#2459)
AlexHls Nov 27, 2023
a3fb19f
Add ruff rules and docs (#2478)
AlexHls Nov 27, 2023
799e35b
Decay energy chain (#2448)
Knights-Templars Nov 27, 2023
6042974
Use Mamba instead of conda
atharva-2001 Oct 26, 2023
2499699
Run asv for last 5 commits
atharva-2001 Oct 26, 2023
e79e1b5
Add pull request trigger temporarily
atharva-2001 Nov 28, 2023
ee7e251
Reset
atharva-2001 Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- master

pull_request_target:
branches:
- '*'
- master

types:
- opened
- reopened
Expand Down Expand Up @@ -38,10 +40,10 @@ jobs:
- name: Checkout pull/${{ github.event.number }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.sha }}
fetch-depth: 0
if: github.event_name == 'pull_request_target'

- name: Restore Atom Data
uses: actions/cache/restore@v3
id: atom-data-restore
Expand All @@ -62,24 +64,34 @@ jobs:
with:
path: benchmarks/data/kurucz_cd23_chianti_H_He.h5
key: atom-data

- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: benchmark
init-shell: >-
bash
create-args: >-
python
asv
mamba

- name: Install asv
run: pip install asv==0.5.*
run: pip install asv

- name: Accept all asv questions
run: asv machine --yes

- name: Run benchmarks for last 5 commits if not PR
if: github.event_name != 'pull_request_target'
continue-on-error: true
run: |
git log -n 5 --pretty=format:"%H" >> tag_commits.txt
asv run HASHFILE:tag_commits.txt | tee asv-output.log
if grep -q failed asv-output.log; then
echo "Some benchmarks have failed!"
exit 1
fi

- name: Generate Graphs and HTML
if: github.event_name != 'pull_request_target'
run: asv publish
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docstr-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install interrogate
run: pip install interrogate==1.5.0 parse==1.19.0
run: pip install interrogate==1.5.0 parse==1.19.0 setuptools

- name: Get SHAs
run: |
Expand Down
40 changes: 5 additions & 35 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,6 @@ defaults:
shell: bash -l {0}

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
auto-activate-base: true
activate-environment: ""
use-mamba: true

- name: Install conda-lock
run: mamba install -c conda-forge conda-lock=1.0.5

- name: Generate lockfiles
run: |
conda-lock -f tardis_env3.yml -p linux-64 -p osx-64
conda lock render conda-lock.yml

- uses: actions/upload-artifact@v3
with:
name: lockfiles
path: |
conda-linux-64.lock
conda-osx-64.lock
conda-lock.yml

zenodo:
runs-on: ubuntu-latest
steps:
Expand All @@ -58,6 +28,9 @@ jobs:
env:
KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }}

- name: Download Lock File
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -80,7 +53,7 @@ jobs:
path: .zenodo.json

pull_request:
needs: [lock, zenodo]
needs: zenodo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -89,11 +62,8 @@ jobs:
with:
path: /tmp

- name: Copy files to repository
- name: Copy zenodo.json to repository
run: |
cp /tmp/lockfiles/conda-linux-64.lock .
cp /tmp/lockfiles/conda-osx-64.lock .
cp /tmp/lockfiles/conda-lock.yml .
cp /tmp/zenodo_json/.zenodo.json .

- name: Get current date
Expand Down
59 changes: 46 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

env:
CACHE_NUMBER: 0 # increase to reset cache manually
PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata
--cov=tardis --cov-report=xml --cov-report=html
PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-snapshot-data=${{ github.workspace }}/tardis-regressions
--cov=tardis --cov-report=xml --cov-report=html
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

concurrency:
Expand All @@ -32,20 +32,22 @@ jobs:
if: github.repository_owner == 'tardis-sn'
strategy:
matrix:
pip: [true, false]
label: [osx-64, linux-64]
include:
- label: osx-64
os: macos-latest
prefix: /Users/runner/miniconda3/envs/tardis

- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/tardis
- label: linux-64
os: ubuntu-latest
prefix: /usr/share/miniconda3/envs/tardis

- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/tardis

name: ${{ matrix.label }}
name: ${{ matrix.label }}-pip-${{ matrix.pip }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
if: matrix.pip == false

- name: Clone tardis-sn/tardis-refdata
uses: actions/checkout@v2
Expand Down Expand Up @@ -84,6 +86,12 @@ jobs:
with:
path: tardis-refdata/.git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('tardis-refdata/.lfs-assets-id') }}-v1

- name: Clone tardis-sn/tardis-regressions
uses: actions/checkout@v4
with:
repository: tardis-sn/tardis-regressions
path: tardis-regressions

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -93,6 +101,10 @@ jobs:
activate-environment: tardis
use-mamba: true

- name: Download Lock File
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-${{ matrix.label }}.lock
if: matrix.pip == true

- uses: actions/cache@v2
with:
path: ${{ matrix.prefix }}
Expand All @@ -102,12 +114,33 @@ jobs:
- name: Update environment
run: mamba update -n tardis --file conda-${{ matrix.label }}.lock
if: steps.cache-conda.outputs.cache-hit != 'true'

- name: Install package
run: pip install -e .

- name: Install package editable
run: |
pip install -e .
echo "TARDIS_PIP_PATH=tardis" >> $GITHUB_ENV
if: matrix.pip == false

- name: Install package git
run: pip install git+https://github.com/tardis-sn/tardis.git@${{ github.ref }}
if: matrix.pip == true

- name: Set pip path
if: matrix.pip == true
run: |
location_line=$(pip show tardis | grep -i -x "Location:.*")
directory_path=$(echo $location_line | awk -F " " '{print $2}')
echo "TARDIS_PIP_PATH=$directory_path" >> $GITHUB_ENV

- name: Set install path
if: matrix.pip == false
run: |
directory_path="."
echo "TARDIS_PIP_PATH=$directory_path" >> $GITHUB_ENV

- name: Run tests
run: pytest tardis ${{ env.PYTEST_FLAGS }}
working-directory: ${{ env.TARDIS_PIP_PATH }}

- name: Upload to Codecov
run: bash <(curl -s https://codecov.io/bash)
5 changes: 5 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Alexander Holas <alexander.holas@h-its.org>
Alexander Holas <alex.holas@gmx.de>
Alexander Holas <alexander.holas@h-its.org> AlexHls <70367168+AlexHls@users.noreply.github.com>
Alexander Holas <alexander.holas@h-its.org> AlexHls <alexander.holas@h-its.org>
Alexander Holas <70367168+AlexHls@users.noreply.github.com>

Alice Harpole <aliceharpole@gmail.com>
Alice Harpole <aliceharpole@gmail.com> Alice Harpole <harpolea@users.noreply.github.com>
Expand Down Expand Up @@ -41,6 +42,8 @@ Atharwa Kharkar <atharwa.kharkar19@vit.edu> atharwa_24 <atharwa.kharkar19@vit.ed

Atul Kumar <kr.atul.atk@gmail.com>

Anirban Dutta <anirbaniamdutta@gmail.com>

Barnabás Barna <bbarna@titan.physx.u-szeged.hu>

Caroline Sofiatti <c.sofiatti@gmail.com>
Expand Down Expand Up @@ -102,6 +105,8 @@ John Reichenbach <56849859+jreichenbach-msu@users.noreply.github.com>
Jordi Eguren <jordi.eguren.brown@gmail.com>
Jordi Eguren <jordi.eguren.brown@gmail.com> jordi5 <45364266+jordi5@users.noreply.github.com>

Josh Shields <shields.joshua.v@gmail.com>

Karan Desai <karandesai_96@live.com>
Karan Desai <karandesai_96@live.com> karandesai-96 <karandesai_96@live.com>

Expand Down
Loading
Loading