Skip to content

Commit

Permalink
Tests Plasma Using Syrupy (#2413)
Browse files Browse the repository at this point in the history
* Add syrupy classes to conftest

* Add syrupy to env file

* Another folder for syrupy data

* Save as npy instead of txt

* Use syrupy fixtures

* Different assertion functions for pandas dataframes and series

* Zeta data fix

* Blackify

* Blackify conftest

* test_hdf_plasmas using syrupy

* Install syrupy with conda

* Remove additional line adding syrupy as a plugin

* Set update snapshots config option when generate reference is selected

* Remove old refdata code from test plasmas complete

* Create plasma conftest file

* Text based snapshot fixture with custom location

* Snapshot path

* tardis regressions my fork

* Refactor test_hdf_plasmas.py

* Format using black

* test nlte excitation using syrupy

* nlte solver

* plasma continuum

* test tardis model density config

* Lock files

* Increase cache no

* format using black

* cleanup- sort dependencies, delete comments

* Documentation to run these tests

* remove commented out fixtures which are not used anywhere

* docs code render fix

* tests final cleanup

* renaming files, yet to deal with ambr snapshot extension and curly brackets

* renaming snapshots

* Add comments
  • Loading branch information
atharva-2001 authored Nov 6, 2023
1 parent 28c0126 commit 87e8f3a
Show file tree
Hide file tree
Showing 16 changed files with 819 additions and 647 deletions.
10 changes: 8 additions & 2 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 Down Expand Up @@ -86,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 Down
102 changes: 52 additions & 50 deletions conda-linux-64.lock

Large diffs are not rendered by default.

Loading

0 comments on commit 87e8f3a

Please sign in to comment.