Skip to content

Commit

Permalink
Merge pull request #920 from gchq/feature/lower-bound-deps
Browse files Browse the repository at this point in the history
Add lower bound for all direct dependencies
  • Loading branch information
tp832944 authored Jan 10, 2025
2 parents 4cb97fb + c36b184 commit fde187f
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 80 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(https://github.com/gchq/coreax/pull/909)
- Added a method `SquaredExponentialKernel.get_sqrt_kernel` which returns a square
root kernel for the squared exponential kernel. (https://github.com/gchq/coreax/pull/883)
- Added (loose) lower bounds to all direct dependencies. (https://github.com/gchq/coreax/pull/920)

### Fixed

Expand Down
74 changes: 41 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,62 +25,70 @@ authors = [
{name = "GCHQ", email = "oss@gchq.gov.uk"},
]
dependencies = [
"equinox>=0.11.5",
"flax",
"jax",
"jaxopt",
"jaxtyping>0.2.31",
"optax",
"scikit-learn",
"tqdm",
"typing-extensions",
# Unless explicitly noted, lower bounds on these dependencies are guesses, and
# should not be taken to imply that Coreax is *known* to be incompatible with
# earlier versions; they are just there to prevent extremely out-of-date versions
# of dependencies being used (which would almost certainly have incompatibilities).
"equinox>=0.11.5", # Earlier versions are incompatible.
"flax>=0.8",
"jax>=0.4",
"jaxopt>=0.8",
"jaxtyping>0.2.31", # Earlier versions are incompatible.
"optax>=0.2",
"scikit-learn>=1",
"tqdm>=4",
"typing-extensions>=4.12",
]

[project.optional-dependencies]
# Example scripts
example = [
"imageio",
"matplotlib",
"numpy",
"opencv-python-headless", # WARNING: Incompatible with other versions of opencv
"imageio>=2",
"matplotlib>=3",
"numpy>=2",
"opencv-python-headless>=4", # WARNING: Incompatible with other versions of opencv
]
# Benchmarking - runs very similar code to examples with same dependencies plus more
benchmark = [
"coreax[example]",
"torch",
"torchvision",
"umap-learn>=0.5.7",
# Required for umap-learn
"torch>=2.5",
"torchvision>=0.20",
"umap-learn>=0.5.7", # Earlier versions are incompatible.
# Required for umap-learn - we constrain this so dependency solvers don't
# erroneously backtrack.
"llvmlite>=0.40.0",
]
# Run unit tests with coverage assessment
test = [
"coreax[benchmark]",
"beartype",
"pytest-cov",
"pytest-rerunfailures",
"scipy",
"beartype>=0.19",
"pytest>=8",
"pytest-cov>=6",
"pytest-rerunfailures>=15",
"scipy>=1.13",
]
# Compile documentation
doc = [
"furo",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-toolbox",
"sphinxcontrib-bibtex",
"sphobjinv",
"furo>=2024",
"sphinx>=7",
"sphinx-autodoc-typehints>=2",
"sphinx-toolbox>=3",
"sphinxcontrib-bibtex>=2",
"sphobjinv>=2",
]

[dependency-groups]
# All tools for a developer including those for running pylint
dev = [
# These dependencies are constrained more tightly as they're only used by package
# developers, so compatibility is less of a concern
"coreax[example, benchmark, test, doc]",
"jupyter", # Include as developers may wish to write their own notebooks
"ruff",
"pre-commit>=3.7",
"pylint",
"pyright",
"pyroma",
"jupyter>=1.1.1", # Include as developers may wish to write their own notebooks
"ruff>=0.8.6",
"pre-commit>=4.0.1",
"pylint>=3.3.3",
"pyright>=1.1.391",
"pyroma>=4.2",
]

[tool.uv]
Expand Down
6 changes: 3 additions & 3 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ platformdirs==4.3.6
protobuf==5.29.2
pybtex==0.24.0
pybtex-docutils==1.0.3
pygments==2.18.0
pygments==2.19.1
pyyaml==6.0.2
referencing==0.35.1
requests==2.32.3
rich==13.9.4
rpds-py==0.22.3
ruamel-yaml==0.18.8
ruamel-yaml==0.18.10
ruamel-yaml-clib==0.2.12 ; python_full_version < '3.13' and platform_python_implementation == 'CPython'
scikit-learn==1.6.0
scipy==1.13.1 ; python_full_version < '3.10'
scipy==1.15.0 ; python_full_version >= '3.10'
setuptools==75.6.0 ; python_full_version >= '3.12'
setuptools==75.7.0 ; python_full_version >= '3.12'
simplejson==3.19.3 ; python_full_version >= '3.10'
six==1.17.0
snowballstemmer==2.2.0
Expand Down
90 changes: 46 additions & 44 deletions uv.lock

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

0 comments on commit fde187f

Please sign in to comment.