Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

➕ dep-add(extras): add extra dependencies #356

Merged
merged 1 commit into from
Jan 6, 2025
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
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages: [pre-commit, pre-push]

repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.0.0
rev: v4.1.0
hooks:
- id: commitizen
additional_dependencies: [cz-conventional-gitmoji]
Expand Down Expand Up @@ -50,7 +50,7 @@ repos:
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.1"
rev: "v0.8.6"
hooks:
# Run the linter
- id: ruff
Expand All @@ -67,14 +67,14 @@ repos:
additional_dependencies: [black==23.*]

- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.4.1"
rev: "v3.4.2"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.13.0"
rev: "v1.14.1"
hooks:
- id: mypy
files: src
Expand All @@ -86,11 +86,11 @@ repos:
hooks:
- id: codespell

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
# - repo: https://github.com/abravalheri/validate-pyproject
# rev: v0.23
# hooks:
# - id: validate-pyproject
# additional_dependencies: ["validate-pyproject-schema-store[all]"]

- repo: local
hooks:
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
# NOTE: zeroth is only required for matplotlib

[project.optional-dependencies]
# jax extras
cpu = ["jax[cpu]"]
cuda = ["jax[cuda]"]
cuda12 = ["jax[cuda12]"]
cuda12_local = ["jax[cuda12_local]"]
rocm = ["jax[rocm]"]
k8s = ["jax[k8s]"]
# extra extras
all = ["unxt[backend-astropy,interop-gala,interop-mpl]"]
backend-astropy = ["astropy>=6.0"]
interop-gala = ["gala>=1.8"]
Expand Down Expand Up @@ -261,6 +269,15 @@ UNXT_ENABLE_RUNTIME_TYPECHECKING = "beartype.beartype"


[tool.uv]
# Require that `unxt[<jax-extras>]` requirements are resolved in different forks
# so that they cannot conflict with one another.
conflicts = [
[
{ extra = "cpu" },
{ extra = "cuda" }, { extra = "cuda12" }, { extra = "cuda12_local" },
{ extra = "rocm" }, { extra = "k8s" }
]
]
constraint-dependencies = [
"jax<0.4.36", # TODO: remove when https://github.com/patrick-kidger/quax/pull/37 is merged
]
Loading