forked from scverse/gget
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (159 loc) · 5.84 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (159 loc) · 5.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "gget"
version = "0.30.9"
description = "Efficient querying of genomic databases."
readme = "README.md"
keywords = [ "gget" ]
license = "BSD-2-Clause"
license-files = [ "LICENSE" ]
maintainers = [
{ name = "Laura Luebbert", email = "lauralubbert@gmail.com" },
]
authors = [
{ name = "Laura Luebbert", email = "lauralubbert@gmail.com" },
]
requires-python = ">=3.12"
classifiers = [
"Environment :: Console",
"Framework :: Jupyter",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Utilities",
]
dependencies = [
"beautifulsoup4>=4.10",
"ipython",
"ipywidgets",
"lxml",
"matplotlib",
"mysql-connector-python>=8.0.32",
"numpy>=1.17.2",
"pandas>=1",
"requests>=2.22",
"tqdm",
]
# Optional feature dependency for `gget cellxgene` (install: pip install gget[cellxgene]).
# No wheels for the newest Python versions yet (e.g. 3.14 via tiledbsoma).
# scanpy>=1.10 is pinned defensively, not because gget uses scanpy directly,
# but because tiledbsoma (cellxgene-census's dep) declares only `scanpy>=1.9.2`.
# Under certain resolver paths uv lands on scanpy 1.9.8, which transitively
# pins numba 0.53.1 and llvmlite 0.36.x — both of which only support Python 3.6-3.9.
optional-dependencies.cellxgene = [ "cellxgene-census", "scanpy>=1.10" ]
# https://docs.pypi.org/project_metadata/#project-urls
urls.Documentation = "https://pachterlab.github.io/gget"
urls.Homepage = "https://github.com/pachterlab/gget"
urls.Source = "https://github.com/pachterlab/gget"
scripts.gget = "gget.main:main"
[dependency-groups]
dev = [ "pre-commit" ]
test = [
"bravado==11.0.3",
"coverage>=7",
"mypy==1.13",
"mypy-baseline==0.7.4",
"openai<=0.28.1",
"pandas-stubs==3.0.3.260530",
"parameterized==0.9",
"pytest>=7",
"pytest-cov>=6.2.1",
"pytest-xdist>=3",
"types-beautifulsoup4==4.12.0.20250516",
"types-requests==2.33.0.20260518",
"types-tqdm==4.68.0.20260608",
]
[tool.hatch]
build.targets.wheel.packages = [ "gget" ]
envs.default.installer = "uv"
envs.hatch-test.matrix = [
{ python = [ "3.12", "3.13", "3.14" ] },
]
# cellxgene-census (the `cellxgene` extra) has no wheels for the newest Python
# versions yet (e.g. 3.14 via tiledbsoma), so install it only where available;
# the gget cellxgene test skips itself when the dependency is absent.
envs.hatch-test.overrides.matrix.python.features = [
{ value = "cellxgene", if = [ "3.12", "3.13" ] },
]
# pyproject.toml is the single source of truth for the environments CI tests:
# the workflow reads this matrix via `hatch env show --json`.
envs.hatch-test.default-args = [ "-n", "auto", "tests" ]
envs.hatch-test.dependency-groups = [ "test" ]
[tool.ruff]
line-length = 120
src = [ "gget" ]
extend-include = [ "*.ipynb" ]
format.docstring-code-format = true
lint.select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # Error detected by Pycodestyle
"F", # Errors detected by Pyflakes
"I", # isort
"RUF100", # Report unused noqa directives
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # Warning detected by Pycodestyle
]
lint.ignore = [
"B008", # Errors from function calls in argument defaults. These are fine when the result is immutable.
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # __magic__ methods are often self-explanatory, allow missing docstrings
"D107", # Missing docstring in __init__
# Disable one in each pair of mutually incompatible rules
"D203", # We don’t want a blank line before a class docstring
"D213", # <> We want docstrings to start immediately after the opening triple quote
"D400", # first line should end with a period [Bug: doesn’t work with single-line docstrings]
"D401", # First line should be in imperative mood; try rephrasing
"E501", # line too long -> we accept long comment lines; formatter gets rid of long code lines
"E731", # Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E741", # allow I, O, l as variable names -> I is the identity matrix
]
lint.per-file-ignores."*/__init__.py" = [ "F401" ]
lint.per-file-ignores."docs/*" = [ "I" ]
lint.per-file-ignores."tests/*" = [ "D" ]
lint.pydocstyle.convention = "numpy"
[tool.mypy]
files = [ "gget" ]
# `gget/constants.py` (module) coexists with `gget/constants/` (data dir, no
# __init__.py). Mypy's default namespace-package discovery treats the data dir
# as a namespace package and clashes with the module of the same name, so we
# disable namespace packages.
namespace_packages = false
ignore_missing_imports = true
follow_imports = "silent"
python_version = "3.12"
disallow_any_generics = false
disallow_untyped_defs = false
check_untyped_defs = false
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
[tool.pytest]
ini_options.testpaths = [ "tests" ]
ini_options.addopts = [ "-ra" ]
[tool.coverage]
run.omit = [
"**/test_*.py",
"gget/main.py",
]
run.source = [ "gget" ]
# mypy-baseline grandfathers the pre-existing type errors so the pre-commit
# mypy hook only fails on NEW errors. Refresh after fixing some with:
# mypy gget | mypy-baseline sync
[tool.mypy-baseline]
baseline_path = ".mypy-baseline.txt"
# Ignore mypy `note:` lines in the baseline. Notes are non-actionable context
# attached to errors, and mypy emits slightly different notes across platforms
# (the baseline is generated on macOS; CI runs on Linux), which would otherwise
# show up as spurious "new" violations.
ignore_categories = [ "note" ]