3DBAG / 3dbag-pipeline

3DBAG production pipeline
https://innovation.3dbag.nl/3dbag-pipeline
Apache License 2.0
4 stars 0 forks source link

Fix versioning in packages #72

Open balazsdukai opened 4 weeks ago

balazsdukai commented 4 weeks ago

Currently, packages are versioned in their own pyproject.toml. Versioning follows the CalVer schema, because that's what we use the 3DBAG data too. Each pyproject.toml contains bumpver configs such as below. This config create a tag for the whole monorepo, all packages, not just the package in question.

[tool.bumpver]
current_version = "2024.1004"
version_pattern = "YYYY.BUILD"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
tag = true
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = [
    'version = "{version}"',
]

How do we sort out versioning so that we can have:

balazsdukai commented 1 week ago

The current idea is that we tag the master branch after each 3DBAG release, with the same version as the 3DBAG release. Thus the 3dbag-pipeline versions follow the 3DBAG versions exactly, indicating that eg. version 2024.11.15 3dbag-pipeline was used for producing version 2024.11.15 3DBAG.

The 3dbag-pipeline is hosted only here on GH (not on pypi). So if a software depends on the pipeline, I see two viable options for adding it as a dependency:

The 3dbag-pipeline packages are always installed from the git HEAD of the current branch, using relative package paths. For example core depends on common and it would always install it from the current local branch (not from a remote branch of GH). In case of a pinned version, the version (tag or commit) is checked out and that is the version of common/core/etc. that is installed.

This would ease our development process, because we wouldn't need to keep changing the git tag of common to point it to the current branch and back to develop when we are working on fix/PR. Also, we don't actually need to pin common in the workflow packages. Since common is deeply integrated with the rest of the packages, we usually end up changing it when we work on a package, so we always need the last commit.

However, unfortunately pip does not support relative paths, so we won't be able to use pip anymore. But uv seem to support it, although I haven't tried it. If we do it with uv, then #75 needs to be done . Poetry does support relative dependencies, but Poetry is so 2020...