Skip to content

Commit dbfb319

Browse files
committed
build: switch to a static PSR-owned version, drop hatch-vcs
1 parent 6b77272 commit dbfb319

3 files changed

Lines changed: 33 additions & 30 deletions

File tree

CITATION.cff

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
cff-version: 1.1.0
1+
cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
3+
type: software
4+
title: "OpenSemanticWorld Python Package (osw-python)"
5+
# Managed by python-semantic-release (version_variables). Do not edit by hand.
6+
version: 1.1.2
7+
abstract: "Python toolset for data processing, queries, wikicode generation and page manipulation within OpenSemanticLab: work with OpenSemanticLab instances as typed pydantic entities, query with semantic search, generate models from wiki schemas, and write changes back."
8+
repository-code: "https://github.com/OpenSemanticLab/osw-python"
9+
url: "https://opensemanticlab.github.io/osw-python/"
10+
doi: 10.5281/zenodo.7799493
11+
# Authors listed here are the creators shown on each Zenodo release.
12+
# Listing is opt-in: open a PR to be added.
313
authors:
414
- family-names: Stier
515
given-names: Simon
6-
orcid: https://orcid.org/0000-0003-0410-3616
16+
orcid: "https://orcid.org/0000-0003-0410-3616"
717
- family-names: Gold
818
given-names: Lukas
9-
orcid: https://orcid.org/0000-0001-7444-2969
19+
orcid: "https://orcid.org/0000-0001-7444-2969"
1020
- family-names: Räder
1121
given-names: Andreas
12-
orcid: https://orcid.org/0000-0002-2673-0832
13-
title: OpenSemanticWorld Python Package (osw-python)
22+
orcid: "https://orcid.org/0000-0002-2673-0832"

pyproject.toml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ readme = "README.md"
66
license = "AGPL-3.0-or-later"
77
license-files = ["LICENSE.txt"]
88
requires-python = ">=3.10,<3.14"
9-
dynamic = ["version"]
9+
# Managed by python-semantic-release (see [tool.semantic_release]). Do not
10+
# edit by hand; it is bumped automatically on merge to main.
11+
version = "1.1.2"
1012
classifiers = [
1113
"Development Status :: 3 - Alpha",
1214
"Intended Audience :: Developers",
@@ -80,15 +82,9 @@ tutorial = ["osw[dataimport]"]
8082
all = ["osw[dataimport,DB,UI,S3,wikitext]"]
8183

8284
[build-system]
83-
requires = ["hatchling", "hatch-vcs"]
85+
requires = ["hatchling"]
8486
build-backend = "hatchling.build"
8587

86-
[tool.hatch.version]
87-
source = "vcs"
88-
# Preserve the setuptools-scm scheme the project used previously so tag-derived
89-
# versions are identical (e.g. 1.1.2.post1.dev25+g<sha>).
90-
raw-options = { version_scheme = "no-guess-dev" }
91-
9288
[dependency-groups]
9389
dev = [
9490
# test stack
@@ -268,18 +264,24 @@ ignore = [
268264
preview = true
269265

270266
[tool.semantic_release]
271-
# No version_toml/version_variables: the package version is derived from
272-
# the git tag by hatch-vcs, so semantic-release only computes the next
273-
# version from the conventional commits, updates the changelog, commits,
274-
# tags (vX.Y.Z) and creates the GitHub release. Publishing to PyPI happens
275-
# in the same workflow run (on-release-main.yml).
267+
# python-semantic-release owns the version: it reads the conventional commits
268+
# on main, bumps the static version below and in CITATION.cff, updates the
269+
# changelog, relocks uv.lock, commits, tags (vX.Y.Z) and creates the GitHub
270+
# release. Publishing to PyPI happens in the same workflow run
271+
# (on-release-main.yml).
276272
commit_parser = "conventional"
277273
tag_format = "v{version}"
278274
commit_message = "chore(release): v{version} [skip ci]"
279275
# our history starts at v0.x; without this, PSR would jump a 0.x baseline
280276
# straight to 1.0.0 (moot at >=1.0.0, kept for copy-paste safety)
281277
allow_zero_version = true
282278
exclude_commit_patterns = ['''chore\(release\):.*''']
279+
version_toml = ["pyproject.toml:project.version"]
280+
version_variables = ["CITATION.cff:version"]
281+
# relock so uv.lock's own pin of osw's version stays consistent, and include
282+
# the relocked file in the release commit
283+
build_command = "uv lock"
284+
assets = ["uv.lock"]
283285

284286
[tool.semantic_release.changelog]
285287
# prepend new versions at the insertion flag, keep the manual history below

uv.lock

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)