Open
Conversation
88e6d1a to
e9d7688
Compare
Contributor
Author
|
fyi @franred this is the PR I mentioned last week! |
ab51a17 to
3966699
Compare
3966699 to
6a70d14
Compare
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.
Link to issue
Closes #5537
Description of change
setuptoolstohatchhatchis distributed by PyPA and has a number of advantages compared tosetuptools, including being newer and more modernpyproject.tomlconfig to work withhatch, and remove unused config sectionsMANIFEST.infile, since it's only required bysetuptools, not needed forhatchjs/package.jsonto reflect the correct version number matching plotly.py version, which we've forgotten to do for the last few releasesjs/webpack.config.jsto make lab extension build output identical across platforms, which fixes the false failure of the "Check JS build" workflowRELEASE.mdinstructions to add step to update version number injs/package.jsonjs/install.jsonfile which I believe are not neededNOTE: The build command remains the same:
python -m build .Demo
python-m-build.mov
When running
python -m build .locally, the output should look like the above.Testing strategy
I've added a CI step in
.github/workflows/check-js-build.ymlto check that the version number inpyproject.tomlmatches the version number injs/project.json, which should prevent the two from getting out of sync again.Show success case
Show failure case
However, we should verify manually that the resulting build is the same before and after these changes.
This can be done by checking out this branch, running
python -m build ., and comparing the.tar.gzand.whlfiles to the official 6.6.0 release artifacts.Additional information (optional)
Because we manually pre-build the assets for the JupyterLab extension (by running
npm run buildfrom thejs/directory, as documented in theCONTRIBUTING.md), we do not use any of thehatchbuild hooks settings in thepyproject.toml, so this PR removes them.The existing
.github/check-js-build.ymlstep builds the lab extension in CI and ensures that the output matches the build artifacts inplotly/labextension/.I don't like that this setup requires updating the version number in two places. But
package.jsondoesn't support dynamic version numbers, so the only way to set up a single source of truth would be for thepackage.jsonto be the single source of truth, andpyproject.tomlto load that version number dynamically. I don't like that for a Python project. But open to suggestions.Guidelines