Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to hatch-vcs for versioning #4802

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[build-system]
requires = [
"hatchling>=1.13.0",
"hatch-vcs>=0.3.0",
]
build-backend = "hatchling.build"

[project]
name = "pybamm"
version = "25.1.1"
dynamic = ["version"]
license = { file = "LICENSE.txt" }
description = "Python Battery Mathematical Modelling"
authors = [{name = "The PyBaMM Team", email = "[email protected]"}]
Expand Down Expand Up @@ -50,6 +51,9 @@ Repository = "https://github.com/pybamm-team/PyBaMM"
Releases = "https://github.com/pybamm-team/PyBaMM/releases"
Changelog = "https://github.com/pybamm-team/PyBaMM/blob/develop/CHANGELOG.md"

[tool.hatch.version]
source = "vcs"
Comment on lines +54 to +55
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this down to the already existing tool.hatch section?

Suggested change
[tool.hatch.version]
source = "vcs"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/pybamm/_version.py"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll move it to the tool.hatch section.


[project.optional-dependencies]
docs = [
"sphinx>=6",
Expand Down
Loading