-
Notifications
You must be signed in to change notification settings - Fork 392
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
Update the development environment #1156
Changes from 4 commits
7d55598
ca0a1e7
51a2625
af66065
f5d5fe5
7cab8d1
cd2f9aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,14 @@ Most of Jupytext's code is written in Python. To develop the Python part of Jupy | |
``` | ||
conda env create --file environment.yml # or conda env update --file ... | ||
conda activate jupytext-dev | ||
python -m ipykernel install --name jupytext-dev --user | ||
pip install -e . | ||
``` | ||
|
||
We use the [pre-commit](https://pre-commit.com) package to run pre-commit scripts like `black` and `flake8` on the code. | ||
Install the `jupytext` package in development mode with | ||
``` | ||
pip install '.[dev]' | ||
``` | ||
|
||
We use the [pre-commit](https://pre-commit.com) package to run pre-commit scripts like `black` and `ruff` on the code. | ||
Install it with | ||
``` | ||
pre-commit install | ||
|
@@ -37,19 +40,19 @@ Tests are executed with `pytest`. You can run them in parallel with for instance | |
pytest -n 5 | ||
``` | ||
|
||
Build the `jupytext` package and install it with | ||
Some tests require a Jupyter kernel pointing to the current environment: | ||
``` | ||
pip install -U build wheel | ||
python -m build | ||
pip install dist/jupytext-x.x.x-py3-none-any.whl | ||
python -m ipykernel install --name jupytext-dev --user | ||
``` | ||
|
||
or with | ||
Finally, you can build the package and install it with | ||
``` | ||
pip install . | ||
pip install -U build wheel | ||
python -m build | ||
pip install dist/jupytext-x.x.x-py3-none-any.whl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just out of curiosity, why build a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well I am afraid it just tells that I know so little about wheels and tars etc. Before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, ok I see. Yes, now we build the extension always, so we can directly do editable installs! |
||
``` | ||
|
||
Finally, note that you can use `HATCH_BUILD_HOOKS_ENABLE=false` if you don't need the lab extension - the build time will be slightly shorter. | ||
Note that you can use `HATCH_BUILD_HOOKS_ENABLE=false` if you don't need the lab extension - the build time will be slightly shorter. | ||
|
||
## Jupytext's extension for JupyterLab | ||
|
||
|
This file was deleted.
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 guess you are missing a
editable
flag here?pip install -e '.[dev]'
?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.
Oh yes you're right! Thanks