You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, bump-version only offers one "versioning mode", a strategy to bump versions of all packages underneath the repository: running version-cmd inside of every Python package. Let us call this versioning mode per-python.
In monorepos such as Jupyter AI, we are using a single script that allows all package versions to be bumped with a single invocation run from the monorepo root. Without more configurability, the current behavior of Jupyter Releaser wastefully runs version-cmd for every Python package under the monorepo, rather than just running it once from the root.
Proposed Solution
Add a new version-mode option that allows two values: per-python and monorepo.
version-mode is respected first. If set to per-python, it will ignore monorepo-specific options, and vice versa.
python_packages is a per-python version mode specific option, and will be ignored if version-mode is set to monorepo.
There are currently no monorepo specific options I suggest.
When version-mode is set to per-python, the existing behavior is preserved.
When version-mode is unspecified, we default to per-python.
When version-mode is set to monorepo, then we only run version-cmd once at the repository root.
This proposal is also easily extensible. For example, if users wanted to run a command per Yarn workspace instead of per declared Python package, the solution would just involve adding a new versioning mode and its implementation.
Additional context
We are currently using lerna version to bump the NPM package versions and it works fairly well, though it has a lot of quirks. The killer feature is that it bumps versions of intra-monorepo dependencies. We're using hatch-nodejs-version to dynamically link the Python package version to the NPM package version.
The text was updated successfully, but these errors were encountered:
Problem
Right now,
bump-version
only offers one "versioning mode", a strategy to bump versions of all packages underneath the repository: runningversion-cmd
inside of every Python package. Let us call this versioning modeper-python
.In monorepos such as Jupyter AI, we are using a single script that allows all package versions to be bumped with a single invocation run from the monorepo root. Without more configurability, the current behavior of Jupyter Releaser wastefully runs
version-cmd
for every Python package under the monorepo, rather than just running it once from the root.Proposed Solution
Add a new
version-mode
option that allows two values:per-python
andmonorepo
.version-mode
is respected first. If set toper-python
, it will ignoremonorepo
-specific options, and vice versa.python_packages
is aper-python
version mode specific option, and will be ignored ifversion-mode
is set tomonorepo
.monorepo
specific options I suggest.When
version-mode
is set toper-python
, the existing behavior is preserved.When
version-mode
is unspecified, we default toper-python
.When
version-mode
is set tomonorepo
, then we only runversion-cmd
once at the repository root.This proposal is also easily extensible. For example, if users wanted to run a command per Yarn workspace instead of per declared Python package, the solution would just involve adding a new versioning mode and its implementation.
Additional context
We are currently using
lerna version
to bump the NPM package versions and it works fairly well, though it has a lot of quirks. The killer feature is that it bumps versions of intra-monorepo dependencies. We're usinghatch-nodejs-version
to dynamically link the Python package version to the NPM package version.The text was updated successfully, but these errors were encountered: