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
54 changes: 25 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,55 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10", "3.11", "3.12"]
nox-session: ["tests"]
include:
- os: ubuntu-latest
python-version: "3.10"
nox-session: "lint"
python-version: ["3.12", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
- name: Configure Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Run tests
run: uv run pytest -v tests
- name: Upload generated images on failure
uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: images-${{ matrix.os }}-${{ matrix.python-version }}
path: ./result_images

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
- name: Cache pre-commit environments
if: ${{ matrix.nox-session == 'lint' }}
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- name: Install nox
run: |
python -m pip install -U pip
python -m pip install -U nox
- name: Run tests
run: python -m nox --non-interactive -s ${{ matrix.nox-session }}
- name: Upload generated images on failure
uses: actions/upload-artifact@v7
if: ${{ failure() && matrix.nox-session == 'tests' }}
with:
name: images-${{ matrix.os }}-${{ matrix.python-version }}
path: ./result_images
- name: Run pre-commit
run: uvx pre-commit run --all-files

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
name: Install Python
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
- name: Build sdist and wheel
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build .
run: uv build
- uses: actions/upload-artifact@v7
with:
path: dist/*
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ _skbuild
*.so
.mypy_cache
.tox
.nox
.venv
uv.lock
.coverage
.coverage*
dist
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ TODO
## How to test the project

```bash
python -m pip install nox
python -m nox
uv run pytest -v tests
```

You can also run the linters with:

```bash
uvx pre-commit run --all-files
```

## How to submit changes
Expand Down
8 changes: 3 additions & 5 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ source directory, run:

.. code-block:: bash

python -m pip install nox
python -m nox -s tests-PYTHON_VERSION
uv run pytest -v tests

Where ``PYTHON_VERSION`` is the version of Python you're using (e.g.
``3.10``) This might take a few minutes but you shouldn't get any errors
if all went as planned.
This might take a few minutes but you shouldn't get any errors if all went as
planned.
16 changes: 0 additions & 16 deletions noxfile.py

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ test = ["pytest", "arviz>=0.9", "arviz-base", "scipy"]
arviz = ["arviz>=0.9", "arviz-base"]
docs = ["arviz>=0.9", "arviz-base", "sphinx>=1.7.5", "pandoc", "myst-nb", "sphinx-book-theme", "ipython"]

# Installed by default with `uv run`/`uv sync`, so `uv run pytest` just works.
[dependency-groups]
dev = ["pytest", "arviz>=0.9", "arviz-base", "scipy"]

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
Expand Down
Binary file modified tests/baseline_images/test_corner/1d_fig_argument.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/arviz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/basic_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/basic_log_x2_only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/bins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/bins_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/color_filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/extended_overplotting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/hist_bin_factor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/hist_bin_factor_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/no_fill_contours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/overplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/overplot_1d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/overplot_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/pandas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/quantiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/quantiles_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/range_fig_arg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/reverse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/reverse_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/reverse_overplotting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/reverse_truths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/test_corner/smooth.png
Binary file modified tests/baseline_images/test_corner/smooth1d.png
Binary file modified tests/baseline_images/test_corner/smooth1d_log.png
Binary file modified tests/baseline_images/test_corner/smooth_log.png
Binary file modified tests/baseline_images/test_corner/tight.png
Binary file modified tests/baseline_images/test_corner/title_quantiles.png
Binary file modified tests/baseline_images/test_corner/title_quantiles_default.png
Binary file modified tests/baseline_images/test_corner/title_quantiles_raises.png
Binary file modified tests/baseline_images/test_corner/titles1.png
Binary file modified tests/baseline_images/test_corner/titles2.png
Binary file modified tests/baseline_images/test_corner/titles_fmt_multi.png
Binary file modified tests/baseline_images/test_corner/titles_fmt_single.png
Binary file modified tests/baseline_images/test_corner/top_ticks.png
Binary file modified tests/baseline_images/test_corner/truths.png
Loading