Skip to content

Commit 853eae5

Browse files
authored
use hatch-vcs (#25)
1 parent 2fdbb1e commit 853eae5

File tree

3 files changed

+13
-28
lines changed

3 files changed

+13
-28
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mydask.png
1010
dask-hlg.svg
1111

1212
# setuptools_scm generated
13-
src/dask_histogram/_version.py
13+
src/dask_histogram/version.py
1414

1515
# Byte-compiled / optimized / DLL files
1616
__pycache__/

pyproject.toml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[build-system]
2-
requires = [
3-
"hatchling>=1.8.0",
4-
]
2+
requires = ["hatchling>=1.8.0", "hatch-vcs"]
53
build-backend = "hatchling.build"
64

75
[project]
@@ -31,9 +29,7 @@ dependencies = [
3129
"boost-histogram>=1.2.0",
3230
"dask>=2021.03.0",
3331
]
34-
dynamic = [
35-
"version",
36-
]
32+
dynamic = ["version"]
3733

3834
[project.optional-dependencies]
3935
complete = [
@@ -62,33 +58,27 @@ Documentation = "https://dask-histogram.readthedocs.io/"
6258
"Bug Tracker" = "https://github.com/dask-contrib/dask-histogram/issues"
6359

6460
[tool.hatch.version]
61+
source = "vcs"
6562
path = "src/dask_histogram/__init__.py"
6663

64+
[tool.hatch.build.hooks.vcs]
65+
version-file = "src/dask_histogram/version.py"
66+
6767
[tool.hatch.build.targets.sdist]
68-
include = [
69-
"/src",
70-
]
68+
include = ["/src"]
7169

7270
[tool.pytest.ini_options]
7371
addopts = "-v"
74-
testpaths = [
75-
"tests",
76-
]
72+
testpaths = ["tests"]
7773

7874
[tool.isort]
7975
profile = "black"
8076
line_length = 88
81-
src_paths = [
82-
"src",
83-
"tests",
84-
]
77+
src_paths = ["src", "tests"]
8578

8679
[tool.mypy]
8780
python_version = "3.8"
88-
files = [
89-
"src",
90-
"tests",
91-
]
81+
files = ["src", "tests"]
9282
warn_unused_configs = true
9383
show_error_codes = true
9484
allow_incomplete_defs = false
@@ -100,9 +90,7 @@ warn_unused_ignores = true
10090
warn_unreachable = true
10191

10292
[[tool.mypy.overrides]]
103-
module = [
104-
"tlz.*",
105-
]
93+
module = ["tlz.*"]
10694
ignore_missing_imports = true
10795

10896
[tool.pydocstyle]

src/dask_histogram/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55

66
from dask_histogram.core import AggHistogram, PartitionedHistogram, factory
77
from dask_histogram.routines import histogram, histogram2d, histogramdd
8-
9-
__version__ = "2022.8.0"
10-
version_info = tuple(__version__.split("."))
11-
8+
from dask_histogram.version import __version__
129

1310
axis = _axis
1411
"""

0 commit comments

Comments
 (0)