Skip to content
Draft
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a8e8a11
build: split conda environment file into denpendency groups
sbrandstaeter Mar 9, 2026
cd36ad1
build: add tf-keras dependency explicitly and limit setuptools versio…
sbrandstaeter Mar 18, 2026
1ec8567
fix: np.linalg imports
sbrandstaeter Mar 18, 2026
b8bea84
build: change to conda driven dependency management
sbrandstaeter Apr 13, 2026
1e2a5a4
build: activate base to find conda-lock
sbrandstaeter Apr 13, 2026
662be96
ci: clean conda cache
sbrandstaeter Apr 13, 2026
5cb6568
ci: use mamba for conda-lock
sbrandstaeter Apr 13, 2026
d4438e6
ci: bump actions/checkout to v5
sbrandstaeter Apr 13, 2026
dbca697
ci: use miniforge
sbrandstaeter Apr 13, 2026
0927397
refactor: blackify code with new black version
sbrandstaeter Apr 13, 2026
201f406
test: update .pylintrc to latest pylint version
sbrandstaeter Apr 13, 2026
9db683b
build: add particles name to pypi dependency
sbrandstaeter Apr 15, 2026
fc6e258
build: fix import errors arviz 1.0.0 by bumping pymc version
sbrandstaeter Apr 15, 2026
3627fc6
build: adapt pydoe name to non-camelcase
sbrandstaeter Apr 15, 2026
1d3fe09
build: introduce base enviroment to pyproject.toml with pixi
sbrandstaeter Apr 14, 2026
c2231c6
build: introduce pixi features
sbrandstaeter Apr 14, 2026
719d289
build: remove pixi feature queens and cleanup
sbrandstaeter Apr 14, 2026
5d544bb
build: add current pip-tools mininum versions
sbrandstaeter Apr 15, 2026
bca3359
build: bump versions to current conda-lock versions
sbrandstaeter Apr 15, 2026
c35ca17
build: add explicit dependency of contourpy
sbrandstaeter Apr 15, 2026
c15ae22
build: first working setup with uv venv
sbrandstaeter Apr 15, 2026
0bd1440
build: update pypi dependencies based on latest conda-lock
sbrandstaeter Apr 15, 2026
ad05dfe
build: remove contourpy as explicit dependency
sbrandstaeter Apr 15, 2026
b3f256e
build: make dev group uv installable
sbrandstaeter Apr 15, 2026
3ac1102
build: add license information to metadata
sbrandstaeter Apr 17, 2026
3a2c7c1
build: cleanup pixi workspace
sbrandstaeter Apr 17, 2026
5ffa9df
build: prepare switch from liccheck to pip-licenses
sbrandstaeter Apr 17, 2026
baeb0b4
build: add pixi.lock
sbrandstaeter Apr 17, 2026
3223050
ci: switch github ci to pixi
sbrandstaeter Apr 17, 2026
68f5641
build: add editable install of QUEENS to pixi default feature/ enviro…
sbrandstaeter Apr 17, 2026
97e80b4
ci: pixi list is called after install anyway
sbrandstaeter Apr 17, 2026
df13f3e
build: fix black python version warning
sbrandstaeter Apr 17, 2026
8cf1b5d
ci: ensure that pipline fails if one code check fails
sbrandstaeter Apr 17, 2026
3b4b8d2
ci: deactivate caching
sbrandstaeter Apr 17, 2026
2ca19cd
ci: skip .pixi path for nbstripout
sbrandstaeter Apr 17, 2026
abf5121
build: add license exception for torch
sbrandstaeter Apr 17, 2026
d2d5b68
feat: rework remote env build and remote tests with using pixi
sbrandstaeter Apr 17, 2026
e436d4f
build: add license exception for PySide6
sbrandstaeter Apr 17, 2026
36c95fe
feat: format warning
sbrandstaeter Apr 17, 2026
62d8bef
feat: fix checking pixi availability
sbrandstaeter Apr 17, 2026
1165f38
feat: fix checking pixi availabnility without warning
sbrandstaeter Apr 17, 2026
4b88697
build: add license exception for shiboken6
sbrandstaeter Apr 17, 2026
ab985db
feat: check integrity of dependencies in pyproject
sbrandstaeter Apr 18, 2026
7f02edb
build: make pyproject dependencies consistent
sbrandstaeter Apr 18, 2026
6151615
ci: add dependency integrity checks to ci pipeline
sbrandstaeter Apr 18, 2026
066fee3
ci: use cache only on main
sbrandstaeter Apr 18, 2026
3fc045a
ci: improve logs of pixi integrity checks
sbrandstaeter Apr 19, 2026
80137ed
ci: make sure that pixi.lock not already changed
sbrandstaeter Apr 19, 2026
9ba2b2e
ci: fix pixi lock
sbrandstaeter Apr 19, 2026
795e7ee
ci: allow pixi lock to fail
sbrandstaeter Apr 19, 2026
6444223
ci: remove authentication to prefix dev
sbrandstaeter Apr 19, 2026
e935aaa
ci: reactivate cache and deactivate auth
sbrandstaeter Apr 19, 2026
c9f4cc4
fix: mypy errors
leahaeusel Apr 20, 2026
d4ceb11
ci: bump version of skywalking eyes (license header checks) up to 0.8.0
sbrandstaeter Apr 20, 2026
c336845
fix: np.trapz renamed to np.trapezoid in numpy > 2.0
sbrandstaeter Apr 22, 2026
ded2a78
build: fix pypi overwrite of tensorflow-probability
sbrandstaeter Apr 23, 2026
4084474
build: manually install queens package in environments
sbrandstaeter Apr 24, 2026
1176983
build: deactivate default feature for all environments
sbrandstaeter Apr 24, 2026
5db23c0
build: fix environment in documentation build workflow
sbrandstaeter Apr 24, 2026
1c2c1e3
docs: fix documentation build warnings
sbrandstaeter Apr 24, 2026
20417ac
fix: type hinting
sbrandstaeter Apr 24, 2026
e247344
docs: link to external README.md to fix warning
sbrandstaeter Apr 24, 2026
68b8cb4
ci: introduce testing on macos
sbrandstaeter Apr 24, 2026
e8567e0
ci: split jobs into code checks and tests
sbrandstaeter Apr 24, 2026
435284d
ci: ensure install queens to correct interpreter
sbrandstaeter Apr 24, 2026
e7c7b1d
ci: cleanup tests_local workflow
sbrandstaeter Apr 24, 2026
8f8c60c
ci: split into three cleaned workflows
sbrandstaeter Apr 24, 2026
75f0b93
ci: add names for build documentation
sbrandstaeter Apr 24, 2026
471953d
ci: unify pytest calls
sbrandstaeter Apr 27, 2026
f6f4f54
ci: upload artifacts as last step
sbrandstaeter Apr 27, 2026
64ab5b3
ci: always run tutorial tests even if some core tests fail
sbrandstaeter Apr 27, 2026
7a9c8aa
ci: make step names more explicit
sbrandstaeter Apr 27, 2026
5d69110
ci: remove unnecessary PR write access
sbrandstaeter Apr 27, 2026
8361db5
build: remove dependency bokeh
sbrandstaeter Apr 27, 2026
2ec689f
build: remove dependency cython
sbrandstaeter Apr 27, 2026
b4a7999
build: remove dependency autograd
sbrandstaeter Apr 27, 2026
62dad6b
build: remove dependency optax
sbrandstaeter Apr 27, 2026
d26605a
ci: remove PR write access in local testsuite workflow
sbrandstaeter Apr 27, 2026
a8bff89
ci: introduce queens setup action to reduce duplicate code
sbrandstaeter Apr 27, 2026
09f0b93
ci: fix name of 4C integration tests job
sbrandstaeter Apr 27, 2026
ea0414d
ci: split into three test steps, compute coverage and junit report fr…
sbrandstaeter Apr 27, 2026
a08c37b
ci: always build test reports
sbrandstaeter Apr 27, 2026
b122e6c
ci: only build all envs once in code checks use only queens-dev for t…
sbrandstaeter Apr 27, 2026
1882a0a
ci: use relative coverage paths to enable combining from docker and n…
sbrandstaeter Apr 27, 2026
d4e5d80
ci: bump version of upload artifact action
sbrandstaeter Apr 27, 2026
f59a3d0
ci: bump version of checkout action
sbrandstaeter Apr 27, 2026
c73b2d7
ci: bump version of upload pages artifact
sbrandstaeter Apr 27, 2026
079b6a1
ci: bump version of deploy pages
sbrandstaeter Apr 27, 2026
e0f52ae
ci: bump version of download artifact
sbrandstaeter Apr 27, 2026
bde8e06
ci: bump version of junit report
sbrandstaeter Apr 27, 2026
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
10 changes: 6 additions & 4 deletions .github/actions/create_python_environment/action.yml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I haven't missed anything, we can delete this action now, right?

Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ runs:
using: composite
steps:
- uses: conda-incubator/setup-miniconda@v3
- name: Create environment and install QUEENS
with:
miniforge-version: "latest"
- name: Create conda-lock environment and install QUEENS
id: environment
shell: bash -l {0}
env:
PYTHON_PACKAGE_MANAGER: conda
run: |
$PYTHON_PACKAGE_MANAGER env create -f environment.yml
$PYTHON_PACKAGE_MANAGER install -c conda-forge conda-lock -y
conda-lock install --conda mamba -n queens composed.conda-lock.yml
$PYTHON_PACKAGE_MANAGER activate queens
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu
pip install -e .[safe_develop,fourc]
pip install --no-deps -e .
$PYTHON_PACKAGE_MANAGER env export > pipeline_conda_environment.yml
$PYTHON_PACKAGE_MANAGER list
echo "ppm=$PYTHON_PACKAGE_MANAGER" >> $GITHUB_OUTPUT
21 changes: 10 additions & 11 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.67.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: queens-dev
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between queens-dev and queens-all? I'm just wondering which parts of queens-all we are using neither for the documentation nor for the tests.

