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

Fix for #921: unifies versioning between JS and Python libraries #923

Merged
merged 4 commits into from
Feb 20, 2020

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Feb 13, 2020

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 of package.json in the Python folder, which (at the time the lifecycle script runs) will have been updated to the new version specified in lerna publish or lerna version.

_version.py will have the version string written into it exactly as specified in package.json, and PerspectiveWidget 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 or lerna 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

  • Removes bumpversion and replaces it with a script that reads version from package.json
  • PerspectiveWidget now reads __version__ from _version.py
  • docs task and Sphinx config now read __version__
  • setup.py now reads __version__

@sc1f sc1f requested review from texodus and timkpaine February 13, 2020 19:50
@sc1f sc1f linked an issue Feb 13, 2020 that may be closed by this pull request
@timkpaine timkpaine added enhancement Feature requests or improvements Python labels Feb 17, 2020
@timkpaine
Copy link
Member

@texodus this is ready to go!

Copy link
Member

@texodus texodus left a 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") {
Copy link
Member

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

@texodus texodus merged commit 43af2a8 into master Feb 20, 2020
@texodus texodus deleted the fix-pyver branch February 20, 2020 02:44
@texodus texodus added the internal Internal refactoring and code quality improvement label Feb 26, 2020
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect semver for front end assets causing issues with voila
4 participants