Skip to content

Commit

Permalink
Update pre-commit (#326)
Browse files Browse the repository at this point in the history
* update precommit

* update pre-commit
  • Loading branch information
Intron7 authored Feb 11, 2025
1 parent 8adee01 commit d4ce145
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 40 deletions.
12 changes: 9 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ repos:
rev: v0.9.6
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: ["--fix"]
- id: ruff-format
types_or: [python, pyi, jupyter]
# The following can be removed once PLR0917 is out of preview
- name: ruff preview rules
id: ruff
types_or: [python, pyi, jupyter]
args: ["--preview", "--select=PLR0917"]
- repo: https://github.com/biomejs/pre-commit
rev: v0.6.1
hooks:
- id: biome-format
additional_dependencies: ["@biomejs/[email protected]"]
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down
5 changes: 5 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[formatting]
array_auto_collapse = false
column_width = 120
compact_arrays = false
indent_string = ' '
14 changes: 7 additions & 7 deletions docs/_static/css/override.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/* for the sphinx design cards */
body {
--sd-color-shadow: dimgrey;
--sd-color-shadow: dimgrey;
}

dl.citation>dt {
float: left;
margin-right: 15px;
font-weight: bold;
dl.citation > dt {
float: left;
margin-right: 15px;
font-weight: bold;
}

/* for custom small role */
.small {
font-size: 40% !important
font-size: 40% !important;
}

.smaller,
.pr {
font-size: 70% !important
font-size: 70% !important;
}
8 changes: 4 additions & 4 deletions hatch.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[envs.default]
installer = "uv"
features = ["dev"]
features = [ "dev" ]

[envs.hatch-test]
features = ["test", "rapids12"]
features = [ "test", "rapids12" ]

[envs.docs]
features = ["doc"]
features = [ "doc" ]
scripts.build = "sphinx-build -M html docs docs/_build {args}"
scripts.clean = "git clean -fXd docs"

[envs.default.pip]
extra_index_urls = [
"https://pypi.nvidia.com"
"https://pypi.nvidia.com",
]
52 changes: 26 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = [ "hatchling", "hatch-vcs" ]
build-backend = "hatchling.build"

[project]
name = "rapids_singlecell"
description = "running single cell analysis on Nvidia GPUs"
requires-python = ">=3.10, <3.13"
license = {file = "LICENSE"}
authors = [{name = "Severin Dicks"}]
readme = {file = "README.md", content-type="text/markdown"}
dynamic = ["version"]
requires-python = ">=3.10, <3.13"
license = { file = "LICENSE" }
authors = [ { name = "Severin Dicks" } ]
readme = { file = "README.md", content-type = "text/markdown" }
dynamic = [ "version" ]

dependencies = [
"anndata>=0.10.0",
Expand All @@ -26,8 +26,8 @@ dependencies = [
]

[project.optional-dependencies]
rapids11 = ["cupy-cuda11x","cudf-cu11==24.12.*", "cuml-cu11==24.12.*", "cugraph-cu11==24.12.*","numba < 0.61.0"]
rapids12 = ["cupy-cuda12x","cudf-cu12==24.12.*", "cuml-cu12==24.12.*", "cugraph-cu12==24.12.*", "numba < 0.61.0"]
rapids11 = [ "cupy-cuda11x", "cudf-cu11==24.12.*", "cuml-cu11==24.12.*", "cugraph-cu11==24.12.*", "numba < 0.61.0" ]
rapids12 = [ "cupy-cuda12x", "cudf-cu12==24.12.*", "cuml-cu12==24.12.*", "cugraph-cu12==24.12.*", "numba < 0.61.0" ]
doc = [
"sphinx>=4.5.0",
"sphinx-copybutton",
Expand All @@ -51,17 +51,17 @@ Documentation = "https://rapids-singlecell.readthedocs.io"
Source = "https://github.com/scverse/rapids_singlecell"

[tool.ruff]
src = ["src"]
src = [ "src" ]
line-length = 88
lint.select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
"W", # Warning detected by Pycodestyle
"I", # isort
"TID", # flake8-tidy-imports
"C4", # flake8-comprehensions
"BLE", # flake8-blind-except
"UP", # pyupgrade
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
"W", # Warning detected by Pycodestyle
"I", # isort
"TID", # flake8-tidy-imports
"C4", # flake8-comprehensions
"BLE", # flake8-blind-except
"UP", # pyupgrade
"TID251", # Banned imports
"RUF100", # Report unused noqa directives
"ICN", # Follow import conventions
Expand All @@ -82,14 +82,14 @@ lint.ignore = [
]

[tool.ruff.lint.per-file-ignores]
"docs/*" = ["I"]
"tests/*" = ["D"]
"*/__init__.py" = ["F401"]
"src/rapids_singlecell/decoupler_gpu/_method_mlm.py" = ["PLR0917"]
"src/rapids_singlecell/decoupler_gpu/_method_wsum.py" = ["PLR0917"]
"docs/*" = [ "I" ]
"tests/*" = [ "D" ]
"*/__init__.py" = [ "F401" ]
"src/rapids_singlecell/decoupler_gpu/_method_mlm.py" = [ "PLR0917" ]
"src/rapids_singlecell/decoupler_gpu/_method_wsum.py" = [ "PLR0917" ]
[tool.ruff.lint.isort]
known-first-party = ["rapids_singlecell"]
required-imports = ["from __future__ import annotations"]
known-first-party = [ "rapids_singlecell" ]
required-imports = [ "from __future__ import annotations" ]

[tool.pytest.ini_options]
addopts = [
Expand All @@ -106,7 +106,7 @@ exclude = [
"src/rapids_singlecell/_testing.py",
"tests",
"docs",
"notebooks"
"notebooks",
]
[tool.hatch.build.hooks.vcs]
version-file = "src/rapids_singlecell/_version.py"
Expand All @@ -115,7 +115,7 @@ version-file = "src/rapids_singlecell/_version.py"
source = "vcs"

[tool.hatch.build.targets.wheel]
packages = ['src/rapids_singlecell']
packages = [ 'src/rapids_singlecell' ]

[tool.codespell]
skip = '*.ipynb,*.csv'
Expand Down

0 comments on commit d4ce145

Please sign in to comment.