jupyter-server / jupyter_releaser

A set of helper scripts and GitHub Actions to aid in automated releases of Python and npm packages.
https://jupyter-releaser.readthedocs.io/en/latest/
Other
53 stars 66 forks source link

check_release fails in jupyverse #571

Closed davidbrochart closed 7 months ago

davidbrochart commented 7 months ago

Description

This probably happened with recent changes, see here.

  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/cli.py", line 381, in bump_version
    package_path, package_name = (
ValueError: too many values to unpack (expected 2)
jtpio commented 7 months ago

Looks like this is related to https://github.com/jupyter-server/jupyter_releaser/pull/570, which modified line 381 of cli.py (cc @krassowski)

krassowski commented 7 months ago

Thanks for the ping, I opened https://github.com/jupyter-server/jupyter_releaser/pull/572.

This comes from jupyverse having a package configured with two colons: '.:jupyverse:jupyverse_api,fps-noauth,fps-auth,fps-auth-fief,fps-auth-jupyterhub,fps-contents,fps-jupyterlab,fps-kernels,fps-lab,fps-frontend,fps-nbconvert,fps-notebook,fps-terminals,fps-yjs,fps-resource-usage,fps-webdav'.

What is the second colon used for? While my PR will fix the bug in the code, it is not clear to me if it will work with the spec like above. Is the usage like that documented somewhere?

davidbrochart commented 7 months ago

Hmm not sure it's documented, but if I remember correctly the following means:

[tool.jupyter-releaser.options]
python_packages = [
    "jupyverse_api:jupyverse_api",
    "plugins/noauth:fps-noauth",
    "plugins/auth:fps-auth",
    "plugins/auth_fief:fps-auth-fief",
    "plugins/auth_jupyterhub:fps-auth-jupyterhub",
    "plugins/contents:fps-contents",
    "plugins/frontend:fps-frontend",
    "plugins/jupyterlab:fps-jupyterlab",
    "plugins/kernels:fps-kernels",
    "plugins/lab:fps-lab",
    "plugins/nbconvert:fps-nbconvert",
    "plugins/notebook:fps-notebook",
    "plugins/terminals:fps-terminals",
    "plugins/yjs:fps-yjs",
    "plugins/resource_usage:fps-resource-usage",
    "plugins/login:fps-login",
    "plugins/webdav:fps-webdav",
    ".:jupyverse:jupyverse_api,fps-noauth,fps-auth,fps-auth-fief,fps-auth-jupyterhub,fps-contents,fps-jupyterlab,fps-kernels,fps-lab,fps-frontend,fps-nbconvert,fps-notebook,fps-terminals,fps-yjs,fps-resource-usage,fps-webdav"
]

that there is a Python package in directory:

IIRC the dependencies given in the last line indicate that these packages are built locally, not coming from PyPI. There was this issue for more background. I'm also thinking about a custom releaser for Jupyverse, so I'm not sure if investing more time in jupyter-releaser is worth it. I don't really like the fact that every release of Jupyverse releases every plugin, even if there are no changes. I would like a package to not be released if nothing changed. Otherwise it kind of breaks SemVer, meaning that a major bump in a package would make a major bump in another package that actually didn't change. Also, releasing everything every time means more work on conda-forge, which is not fully automated.

krassowski commented 7 months ago

I would love to add a new field to the releaser allowing to bump and release an individual package. This would allow me to use it for jupyterlab-lsp monorepo too.