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

code for jlab3 and jlab4 #1091

Closed
wants to merge 1 commit into from
Closed

code for jlab3 and jlab4 #1091

wants to merge 1 commit into from

Conversation

parmentelat
Copy link
Contributor

as the simplest-possible approach to the issue discussed in mwouts/jupyterlab-jupytext#8, here's a simple drop-in replacement of index.ts (as working for both jlabs) inside of this root repo

I have made several attempts at testing this locally but I cannot be 100% positive because of the artefacts created by a local pip install rather than the official release that goes through pypi

so if you don't mind, you could simply build and publish this in pypi as-is i.e. as a pre-release
and this way I would be in a position to test that approach meaningfully
at first sight I have reason to believe is going to work just fine...


I understand it does not fulfil all your objectives, but if this works it means that reconciling the 2 packagings can be undertaken in a totally independant step, and nothing urgent at all...

let me know what you think

drop-in replacement of index.ts from the transient repo jupyterlab-jupytext
as of commit 5e2f41231b74ad185fee527330ea38935039dd73
from parmentelat/jupyterlab-jupytext@5e2f412
@mwouts
Copy link
Owner

mwouts commented Jun 30, 2023

Hey @parmentelat , thank you for this.

I have tried porting the modifications from the other repo in this one at #1077, but as previously discussed the packaging is not working yet.

I see that, on top of your previous changes, you also modify the interfaces. Is that what makes you hope that it might work both in JLab 3 and 4?

As you will see at #1077 I am afraid that we will need to change the packaging requirements (i.e. package with JLab 4) at some point anyway. And when we have solved the remaining issues for #1077, I will be fine with offering the support for JLab 4 by default, and with specific instructions for JLab 3 - we've done this for JLab 2 and 1 previously :)

A reliable way to test your changes (from https://jupytext.readthedocs.io/en/latest/developing.html#install-and-develop-jupytext-locally) is the following:

BUILD_JUPYTERLAB_EXTENSION=1 python setup.py sdist bdist_wheel
pip install dist/jupytext-x.x.x-py3-none-any.whl

@parmentelat
Copy link
Contributor Author

so let me step back a little, what I'm going at is this:

now that I have realized that the extension built as part of the official release is actually effective (i.e. loaded) within jlab4, it means there is no crucial need to change anything to the packaging to target jlab4, right ?
so I'm saying it is worth trying to simply replace index.ts in the official branch with the version I have come up with in the transient jupyterlab-jupytext repo
(and that the packaging can indeed be smoothened / ironed out if need be, but later on an in a separate move)

so I had it wrong yesterday (again... sorry if I struggle a bit following this whole business) because I - quite stupidly - thought the extension in the official release was coming from the fix_extension_for_jupyterlab4 branch, while of course it comes from main

and so I plan on experimenting with this idea, using the build instructions you have kindly given (should have read the develop instructions too...), to see if this approach has a chance to fly

does that make sense or not ?

@parmentelat
Copy link
Contributor Author

I see that, on top of your previous changes, you also modify the interfaces. Is that what makes you hope that it might work both in JLab 3 and 4?

no this change is totally harmless, I came across this when running the linter as part of the gh-actions aborted initiative, i just thought it made sense to preserve that

@parmentelat
Copy link
Contributor Author

closing, pursuing the same idea in #1092

@parmentelat parmentelat deleted the fix_extension_for_jupyterlab4 branch September 7, 2023 11:43
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