Skip to content

Commit 8cd34fe

Browse files
authored
build: move version to pyproject.toml (#252)
Fixes #250
1 parent 3409e0e commit 8cd34fe

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

pyproject.toml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ requires = [
1010

1111
[project]
1212
name = "python-re3data"
13+
version = "0.10.0"
1314
description = "The Pythonic client for the re3data API."
1415
readme = "README.md"
1516
keywords = [
@@ -39,9 +40,6 @@ classifiers = [
3940
"Topic :: Text Processing :: Markup :: XML",
4041
"Typing :: Typed",
4142
]
42-
dynamic = [
43-
"version",
44-
]
4543
dependencies = [
4644
"httpx>=0.27",
4745
"xsdata>=24.5",
@@ -98,9 +96,6 @@ packages = [
9896
"src/re3data",
9997
]
10098

101-
[tool.hatch.version]
102-
path = "src/re3data/__about__.py"
103-
10499
[tool.hatch.env]
105100
requires = [
106101
"hatch-pip-compile",
@@ -198,9 +193,6 @@ lint.ignore = [
198193
"D105", # undocumented-magic-method
199194
"D107", # undocumented-public-init
200195
]
201-
lint.per-file-ignores."src/re3data/__about__.py" = [
202-
"D100", # undocumented-public-module
203-
]
204196
lint.per-file-ignores."src/re3data/_resources/*.py" = [
205197
"D101", # undocumented-public-class
206198
"D106", # undocumented-public-nested-class
@@ -250,7 +242,6 @@ source = [
250242
"re3data",
251243
]
252244
omit = [
253-
"__about__.py",
254245
"__main__.py",
255246
]
256247

@@ -304,8 +295,8 @@ commit_author = "github-actions[bot] <41898282+github-actions[bot]@users.noreply
304295
commit_message = "chore: release {version}\n\nAutomatically generated by python-semantic-release [skip ci]"
305296
major_on_zero = false
306297
tag_format = "{version}"
307-
version_variables = [
308-
"src/re3data/__about__.py:__version__",
298+
version_toml = [
299+
"pyproject.toml:project.version",
309300
]
310301
build_command = '''
311302
sed -i "s/^version: .*/version: $NEW_VERSION/" CITATION.cff

src/re3data/__about__.py

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

src/re3data/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
"""python-re3data."""
66

7-
from re3data.__about__ import __version__
7+
from importlib.metadata import version
8+
9+
__version__: str = version("python-re3data")
10+
811
from re3data._client import AsyncClient, Client, ReturnType
912
from re3data._exceptions import Re3dataError, RepositoryNotFoundError
1013
from re3data._resources import Re3Data, Repository, RepositoryList, RepositorySummary

0 commit comments

Comments
 (0)