Copy link
Copy Markdown
Member Author

@sbrandstaeter sbrandstaeter Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good question.
queens-dev is queens-all plus development dependencies (pytest, isort, etc.).
And queens-all includes all possible production dependencies.

To verify: the environments are defined here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok got it, thanks for clarifying 👍 In this case, I would like to bring up the point that it might be helpful to rename queens-dev to queens-all-dev to avoid confusion and make the extension even clearer. However, I do understand that a shorter name is also more convenient.

frozen: true
activate-environment: queens-dev
- name: Mark repo as safe for git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand All @@ -34,27 +42,18 @@ jobs:
- name: Create links to 4C
run: |
ln -s /home/user/4C/bin/ config/4C_build
- name: Create Python environment
id: environment
uses: ./.github/actions/create_python_environment
- name: Add tutorial dependencies
env:
PYTHON_PACKAGE_MANAGER: ${{steps.environment.outputs.ppm}}
- name: Register Jupyter kernel
run: |
$PYTHON_PACKAGE_MANAGER activate queens
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice that we don't have to manually activate the environment in every single shell anymore :)

pip install -e .[tutorial]
python -m ipykernel install --user --name queens --display-name "Python (queens)"
- name: Install xvfb
run: |
apt-get update
apt-get install -y xvfb
- name: Sphinx build
env:
PYTHON_PACKAGE_MANAGER: ${{steps.environment.outputs.ppm}}
PYTHONPATH: ${{ github.workspace }}
run: |
set -euxo pipefail
$PYTHON_PACKAGE_MANAGER activate queens
sphinx-apidoc -o doc/source src/ -fMT
cd doc
xvfb-run -a sphinx-build -b html -d build/doctrees source build/html -W
Expand Down
166 changes: 148 additions & 18 deletions .github/workflows/tests_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- main
workflow_dispatch:

