Skip to content

Commit 0e783e7

Browse files
committed
use hatchling and drop setup.[py,cfg]
1 parent cddd95c commit 0e783e7

File tree

136 files changed

+60
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+60
-94
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
4747
- name: Run mypy
4848
run: |
49-
python -m mypy cubed
49+
python -m mypy src/cubed

pyproject.toml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling>=1.17.1", "hatch-vcs"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "cubed"
7-
version = "0.21.0"
7+
dynamic = ["version"]
88
authors = [
99
{name = "Tom White", email = "[email protected]"},
1010
]
@@ -94,11 +94,15 @@ homepage = "https://github.com/cubed-dev/cubed"
9494
documentation = "https://tomwhite.github.io/cubed"
9595
repository = "https://github.com/cubed-dev/cubed"
9696

97+
[tool.hatch]
98+
version.source = "vcs"
99+
build.hooks.vcs.version-file = "src/cubed/version.py"
100+
97101
[tool.pytest.ini_options]
98102
filterwarnings = [
99103
"error::UserWarning",
100104
]
101-
testpaths = "cubed/tests"
105+
testpaths = "src/cubed/tests"
102106

103107
[tool.ruff]
104108
target-version = "py311"
@@ -145,3 +149,54 @@ known-third-party = [
145149
"toolz",
146150
"zarr",
147151
]
152+
153+
[tool.mypy]
154+
exclude = "tests|doc"
155+
files = "src/"
156+
show_error_codes = true
157+
allow_redefinition = true
158+
159+
[[tool.mypy.overrides]]
160+
# Ignore vendored libraries
161+
modules = "mypy-cubed.vendor.*"
162+
ignore_errors = true
163+
164+
[[tool.mypy.overrides]]
165+
# Most of the numerical computing stack doesn't have type annotations yet.
166+
module = [
167+
"mypy-apache_beam.*",
168+
"mypy-aiostream.*",
169+
"mypy-array_api_compat.*",
170+
"mypy-cloudpickle.*",
171+
"mypy-coiled.*",
172+
"mypy-dask.*",
173+
"mypy-donfig.*",
174+
"mypy-distributed.*",
175+
"mypy-fsspec.*",
176+
"mypy-icechunk.*",
177+
"mypy-lithops.*",
178+
"mypy-IPython.*",
179+
"mypy-memray.*",
180+
"mypy-modal.*",
181+
"mypy-matplotlib.*",
182+
"mypy-ndindex.*",
183+
"mypy-networkx.*",
184+
"mypy-numcodecs.*",
185+
"mypy-numpy.*",
186+
"mypy-obstore.*",
187+
"mypy-pandas.*",
188+
"mypy-psutil.*",
189+
"mypy-pytest.*",
190+
"mypy-ray.*",
191+
"mypy-rechunker.*",
192+
"mypy-seaborn.*",
193+
"mypy-six.*",
194+
"mypy-tenacity.*",
195+
"mypy-tensorstore.*",
196+
"mypy-tlz.*",
197+
"mypy-toolz.*",
198+
"mypy-tqdm.*",
199+
"mypy-zarr.*",
200+
"mypy-pyspark.*",
201+
]
202+
ignore_missing_imports = true

setup.cfg

Lines changed: 0 additions & 79 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)