-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec7de24
commit 8a52380
Showing
6 changed files
with
112 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,12 @@ repos: | |
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: "2.2.1" | ||
hooks: | ||
- id: prettier | ||
- id: pyproject-fmt | ||
- repo: https://github.com/biomejs/pre-commit | ||
rev: v0.4.0 | ||
hooks: | ||
- id: biome-format | ||
additional_dependencies: ["@biomejs/[email protected]"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"formatter": { | ||
"indentStyle": "space", | ||
"indentWidth": 4, | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["./.vscode/*.json", "**/*.jsonc"], | ||
"json": { | ||
"formatter": { | ||
"trailingCommas": "all", | ||
}, | ||
"parser": { | ||
"allowComments": true, | ||
"allowTrailingCommas": true, | ||
}, | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,106 @@ | ||
[build-system] | ||
build-backend = "hatchling.build" | ||
requires = [ "hatch-vcs", "hatchling" ] | ||
|
||
[project] | ||
name = 'anndata2ri' | ||
name = "anndata2ri" | ||
readme = "README.rst" | ||
authors = [ | ||
{ name = 'Philipp A.', email = '[email protected]' }, | ||
{ name = "Philipp A.", email = "[email protected]" }, | ||
] | ||
readme = 'README.rst' | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: R', | ||
'Topic :: Scientific/Engineering :: Bio-Informatics', | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: R", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
] | ||
urls.'Documentation' = 'https://icb-anndata2ri.readthedocs-hosted.com/' | ||
urls.'Source Code' = 'https://github.com/theislab/anndata2ri' | ||
urls.'Issue Tracker' = 'https://github.com/theislab/anndata2ri/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc' | ||
dynamic = ['version'] | ||
requires-python = '>= 3.9' | ||
dynamic = [ "version" ] | ||
dependencies = [ | ||
'rpy2 >= 3.5.2', # first with get_conversion | ||
'tzlocal', # for pandas2ri | ||
'anndata', | ||
"anndata", | ||
"rpy2>=3.5.2", # first with get_conversion | ||
"tzlocal", # for pandas2ri | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = ['pre-commit', 'setuptools-scm'] | ||
test = [ | ||
'pytest', | ||
'pytest-faulthandler', | ||
'pygments', | ||
'scanpy', | ||
optional-dependencies.dev = [ "pre-commit", "setuptools-scm" ] | ||
optional-dependencies.doc = [ | ||
"lxml", # For scraping the R link info | ||
"scanpydoc[theme,typehints]", | ||
"sphinx>=3", | ||
] | ||
doc = [ | ||
'sphinx>=3.0', | ||
'scanpydoc[theme,typehints]', | ||
'lxml', # For scraping the R link info | ||
optional-dependencies.test = [ | ||
"pygments", | ||
"pytest", | ||
"pytest-faulthandler", | ||
"scanpy", | ||
] | ||
urls.'Documentation' = "https://icb-anndata2ri.readthedocs-hosted.com/" | ||
urls.'Issue Tracker' = "https://github.com/theislab/anndata2ri/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc" | ||
urls.'Source Code' = "https://github.com/theislab/anndata2ri" | ||
|
||
[tool.hatch.version] | ||
source = 'vcs' | ||
raw-options = { local_scheme = 'no-local-version' } # be able to publish dev version | ||
source = "vcs" | ||
raw-options = { local_scheme = "no-local-version" } # be able to publish dev version | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = 'src/anndata2ri/_version.py' | ||
version-file = "src/anndata2ri/_version.py" | ||
|
||
[tool.hatch.envs.default] | ||
installer = 'uv' | ||
installer = "uv" | ||
|
||
[tool.hatch.envs.docs] | ||
features = ['doc'] | ||
features = [ "doc" ] | ||
[tool.hatch.envs.docs.scripts] | ||
build = 'sphinx-build -M html docs docs/_build' | ||
build = "sphinx-build -M html docs docs/_build" | ||
|
||
[tool.hatch.envs.hatch-test] | ||
features = ['test'] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = [ | ||
'--import-mode=importlib', | ||
'-panndata2ri.test_utils', | ||
'-Werror', | ||
] | ||
features = [ "test" ] | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
[tool.ruff.lint] | ||
select = ['ALL'] | ||
ignore = [ | ||
'Q', # handled by formatter | ||
'ANN101', # self type doesn’t need to be annotated | ||
'C408', # dict() calls are nice | ||
'COM812', # trailing commas handled by black | ||
'D203', # prefer 0 to 1 blank line before class members | ||
'D213', # prefer docstring summary on first line | ||
'FIX002', # “TODO” comments | ||
'PLR0913', # having many (kw)args is fine | ||
'S101', # asserts are fine | ||
format.quote-style = "single" | ||
lint.select = [ "ALL" ] | ||
lint.ignore = [ | ||
"ANN101", # self type doesn’t need to be annotated | ||
"C408", # dict() calls are nice | ||
"COM812", # trailing commas handled by black | ||
"D203", # prefer 0 to 1 blank line before class members | ||
"D213", # prefer docstring summary on first line | ||
"FIX002", # “TODO” comments | ||
"PLR0913", # having many (kw)args is fine | ||
"Q", # handled by formatter | ||
"S101", # asserts are fine | ||
] | ||
allowed-confusables = ['’', '×'] | ||
[tool.ruff.lint.per-file-ignores] | ||
'**/*.ipynb' = [ | ||
'T201', # Allow print in notebooks | ||
'F821', # `%%R -o` means that ruff doesn’t understand which variables exist | ||
lint.per-file-ignores.'**/*.ipynb' = [ | ||
"F821", # `%%R -o` means that ruff doesn’t understand which variables exist | ||
"T201", # Allow print in notebooks | ||
] | ||
'src/**/*.py' = ['PT'] # No Pytest checks | ||
'docs/**/*.py' = ['INP001'] # No __init__.py in docs | ||
'tests/**/*.py' = [ | ||
'INP001', # No __init__.py in tests | ||
'D100', # test modules don’t need docstrings | ||
'D103', # tests don’t need docstrings | ||
'PD901', # “df” is a fine var name in tests | ||
'PLR2004', # magic numbers are fine in tests | ||
lint.per-file-ignores.'docs/**/*.py' = [ "INP001" ] # No __init__.py in docs | ||
lint.per-file-ignores.'src/**/*.py' = [ "PT" ] # No Pytest checks | ||
lint.per-file-ignores.'tests/**/*.py' = [ | ||
"D100", # test modules don’t need docstrings | ||
"D103", # tests don’t need docstrings | ||
"INP001", # No __init__.py in tests | ||
"PD901", # “df” is a fine var name in tests | ||
"PLR2004", # magic numbers are fine in tests | ||
] | ||
[tool.ruff.lint.isort] | ||
known-first-party = ['anndata2ri'] | ||
lines-after-imports = 2 | ||
[tool.ruff.format] | ||
quote-style = 'single' | ||
lint.allowed-confusables = [ "×", "’" ] | ||
lint.isort.known-first-party = [ "anndata2ri" ] | ||
lint.isort.lines-after-imports = 2 | ||
|
||
[build-system] | ||
requires = ['hatchling', 'hatch-vcs'] | ||
build-backend = 'hatchling.build' | ||
[tool.pyproject-fmt] | ||
indent = 4 | ||
|
||
[tool.pytest.ini_options] | ||
addopts = [ | ||
"--import-mode=importlib", | ||
"-panndata2ri.test_utils", | ||
"-Werror", | ||
] |