permissions:
contents: read
pull-requests: write

env:
# Set TEST_TIMING_OPTION if local test should be timed. Default is off.
TEST_TIMING_OPTION: ""
Expand All @@ -24,23 +28,152 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.67.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: >-
queens-base
queens-all
queens-dev
frozen: true
activate-environment: queens-dev
- name: Mark repo as safe for git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install rsync
run: |
sudo apt-get update
sudo apt-get install -y rsync
- name: Create links to 4C
run: |
ln -s /home/user/4C/bin/ config/4C_build
- name: Create Python environment
id: environment
uses: ./.github/actions/create_python_environment
- name: Get Python package manager
run: echo "PYTHON_PACKAGE_MANAGER=${{steps.environment.outputs.ppm}}" >> $GITHUB_ENV
- name: Check dependency declaration integrity
run: |
set -euo pipefail
# Validate that the PEP-style dependency declarations in pyproject.toml
# stay aligned with the pixi dependency sections.
python3 tools/dependencies/check_pyproject_dependency_integrity.py \
--path pyproject.toml \
--allow-version-mismatch gpflow
- name: Check pixi environment integrity
id: environment_integrity
run: |
set -euo pipefail

base_ref="main"
pyproject_diff_file="$(mktemp)"
git fetch --no-tags --depth=1 origin "${base_ref}"

