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
23 changes: 0 additions & 23 deletions .github/workflows/news.yml

This file was deleted.

72 changes: 40 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,58 +13,66 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
nox-session: ["test"]
x64: ["1"]
python-version: ["3.10"]
x64: ["0"]
include:
- python-version: "3.10"
nox-session: "test"
x64: "0"
- python-version: "3.10"
nox-session: "comparison"
- python-version: "3.13"
x64: "1"
- python-version: "3.10"
nox-session: "doctest"
x64: "1"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Run tests
run: |
uv run --extra test --python ${{ matrix.python-version }} pytest -n auto tests
env:
JAX_ENABLE_X64: ${{ matrix.x64 }}

comparison:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Run tests
run: |
python -m pip install -U pip
python -m pip install nox
uv run --extra test --extra comparison --python 3.12 pytest -n auto tests
env:
JAX_ENABLE_X64: "1"

doctest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Run tests
run: |
python -m nox --non-interactive --error-on-missing-interpreter \
--session ${{ matrix.nox-session }} --python ${{ matrix.python-version }}
uv run --extra test --extra doctest --python 3.12 pytest --doctest-modules -v src/tinygp
env:
JAX_ENABLE_X64: ${{ matrix.x64 }}
JAX_ENABLE_X64: "1"

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U build twine
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Build the distribution
run: python -m build .
run: uv build
- name: Check the distribution
run: python -m twine check --strict dist/*
run: uv run --with twine python -m twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
path: dist/*
Expand All @@ -75,7 +83,7 @@ jobs:
url: https://pypi.org/p/tinygp
permissions:
id-token: write
needs: [tests, build]
needs: [tests, comparison, doctest, build]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
docs/api/summary
__pycache__
*.egg-info
uv.lock
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Tracker](https://github.com/dfm/tinygp/issues).
## How to test the project

```bash
python -m pip install nox
python -m nox -s test -p 3.10
uv run --extra test pytest
```

## How to submit changes
Expand Down
3 changes: 1 addition & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ If you installed from source, you can run the unit tests. From the root of the
source directory, run:

```bash
python -m pip install nox
python -m nox -s test -p 3.10
uv run --extra test pytest
```
34 changes: 0 additions & 34 deletions noxfile.py

This file was deleted.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tinygp"
description = "The tiniest of Gaussian Process libraries"
authors = [{ name = "Dan Foreman-Mackey", email = "foreman.mackey@gmail.com" }]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = { text = "MIT" }
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -15,11 +15,12 @@ classifiers = [
"Programming Language :: Python :: 3",
]
dynamic = ["version"]
dependencies = ["jax", "jaxlib", "equinox"]
dependencies = ["jax", "equinox"]

[project.optional-dependencies]
test = ["pytest"]
test = ["pytest", "pytest-xdist"]
comparison = ["george", "celerite"]
doctest = ["numpyro"]
docs = [
"sphinx-book-theme",
"myst-nb",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_solvers/test_quasisep/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ def test_unsorted(data):
def impl(X, y):
return GaussianProcess(kernel, X, diag=0.1).log_probability(y)

with pytest.raises(jax.lib.xla_extension.XlaRuntimeError) as exc_info:
with pytest.raises(jax.errors.JaxRuntimeError) as exc_info:
impl(x_, y_).block_until_ready()
assert exc_info.match(r"Input coordinates must be sorted")