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

Update the development environment #1156

Merged
merged 7 commits into from
Nov 11, 2023
Merged

Conversation

mwouts
Copy link
Owner

@mwouts mwouts commented Nov 9, 2023

No description provided.

Copy link
Contributor

@mahendrapaipuri mahendrapaipuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need to update the instructions for developing extension as well. This part is obselete. The command jupyter labextension develop --overwrite . does not work anymore due to the way we changed the organization of the repo. That is why I added a utility script to make a symlink of extension in dev mode. The docs of jupyter-server-proxy can be a good reference on updating the documentation of extension development.

Comment on lines 50 to 52
pip install -U build wheel
python -m build
pip install dist/jupytext-x.x.x-py3-none-any.whl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why build a wheel and install it instead of directly doing a pip install .?

Copy link
Owner Author

Choose a reason for hiding this comment

The 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 jupytext==1.16 I would use that to test the extension because the editable install would not include the extension, but from your comment it seems that I can remove that part, so I'll remove it!

Copy link
Contributor

Choose a reason for hiding this comment

The 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!

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]'
Copy link
Contributor

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]'?

Copy link
Owner Author

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

@mwouts
Copy link
Owner Author

mwouts commented Nov 9, 2023

I guess we need to update the instructions for developing extension as well. This part is obselete. The command jupyter labextension develop --overwrite . does not work anymore due to the way we changed the organization of the repo. That is why I added a utility script to make a symlink of extension in dev mode. The docs of jupyter-server-proxy can be a good reference on updating the documentation of extension development.

Nice ! The symlink is super helpful and it does make the development workflow much easier. I think that I will replace the obsolete paragraph with just pip install -e '.[dev]' then.

Also I'll revert the change on pandoc>=3.0 since it breaks the conda CI, I will look into that later on.

@mwouts mwouts force-pushed the update_environment_and_hooks branch from 556e355 to cd2f9aa Compare November 9, 2023 21:20
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #1156 (cd2f9aa) into main (069425a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1156   +/-   ##
=======================================
  Coverage   95.08%   95.08%           
=======================================
  Files          29       29           
  Lines        4419     4419           
=======================================
  Hits         4202     4202           
  Misses        217      217           

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@mwouts mwouts merged commit 865a242 into main Nov 11, 2023
21 of 23 checks passed
@mwouts mwouts deleted the update_environment_and_hooks branch November 11, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants