diff --git a/.czrc b/.czrc new file mode 100644 index 0000000..a7398ae --- /dev/null +++ b/.czrc @@ -0,0 +1,3 @@ +{ + "path": "cz-gitmoji" +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 42e5f37..6971fe6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,20 @@ ci: - autoupdate_commit_msg: "chore: update pre-commit hooks" - autofix_commit_msg: "style: pre-commit fixes" - autoupdate_schedule: "monthly" + autoupdate_schedule: "quarterly" + autoupdate_commit_msg: "👷: update pre-commit hooks" + autofix_commit_msg: "🎨: pre-commit fixes" default_stages: [pre-commit, pre-push] repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v3.30.0 + rev: v4.0.0 hooks: - id: commitizen - id: commitizen-branch stages: [pre-push] + args: + - "--" + - "--config-file=.czrc" - repo: meta hooks: @@ -46,14 +49,14 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows - id: check-readthedocs - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.2" + rev: "v0.8.1" hooks: # Run the linter - id: ruff @@ -70,7 +73,7 @@ repos: additional_dependencies: [black==23.*] - repo: https://github.com/rbubley/mirrors-prettier - rev: "v3.3.3" + rev: "v3.4.1" hooks: - id: prettier types_or: [yaml, markdown, html, css, scss, javascript, json] @@ -101,7 +104,7 @@ repos: - tomli - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.22 + rev: v0.23 hooks: - id: validate-pyproject diff --git a/pyproject.toml b/pyproject.toml index 8e723eb..d12a771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,8 +61,8 @@ "jinja2==3.1" ] test = [ - "pytest >=6", - "pytest-cov >=3", + "pytest >= 8.3", + "pytest-cov >= 3", "pytest-github-actions-annotate-failures", # only applies to GH Actions "sybil >= 7.1.0", ] @@ -127,7 +127,7 @@ [tool.pytest.ini_options] - minversion = "6.0" + minversion = "8.3" addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] xfail_strict = true filterwarnings = [ @@ -148,7 +148,6 @@ ignore = [ "A001", # Variable is shadowing a Python builtin "A002", # Argument is shadowing a Python builtin - "ANN101", # Missing type annotation for self in method "ANN401", # Dynamically typed expressions (typing.Any) are disallowed # TODO "ARG001", # Unused function argument "COM812", # Missing trailing comma @@ -161,11 +160,13 @@ "FIX002", # Line contains TODO, consider resolving the issue "PD011", # Pandas "PYI041", # Use `float` instead of `int | float` + "RUF022", # `__all__` is not sorted "TD002", # Missing author in TODO; try: `# TODO(): . "TD003", # Missing issue link on the line following this TODO ] [tool.ruff.lint.per-file-ignores] + "src/quaxed/**" = ["A004"] "tests/**" = ["ANN", "INP001", "PLR0913", "PLR2004", "S101", "T20", "TID252"] "__init__.py" = ["F403"] "noxfile.py" = ["T20"] diff --git a/uv.lock b/uv.lock index 999bb9c..0fa9e76 100644 --- a/uv.lock +++ b/uv.lock @@ -1269,7 +1269,7 @@ wheels = [ [[package]] name = "quaxed" -version = "0.6.5.dev2+g058a0af.d20241013" +version = "0.6.8.dev2+g4e92f0e.d20241203" source = { editable = "." } dependencies = [ { name = "jax" }, @@ -1279,7 +1279,7 @@ dependencies = [ { name = "quax" }, ] -[package.optional-dependencies] +[package.dev-dependencies] dev = [ { name = "griffe" }, { name = "jinja2" }, @@ -1317,55 +1317,51 @@ test = [ { name = "sybil" }, ] -[package.dev-dependencies] -dev = [ - { name = "pytest" }, - { name = "sybil" }, -] - [package.metadata] requires-dist = [ - { name = "griffe", marker = "extra == 'dev'", specifier = "<1.0" }, - { name = "griffe", marker = "extra == 'docs'", specifier = "<1.0" }, { name = "jax", specifier = ">0.4" }, { name = "jaxlib", specifier = ">0.4" }, { name = "jaxtyping", specifier = ">=0.2.34" }, - { name = "jinja2", marker = "extra == 'dev'", specifier = "==3.1" }, - { name = "jinja2", marker = "extra == 'docs'", specifier = "==3.1" }, - { name = "mkdocs", marker = "extra == 'dev'", specifier = "==1.6.0" }, - { name = "mkdocs", marker = "extra == 'docs'", specifier = "==1.6.0" }, - { name = "mkdocs-include-exclude-files", marker = "extra == 'dev'", specifier = "==0.0.1" }, - { name = "mkdocs-include-exclude-files", marker = "extra == 'docs'", specifier = "==0.0.1" }, - { name = "mkdocs-material", marker = "extra == 'dev'", specifier = "==9.5" }, - { name = "mkdocs-material", marker = "extra == 'docs'", specifier = "==9.5" }, - { name = "mkdocstrings", extras = ["python"], marker = "extra == 'dev'", specifier = ">=0.18" }, - { name = "mkdocstrings", extras = ["python"], marker = "extra == 'docs'", specifier = ">=0.18" }, - { name = "mknotebooks", marker = "extra == 'dev'", specifier = "==0.8" }, - { name = "mknotebooks", marker = "extra == 'docs'", specifier = "==0.8" }, - { name = "nbconvert", marker = "extra == 'dev'", specifier = "==7.16" }, - { name = "nbconvert", marker = "extra == 'docs'", specifier = "==7.16" }, { name = "plum-dispatch", specifier = ">=2.5.2" }, - { name = "pygments", marker = "extra == 'dev'", specifier = "==2.16" }, - { name = "pygments", marker = "extra == 'docs'", specifier = "==2.16" }, - { name = "pymdown-extensions", marker = "extra == 'dev'", specifier = "==10.2" }, - { name = "pymdown-extensions", marker = "extra == 'docs'", specifier = "==10.2" }, - { name = "pytest", marker = "extra == 'dev'", specifier = ">=6" }, - { name = "pytest", marker = "extra == 'test'", specifier = ">=6" }, - { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=3" }, - { name = "pytest-cov", marker = "extra == 'test'", specifier = ">=3" }, - { name = "pytest-github-actions-annotate-failures", marker = "extra == 'dev'" }, - { name = "pytest-github-actions-annotate-failures", marker = "extra == 'test'" }, - { name = "pytkdocs-tweaks", marker = "extra == 'dev'", specifier = "==0.0.8" }, - { name = "pytkdocs-tweaks", marker = "extra == 'docs'", specifier = "==0.0.8" }, { name = "quax", specifier = ">0.0.4" }, - { name = "sybil", marker = "extra == 'dev'", specifier = ">=7.1.0" }, - { name = "sybil", marker = "extra == 'test'", specifier = ">=7.1.0" }, ] [package.metadata.requires-dev] dev = [ - { name = "pytest", specifier = ">=8.3.3" }, - { name = "sybil", specifier = ">=8.0.0" }, + { name = "griffe", specifier = "<1.0" }, + { name = "jinja2", specifier = "==3.1" }, + { name = "mkdocs", specifier = "==1.6.0" }, + { name = "mkdocs-include-exclude-files", specifier = "==0.0.1" }, + { name = "mkdocs-material", specifier = "==9.5" }, + { name = "mkdocstrings", extras = ["python"], specifier = ">=0.18" }, + { name = "mknotebooks", specifier = "==0.8" }, + { name = "nbconvert", specifier = "==7.16" }, + { name = "pygments", specifier = "==2.16" }, + { name = "pymdown-extensions", specifier = "==10.2" }, + { name = "pytest", specifier = ">=8.3" }, + { name = "pytest-cov", specifier = ">=3" }, + { name = "pytest-github-actions-annotate-failures" }, + { name = "pytkdocs-tweaks", specifier = "==0.0.8" }, + { name = "sybil", specifier = ">=7.1.0" }, +] +docs = [ + { name = "griffe", specifier = "<1.0" }, + { name = "jinja2", specifier = "==3.1" }, + { name = "mkdocs", specifier = "==1.6.0" }, + { name = "mkdocs-include-exclude-files", specifier = "==0.0.1" }, + { name = "mkdocs-material", specifier = "==9.5" }, + { name = "mkdocstrings", extras = ["python"], specifier = ">=0.18" }, + { name = "mknotebooks", specifier = "==0.8" }, + { name = "nbconvert", specifier = "==7.16" }, + { name = "pygments", specifier = "==2.16" }, + { name = "pymdown-extensions", specifier = "==10.2" }, + { name = "pytkdocs-tweaks", specifier = "==0.0.8" }, +] +test = [ + { name = "pytest", specifier = ">=8.3" }, + { name = "pytest-cov", specifier = ">=3" }, + { name = "pytest-github-actions-annotate-failures" }, + { name = "sybil", specifier = ">=7.1.0" }, ] [[package]]