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

Version piplite with the bump-version script #421

Merged
merged 4 commits into from Nov 25, 2021

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Nov 23, 2021

References

Fixes #420

Code changes

Update the bump-version.py script to version the packages, as a follow-up to #310.

User-facing changes

So the following code snippet:

import piplite
piplite.__version__

Gives a consistent version.

Backwards-incompatible changes

None

@jtpio jtpio added this to the 0.1.0 milestone Nov 23, 2021
@github-actions
Copy link
Contributor

lite-badge 👈 Try it on ReadTheDocs

@jtpio
Copy link
Member Author

jtpio commented Nov 23, 2021

Looks good testing locally with the releaser assets:

image

@@ -23,8 +23,9 @@

PYOLITE_PACKAGE = ROOT / "packages" / "pyolite-kernel"
PYOLITE_PACKAGE_JSON = PYOLITE_PACKAGE / "package.json"
PYOLITE_KERNEL_SOURCE = PYOLITE_PACKAGE / "src" / "kernel.ts"
PYPI_SOURCE = PYOLITE_PACKAGE / "src" / "_pypi.ts"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... this file gets generated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real source of truth migh tbe: https://github.com/jupyterlite/jupyterlite/blob/main/packages/pyolite-kernel/package.json#L69 (unless that's covered above)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this one is not needed actually, gonna double check.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets regenerated by doit build:js:piplite:wheels, so if that happens after this runs...

scripts/bump-version.py Outdated Show resolved Hide resolved

# bump pyolite version
pyolite_json = json.loads(PYOLITE_PACKAGE_JSON.read_text(**ENC))
pyolite_json["pyolite"]["packages"]["py/pyolite"] = py_version
pyolite_json["pyolite"]["packages"]["py/piplite"] = py_version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, is covered here

@jtpio
Copy link
Member Author

jtpio commented Nov 23, 2021

Also since this string search / replace is a bit brittle, it should probably just fail it if fails to do the replace. So the check release CI check would be able to catch future changes.

@jtpio jtpio marked this pull request as ready for review November 23, 2021 18:25
@jtpio
Copy link
Member Author

jtpio commented Nov 25, 2021

This seems to be looking good now. Let's merge and I'll make a release later today.

@jtpio jtpio merged commit 5f3971d into jupyterlite:main Nov 25, 2021
@jtpio jtpio deleted the version-piplite branch November 25, 2021 10:24
@jtpio jtpio mentioned this pull request Dec 1, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version piplite with the bump-version script
2 participants