jupyter_releaser icon indicating copy to clipboard operation
jupyter_releaser copied to clipboard

Release mono-repo requiring sub-package released version

Open davidbrochart opened this issue 3 years ago • 10 comments
trafficstars

Problem

Jupyverse is a Python mono-repo consisting of a "main" jupyverse package and a bunch of "sub-packages" in plugins (fps-contents, fps-kernels, etc.). When releasing e.g. 0.1.0, I would like jupyverse to depend on sub-packages with version ==0.1.0 too. But I cannot pin them in setup.cfg, because at the time of release these sub-packages would not have been released yet. Maybe I'm missing something?

davidbrochart avatar Sep 02 '22 07:09 davidbrochart

Right now we are releasing the files in alphabetical order. We could inspect the dist files' dependencies and release them in dependent order.

blink1073 avatar Sep 02 '22 14:09 blink1073

Yes, but I would still need to make a commit with the sub-package pinning that wouldn't pass the tests, because they would not have been released yet.

davidbrochart avatar Sep 02 '22 14:09 davidbrochart

Right, for the commit that updates the versions. I don't see a way around that unless you make a local file that has the next version mapping and the have the version bump use that during release.

blink1073 avatar Sep 02 '22 14:09 blink1073

That would work. The release order could also come from this file.

davidbrochart avatar Sep 02 '22 14:09 davidbrochart

Interesting idea, a release manifest file.

blink1073 avatar Sep 02 '22 14:09 blink1073

Couldn't we just make the python_packages option play that role? Since it's a list, we could respect the order when releasing, and add dependencies. For instance (I reduced the number of sub-packages):

python_packages = [
    "plugins/auth:fps-auth",
    "plugins/contents:fps-contents",
    ".:jupyverse:fps-auth,fps-contents"
]

Means jupyverse needs the "just-released" versions of fps-auth and fps-contents. But that means the releaser must change jupyverse's setup.cfg or whatever file its dependencies are listed in, to add the pinning.

davidbrochart avatar Sep 02 '22 15:09 davidbrochart

Oooh, I like the idea of using that for the order. I'd suggest upgrading to pyproject.toml and adding a general capability to update versions using a manifest file. You can use hatch new --init to automatically convert to hatch.

blink1073 avatar Sep 02 '22 15:09 blink1073

If you want to stick with setuptools, you can use https://github.com/abravalheri/ini2toml

blink1073 avatar Sep 02 '22 15:09 blink1073

Thanks, I'll look at that next week, have a great week-end Steve!

davidbrochart avatar Sep 02 '22 15:09 davidbrochart

You too!

blink1073 avatar Sep 02 '22 15:09 blink1073