echo "::group::Check if dependency declarations changed..."
pyproject_changed=false
# The diff helper returns:
# 0 if dependency-related declarations are unchanged,
# 1 if there is a relevant dependency diff,
# >1 if the diff command itself failed.
if python3 tools/dependencies/diff_pyproject_dependency_declarations.py \
--base-ref "origin/${base_ref}" \
--head-ref HEAD \
> "${pyproject_diff_file}"; then
pyproject_changed=false
else
# $? is the exit status of the last command.
# when arriving here, the diff command found a diff (exit status 1) or
# the diff command itself failed (exit status >1).
pyproject_check_status=$?
if [ "${pyproject_check_status}" -eq 1 ]; then
pyproject_changed=true
else
echo "Failed to compare dependency-related pyproject.toml sections."
exit "${pyproject_check_status}"
fi
fi
echo "Pyproject.toml dependency sections changed compared to ${base_ref}: ${pyproject_changed}"
echo "::endgroup::"

echo "::group::Check if pixi.lock would be updated by pixi lock..."
# Detect any change (modified, deleted, untracked, etc.)
if [ -n "$(git status --porcelain -- pixi.lock)" ]; then
echo "Restoring pixi.lock from HEAD..."
git restore --source=HEAD --staged --worktree pixi.lock 2>/dev/null
fi
lock_update_possible=false
# deactivate exit on error to allow `pixi lock --check --dry-run` to fail
set +e
# `pixi lock --check --dry-run` exits non-zero when the current pyproject.toml
# would produce a different pixi.lock without writing the lockfile to disk.
pixi lock --check --dry-run
exit_code_pixi_lock_check=$?
# reactivate exit on error
set -e
echo "exit code: $exit_code_pixi_lock_check"
if [ $exit_code_pixi_lock_check -ne 0 ]; then
lock_update_possible=true
fi
echo "pixi.lock would be updated by pixi lock: ${lock_update_possible}"
echo "::endgroup::"

{
echo "pyproject_changed=${pyproject_changed}"
echo "lock_update_possible=${lock_update_possible}"
echo "compare_ref=${base_ref}"
} >> "$GITHUB_OUTPUT"


# ---- Write rich Markdown to Step Summary ----
{
echo "### Pixi Environment Integrity"
echo ""
echo "- dependency-relevant \`pyproject.toml\` changes vs \`${base_ref}\`: ${pyproject_changed}"
echo "- \`pixi.lock\` would change if refreshed: ${lock_update_possible}"

if [ "${pyproject_changed}" = "true" ]; then
echo ""
echo "<details>"
echo "<summary>Dependency diff</summary>"
echo ""
echo '```diff'
cat "${pyproject_diff_file}"
echo '```'
echo "</details>"
fi
} >> "$GITHUB_STEP_SUMMARY"


# ---- Write clean, readable logs ----
echo "::group::Summary Pixi Environment Integrity"
echo "----------------------------------------"
echo "pyproject changes vs ${base_ref}: ${pyproject_changed}"
echo "pixi.lock update possible: ${lock_update_possible}"

if [ "${pyproject_changed}" = "true" ]; then
echo "::group::Dependency diff"
cat "${pyproject_diff_file}"
echo "::endgroup::"
fi
echo "::endgroup::"

echo "::group::Do integrity check..."
# Only fail if the dependency declarations changed and the lockfile is
# stale. A stale lockfile without dependency declaration changes is
# reported in the summary but does not block the workflow here.
if [ "${pyproject_changed}" = "true" ] && [ "${lock_update_possible}" = "true" ]; then
echo "pyproject.toml dependency sections changed compared to main"
echo "AND pixi.lock would be updated by pixi lock."
echo "Please regenerate and commit pixi.lock for this change."
exit 1
else
echo "Pixi environment integrity is OK."
fi
echo "::endgroup::"
- name: Code checks
run: |
$PYTHON_PACKAGE_MANAGER activate queens
set -euo pipefail

# Run all checks in one fail-fast block so a tool failure is not
# hidden by later bookkeeping commands such as echo/endgroup lines.
echo "::group::Run isort..."
isort --check-only src/* tests
echo "::endgroup::"
Expand All @@ -62,7 +195,8 @@ jobs:
echo "::endgroup::"

echo "::group::Run nbstripout..."
find . -name '*.ipynb' -exec nbstripout --verify {} +
find . -path './.pixi' -prune -o -name '*.ipynb' -exec nbstripout --verify {} +

echo "::endgroup::"

# echo "::group::Create code quality report..."
Expand All @@ -71,7 +205,7 @@ jobs:
# echo "::endgroup::"

echo "::group::Check compatibility with licenses of dependencies..."
liccheck -r requirements.txt
pip-licenses --python=.pixi/envs/queens-all/bin/python
echo "::endgroup::"

echo "::group::Create an rc file for the license header check..."
Expand All @@ -82,23 +216,19 @@ jobs:
mypy .
echo "::endgroup::"
- name: Check license headers
uses: apache/skywalking-eyes/header@v0.4.0
uses: apache/skywalking-eyes/header@v0.8.0
- name: Check conventional commit messages
uses: webiny/action-conventional-commits@v1.3.0
- name: Run pytest
run: |
$PYTHON_PACKAGE_MANAGER activate queens
set -euo pipefail

pytest -v -m "unit_tests or integration_tests or integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes -o junit_logging=all --junitxml=test_junit.xml
python .github/xml_summaries_to_md.py test_junit.xml xml_coverage_report.xml >> $GITHUB_STEP_SUMMARY
- name: Add tutorial dependencies
env:
PYTHON_PACKAGE_MANAGER: ${{steps.environment.outputs.ppm}}
run: |
$PYTHON_PACKAGE_MANAGER activate queens
pip install -e .[tutorial]
- name: Run pytest for tutorials
run: |
$PYTHON_PACKAGE_MANAGER activate queens
set -euo pipefail

pytest -v -m "tutorial_tests"
- name: Upload coverage report
uses: actions/upload-pages-artifact@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ venv.bak/

# best editor ever files
*.swp
# pixi environments
.pixi/*
!.pixi/config.toml
Loading
Loading