Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

- name: Set up pixi
uses: prefix-dev/[email protected]
with:
environments: dashboard

- name: Generate build directory
run: mkdir -p ${{ env.FANS_BUILD_DIR }}
Expand Down Expand Up @@ -88,7 +90,7 @@ jobs:
pixi install

- name: Run pytest checks on HDF5 output
run: pixi run test
run: pixi run pytest

- uses: actions/upload-artifact@v4
if: failure()
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_and_test_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:

- name: Set up pixi
uses: prefix-dev/[email protected]
with:
environments: dashboard

- name: Generate build directory
run: mkdir -p ${{ env.FANS_BUILD_DIR }}
Expand Down Expand Up @@ -92,7 +94,7 @@ jobs:
pixi install

- name: Run pytest checks on HDF5 output
run: pixi run test
run: pixi run pytest

- uses: actions/upload-artifact@v4
if: failure()
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/pixi_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and test pixi-build
# Builds FANS for macOS and Ubuntu and runs the tests.
on:
push:
branches:
- main
- develop
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
FANS_BUILD_DIR: build
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up pixi
uses: prefix-dev/[email protected]
with:
environments: default

- name: Run pytest checks on HDF5 output
run: pixi run test

- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }} PyTest logs
path: |
**/pytest*.xml
**/.pytest_cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Also, we recommend setting up a Python virtual environment for the [`FANS_Dashbo
curl -fsSL https://pixi.sh/install.sh | sh

# Create and activate the environment
pixi shell
pixi shell -e dashboard
```

We also provide a set of Docker images. For further information, please refer to the [Docker README](docker/README.md).
Expand Down
2,881 changes: 1,298 additions & 1,583 deletions pixi.lock

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[workspace]
channels = ["conda-forge"]
name = "FANS"
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
platforms = ["linux-64", "osx-64", "osx-arm64"]

[dependencies]
[feature.dashboard.dependencies]
python = ">=3.13.5,<3.14"
pytest = ">=8.4.1,<9"
pre-commit = ">=4.2.0,<5"
Expand All @@ -12,14 +12,21 @@ quaternion = ">=2024.0.8,<2025"
beartype = ">=0.21.0,<0.22"
ipykernel = ">=6.29.5,<7"


[pypi-dependencies]
[feature.dashboard.pypi-dependencies]
fans-dashboard = { path = "FANS_Dashboard", editable = true }
msutils = {git = "https://github.com/DataAnalyticsEngineering/MSUtils.git"}
pyrecest = {git = "https://github.com/FlorianPfaff/pyRecEst.git"}


[tasks]
test = "pytest -v -s"
[feature.dashboard.tasks]
pytest = "pytest -v -s"
precommit = "pre-commit run --all-files"
h52xdmf = { args = ["file"], cmd = "cd \"$INIT_CWD\" && python -m fans_dashboard.plotting.h52xdmf -t -v {{file}}" }

[tasks]
test = {depends-on = [
{ task = "pytest", environment = "dashboard" }, # Will be changed later with pixi-build
]}

[environments]
default = {features = ["dashboard"]}
dashboard = { features = ["dashboard"], no-default-feature = true }
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This will run all test cases and generate result files in `build/test/`.
After running the tests, the results are verified using pytest. We recommend running pytest via a pre-configured Pixi task,

```bash
pixi run test
pixi run pytest
```

Note: The validation tests expect result files to be in `build/test/` directory, so make sure to run the tests first.
Expand Down
Loading