Conversation
timkpaine
approved these changes
Feb 14, 2020
sc1f
commented
Feb 14, 2020
…nc version between JS and Python
Member
|
@texodus this is ready to go! |
texodus
approved these changes
Feb 20, 2020
Member
texodus
left a comment
There was a problem hiding this comment.
Thanks for the PR! Looks good!
| execute`mkdirp docs/build docs/obj`; | ||
| const project = process.env.PSP_PROJECT; | ||
| if (!project || project === "js") { | ||
| if (!project || project === "js" || project === "python") { |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
bumpversionwith a task run as part of Lerna's lifecycle script, the semantics around maintaining two separate versioning configurations are removed.Instead, the
versionscript reads the version ofpackage.jsonin the Python folder, which (at the time the lifecycle script runs) will have been updated to the new version specified inlerna publishorlerna version._version.pywill have the version string written into it exactly as specified inpackage.json, andPerspectiveWidgetwill look for the EXACT version as specified in_version.pywhen 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 versionorlerna publishas 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
versionfrompackage.jsonPerspectiveWidgetnow reads__version__from_version.pydocstask and Sphinx config now read__version__setup.pynow reads__version__