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
Switch to hatch backend #12606
Switch to hatch backend #12606
Conversation
Thanks for making a pull request to jupyterlab! |
@fcollonval I'm not super familiar with the Galata tests, any idea what is going wrong there? |
I think it might have been due to differences in files including in the sdists. I have one more issue to work though - the |
WIP migration script |
package = None | ||
|
||
# Try getting the package name from pyproject.toml | ||
if os.path.exists(os.path.join(mod_path, "pyproject.toml")): |
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.
This looks like it would fix the issue noticed in jupyter/notebook#6425 (comment) 👍
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.
I ended up adding a setup.py shim to projects to avoid needing to backport fixes
49d435b
to
26f807c
Compare
Update: it looks like this approach is going to work. I've tested Next steps as I see them are to:
|
We should be able to remove this check after adding |
Co-authored-by: Duc Trung Le <leductrungxf@gmail.com>
Thanks Trung - let's see if the CI is happy. Then I'll clean up the exceptions for |
The issue with the schema file is that the build process builds the frontend packages before installing the python dependencies. So the schema file is generated without |
CI is now passing. |
@jtpio would you mind having a look? It is good to go for me. But as I did some changes I'll would appreciate another review. |
Just checked the releaser built assets and they look good. However Binder fails to build: https://mybinder.org/v2/gh/blink1073/jupyterlab/use-hatch?urlpath=lab-dev
|
I pushed a fix for the binder configuration. |
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 a lot @blink1073
Nice thanks @fcollonval 👍 |
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.
Looks good, thanks all!
We can make a new 4.0 pre-release right after merging this, since there are also other (rather big) changes that have not been released yet. |
References
cf jupyterlab/frontends-team-compass#146
Code changes
Updates python packaging infrastructure.
LSP packages and related plugins are explicitly removed from examples app and federated extensions.
The skip
lsp/status
request in logger for examples has been removed.User-facing changes
None
Backwards-incompatible changes
None
Steps
hatch_jupyter_builder
tojupyterlab
org.hatch_jupyter_builder
onconda-forge
.hatch init --new
to do the heavy liftingflake8
config fromsetup.cfg
to a new.flake8
filejupyter-packaging
config inpyproject.toml
to equivalenthatch_jupyter_builder
confignpm_builder
config insetup.py
and convert it toeditable-build-kwargs
config forhatch_jupyter_builder
.gitignore
that are in the package folder and suggest them asartifacts
config for inclusion (commented out with a note)hatch_jupyter_builder
. It should operate in a temporary virtual environment so it doesn't add any requirements tohatch_jupyter_builder
. See docsextension-cookiecutter-ts
jupyterlab
- need a shimsetup.py
for older JupyterLabs.extension-cookiecutter-js
widget-ts-cookiecutter