-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix for #921: unifies versioning between JS and Python libraries #923
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timkpaine
approved these changes
Feb 14, 2020
sc1f
commented
Feb 14, 2020
…nc version between JS and Python
@texodus this is ready to go! |
texodus
approved these changes
Feb 20, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Looks good!
@@ -12,13 +12,9 @@ const {execute} = require("./script_utils.js"); | |||
try { | |||
execute`mkdirp docs/build docs/obj`; | |||
const project = process.env.PSP_PROJECT; | |||
if (!project || project === "js") { | |||
if (!project || project === "js" || project === "python") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prob don't need js anymore here either due to #912
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Feature requests or improvements
internal
Internal refactoring and code quality improvement
Python
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes our long-standing issue with Python versioning, Bumpversion, and assorted versioning quirks.
By replacing
bumpversion
with a task run as part of Lerna's lifecycle script, the semantics around maintaining two separate versioning configurations are removed.Instead, the
version
script reads the version ofpackage.json
in the Python folder, which (at the time the lifecycle script runs) will have been updated to the new version specified inlerna publish
orlerna version
._version.py
will have the version string written into it exactly as specified inpackage.json
, andPerspectiveWidget
will look for the EXACT version as specified in_version.py
when it is loaded in Jupyterlab.Thus, a distribution with mismatched versions between Python and Javascript will break the Jupyterlab widget, and a distribution that does not use
lerna version
orlerna publish
as one of its steps will NOT have the version number reflected in_version.py
. In short, Python distributions now must happen in lock-step with Javascript distributions, and with the exact same version string between the two distributions.Changelog
version
frompackage.json
PerspectiveWidget
now reads__version__
from_version.py
docs
task and Sphinx config now read__version__
setup.py
now reads__version__