[pre-commit.ci] pre-commit autoupdate #403
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: Perform test database build and verification | |
on: | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
TANGOS_TESTING_DB_BACKEND: [sqlite] | |
runs-on: ${{ matrix.os }} | |
env: | |
C: gcc-10 | |
CXX: g++-10 | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install GCC | |
shell: bash | |
run: | | |
sudo apt-get update -qq | |
sudo apt install gcc-10 g++-10 | |
- uses: actions/checkout@v4 | |
- name: Update python pip/setuptools/wheel | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
- name: Build and install tangos | |
run: | | |
pip install -e . | |
- name: Install latest pynbody | |
run: python -m pip install --pre pynbody | |
# Or: python -m pip install git+https://github.com/pynbody/pynbody.git | |
- name: Install latest yt | |
run: python -m pip install yt | |
- name: Build test database | |
working-directory: test_tutorial_build | |
run: export INTEGRATION_TESTING=1; bash build.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Tangos database | |
path: test_tutorial_build/data.db | |
- name: Verify database | |
working-directory: test_tutorial_build | |
run: | | |
wget https://zenodo.org/record/12192344/files/reference_database.db?download=1 -O reference_database.db -nv | |
tangos diff data.db reference_database.db --property-tolerance dm_density_profile 1e-2 0 --property-tolerance gas_map 1e-2 0 --property-tolerance gas_map_sideon 1e-2 0 --property-tolerance gas_map_faceon 1e-2 0 | |
# --property-tolerance dm_density_profile here is because if a single particle crosses between bins | |
# (which seems to happen due to differing library versions), the profile can change by this much | |
# | |
# Images also occasionally differ by one or two particles. To deal with this previously had: | |
# --ignore-value-of gas_map gas_map_faceon gas_map_sideon uvi_image uvi_image_sideon uvi_image_faceon |