Skip to content

Commit

Permalink
build: dynmic versioning in mono-repo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperDramsch committed Dec 20, 2024
1 parent b24c521 commit 7d35b63
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,10 @@ urls.Repository = "https://github.com/ecmwf/anemoi-graphs/"
scripts.anemoi-graphs = "anemoi.graphs.__main__:main"

[tool.setuptools_scm]
root = ".."
version_scheme = "post-release"
local_scheme = "no-local-version"
git_describe_command = "git describe --dirty --tags --long --match 'graphs-*[0-9]*'"
tag_regex = "^graphs-(?P<version>[vV]?[0-9]+[^-]*)"
version_file = "src/anemoi/graphs/_version.py"
fallback_version = "0.0.0"
7 changes: 7 additions & 0 deletions models/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,11 @@ urls.Repository = "https://github.com/ecmwf/anemoi-models/"
scripts.anemoi-models = "anemoi.models.__main__:main"

[tool.setuptools_scm]

root = ".."
version_scheme = "post-release"
local_scheme = "no-local-version"
git_describe_command = "git describe --dirty --tags --long --match 'models-*[0-9]*'"
tag_regex = "^models-(?P<version>[vV]?[0-9]+[^-]*)"
version_file = "src/anemoi/models/_version.py"
fallback_version = "0.0.0"
6 changes: 6 additions & 0 deletions training/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ scripts.".anemoi-training-train" = "anemoi.training.commands.train:main"
scripts.anemoi-training = "anemoi.training.__main__:main"

[tool.setuptools_scm]
root = ".." # Points to the root of the monorepo
version_scheme = "post-release"
local_scheme = "no-local-version"
git_describe_command = "git describe --dirty --tags --long --match 'training-*[0-9]*'"
tag_regex = "^training-(?P<version>[vV]?[0-9]+[^-]*)"
version_file = "src/anemoi/training/_version.py"
fallback_version = "0.0.0"

[tool.ruff]
target-version = "py39"
Expand Down

0 comments on commit 7d35b63

Please sign in to comment.