-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use Hatch Environments and Scripts #239
Use Hatch Environments and Scripts #239
Conversation
Thanks a lot @RobertRosca! |
Part of this is the Hatch syntax. You need a colon between the environment name and the command to be executed, like But that also doesn't work thanks to come copy/paste fumbling from me 😛, problem was: [tool.hatch.envs.dev.scripts]
jupyverse = "fps_uvicorn.cli:app"
...
[project.scripts]
jupyverse = "fps_uvicorn.cli:app" This meant that the
I've fixed that now, could you give it another go? Didn't notice either of these issues since I forgot to run |
Awesome, that works! |
It looks like pypa/hatch#484 has been merged and released. |
Hey, sorry for the delay, was busy with work last week. I'm debugging the test failures locally, Related to that, I'm using act to run tests locally and there is a bug in the setup-miniconda action which means that it fails local executions without setting the version explicitly, which is why I have set it to |
df2bc3d
to
c57fe81
Compare
c57fe81
to
fb74562
Compare
1b64d9a
to
3d307fe
Compare
This looks great @RobertRosca, this will improve Jupyverse's workflow management so much!
|
7c730fc
to
7d1be30
Compare
Oops, screwed up when rebasing and re-introduced #239 (comment) It should work now, could you give it another go? |
Yes, it works fine now! |
Just a minor update to docs, and I think it's good to go! |
Oh yes, I'll go ahead and do that |
Update docs docs Add more details on hatch scripts
Add dev scripts for test, lint, and typecheck
editable dependencies
Signed-off-by: Robert Rosca <32569096+RobertRosca@users.noreply.github.com>
for more information, see https://pre-commit.ci
16213fc
to
c4a4748
Compare
Could also just do a squash merge, don't think anything too important would be lost from the commit log from this |
I think you deserve more credit, thanks a lot for your contribution @RobertRosca ! |
Awesome job! |
PR implements some of the Hatch features mentioned in #209, main ones are:
dev
environment is a matrix currently made up of the all combinations of frontends['lab', 'retro']
and authentication plugins['noauth', 'auth', 'fief]
hatch run dev.lab-noauth:jupyverse
spawns jupyverse with jupyterlab with noauth,hatch run dev.retro-fief:jupyverse
is retro with fief auth, etc...hatch run docs:serve
Docs were updated to explain the above.
Right now this isn't ideal as using context formatting to specify the plugins as dependencies for development didn't work, since Hatch doesn't have an easy mechanism for creating environments with editable dependency installations. So for now this is done with pre/post install commands running
pip install
on the required plugins.I've started a discussion on the Hatch repo here pypa/hatch#516 to see if a PR allowing for the easy definition of editable local dependencies would be accepted. If it is then I'd like to wait for that. and remove the workaround calling pip install in the pre/post script sections.
Still to do:
Closes #209