Skip to content
Closed
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
14 changes: 13 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ jobs:
os: [ "ubuntu-latest" ]
# Test against all security and bugfix versions: https://devguide.python.org/versions/
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
include:
# Include other OS for latest Python
# because these seem to be the flakiest from experience
# so are worth the extra testing
- os: "windows-latest"
python-version: "3.13"
- os: "macos-latest"
python-version: "3.13"

runs-on: "${{ matrix.os }}"
defaults:
run:
Expand All @@ -97,6 +106,8 @@ jobs:
uv-dependency-install-flags: "--all-extras --group tests"
- name: Run tests
run: |
# Warm up the speed tests, allowing failure
uv run pytest tests/integration/database/test_integration_speed.py || true
uv run pytest -r a -v src tests --doctest-modules --cov=src --cov-report=term-missing --cov-report=xml
uv run coverage report
- name: Upload coverage reports to Codecov with GitHub Action
Expand Down Expand Up @@ -266,7 +277,8 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python="<3.13"
pdm lock --group :all --python=">=3.13" --append
- name: Build package
run: |
uv build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python="<3.13"
pdm lock --group :all --python=">=3.13" --append
- name: Publish to PyPI
run: |
uv build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
# Required for building the locked version of the package
# with pdm-build-locked (see pyproject.toml)
run: |
pdm lock --group :all --strategy inherit_metadata
pdm lock --group :all --strategy inherit_metadata --python="<3.13"
pdm lock --group :all --python=">=3.13" --append
- name: Add version to environment
run: |
PROJECT_VERSION=`sed -ne 's/^version = "\([0-9\.a]*\)"/\1/p' pyproject.toml`
Expand Down
1 change: 1 addition & 0 deletions changelog/21.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated minimum numpy version to 1.26.0, the earliest that is not in end-of-life. Fixed the numpy pin for Python 3.13 to >=2.1.0, the first numpy version which supported Python 3.13.
2 changes: 2 additions & 0 deletions changelog/21.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added CI for windows and mac with latest Python to try and catch edge cases earlier
- Updated the locking and building with pdm to support different pins for different python version ranges
1 change: 1 addition & 0 deletions changelog/22.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update tests to pass against latest version of upstream repos
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ license = { text = "3-Clause BSD License" }
requires-python = ">=3.9"
dependencies = [
"attrs>=24.3.0",
"numpy>=1.25.0",
"numpy>=1.26.0; python_version < '3.13'",
"numpy>=2.1.0; python_version >= '3.13'",
"pandas>=2.2.0",
]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/database/test_integration_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def test_overhead(groupby, tmpdir):
stop_db_save = time.perf_counter()
time_db_save = stop_db_save - start_db_save

# Ok, particularly given how few files we're dealing with.
# These tolerances are ok, particularly given how few files we're dealing with.
# This is mainly about avoiding a factor of 10
# (which was the difference we were getting in earlier implemenations).
tol_save = 0.25
tol_load = 0.2
tol_save = 2.0
tol_load = 2.0

overhead = (time_db_save - time_pandas_save) / time_pandas_save
assert overhead <= tol_save, f"Overhead is more than {tol_save*100}%"
Expand Down
29 changes: 19 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading