Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump top-level version on release #98

Closed
jtpio opened this issue Sep 26, 2023 · 11 comments · Fixed by #99 or #101
Closed

Bump top-level version on release #98

jtpio opened this issue Sep 26, 2023 · 11 comments · Fixed by #99 or #101

Comments

@jtpio
Copy link
Member

jtpio commented Sep 26, 2023

Attempting to make a release after #95 specifying 1.0.0 as the version spec creates a v0.6.1 draft GitHub Release:

image

This is likely related to the version specified in the top-level package.json:

"version": "0.6.1",

cc @mahendrapaipuri

@mahendrapaipuri
Copy link
Member

Hmm! That is strange. I will check it. Cheers for creating the issue!

@jtpio
Copy link
Member Author

jtpio commented Sep 26, 2023

Probably it's because the version is then read with the hatch version command, which picks up the version from the top-level package.json.

So maybe we can add the top-level path to python-packages here and that would to the bump automatically:

python-packages = [
"packages/logout-extension:jupyterlab_logout",
"packages/topbar-text-extension:jupyterlab_topbar_text",
"packages/theme-toggler-extension:jupyterlab_theme-toggler",
]

@mahendrapaipuri
Copy link
Member

That could be it. I will do some testing and put up a PR.

@mahendrapaipuri
Copy link
Member

I think your suggestion should fix it. Actually, we did include top level package in jupyter-releaser packages. But, we removed it eventually as it will create an unnecessary artifact.

@jtpio
Copy link
Member Author

jtpio commented Sep 26, 2023

Ah good catch. If it's not picked up by the releaser when publishing the packages then we could leave it since it should be private.

@mahendrapaipuri
Copy link
Member

Do you think it will be ignored when publishing? I have tried to test it on my fork without luck.

@jtpio jtpio closed this as completed in #99 Sep 26, 2023
@jtpio
Copy link
Member Author

jtpio commented Sep 26, 2023

So it does create the wheel and source dist, which are likely going to be published to PyPI automatically:

image

So maybe we could use a releaser hook to remove them so they are not picked up.

@jtpio jtpio reopened this Sep 26, 2023
@mahendrapaipuri
Copy link
Member

Cheers for testing it. You mean using a hook after-build-python to remove the wheel and source dist of jupyterlab_topbar_extensions*?

I guess we can avoid this whole situation by removing pyproject.toml from top level, right?! If I remember well, we are using it just to pass the jupyter-releaser config. Maybe we can move the config to package.json. Do you think it is better solution?

@jtpio
Copy link
Member Author

jtpio commented Sep 26, 2023

Yeah maybe there is a simpler way.

Maybe we can move the config to package.json. Do you think it is better solution?

Yes the releaser config can also be set in the top-level package.json. This would already simplify things.

One thing we need though is a way for the releaser to get the current version of the repo, so it shows up as the release title.

Another approach would be to do something similar to the Lumino repo and create a PR to bump versions, and then use the releaser to perform the release: https://github.com/jupyterlab/lumino.
This would also allow for bumping packages independently.

@mahendrapaipuri
Copy link
Member

Cheers for the pointer.

jupyter-releaser is also creating a top level empty npm package. I suppose we need to remove it as well?

Another approach would be to do something similar to the Lumino repo and create a PR to bump versions, and then use the releaser to perform the release: https://github.com/jupyterlab/lumino.
This would also allow for bumping packages independently.

If I look into the jupyter-releaser config of Lumino repo, they are not skipping bump-version step in the release workflow.

But I see your point. So, we bump versions manually in a PR and then run jupyter-releaser workflows by skipping bump-version step. In that case the artifacts will still be generated for the packages that are not bumped and potentially overwrite the existing ones in the PyPI and NPM. Do you think it is not an issue? Or Am I missing something?

@mahendrapaipuri
Copy link
Member

jupyter-releaser is also creating a top level empty npm package. I suppose we need to remove it as well?

Ignore this comment. This is not an issue as the top level package is marked as private and it does not generate dist file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants