-
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
Use jupytext with jupyterlab-gitlab or jupyterlab-github #381
Comments
Hello @beenje , well this is an interesting question. So, if I understand correctly, the extension allows you to browse github or gitlab repo (cf. your screenshot there), but you don't have the context menu there? Also, can you tell us whether Markdown files have a text, or a notebook icon? To give some more context:
Note that in the future I'd like to allow Jupyter Lab to open the text files which are explicitly notebooks as notebooks by default (I mean, without the right click), see #271 and #340. |
The icon of the Markdown files in the GitLab repository is not changed. It still appears as text icon (not notebook). Maybe @ian-r-rose who developed the GitHub extension (that I just copied) has an idea? |
Oh good, so this issue may be independent of the other issues I linked above. Sure, we need to understand how the idrive interface works. According to the documentation, The interface for a network drive that can be mounted in the contents manager, I would be tempted to think that the file is still read by the contents manager, but maybe |
There is a gitLabContentsToJupyterContents function to convert the content from the repo to Jupyter contents. In that function we force the type to "file". But it still works for notebooks (they have the proper icon). So I probably don't understand how everything works together... |
The For that reason, I would think that using the I don't know much about the implementation of |
Hello @ian-r-rose , thanks for joining the conversation!
I agree. But that's a nice challenge. The most difficult part is certainly to find out how to connect to the (Python) contents manager. Currently I have no pointer - I don't even know how to detect in TypeScript that the contents manager is Jupytext's one (#350)... maybe that could be a simpler target to start with?
Jupytext's contents manager open the files as notebooks when jupytext/jupytext/contentsmanager.py Lines 285 to 301 in a04f548
|
@ian-r-rose , @beenje , as you explained the Python contents manager is not called when we open a document with either the github or the gitlab extension. Now, the only thing that we have to do to convert a text document to a notebook is to call e.g. |
The jupyterlab-github and jupyterlab-gitlab allow to access notebooks from GitHub or GitLab repositories. Notebooks can be run directly from the remote repo.
I installed jupytext and local .md and .py files can be opened as notebooks by using the "Open With -> Notebook" menu.
But when using the jupyterlab-gitlab extension, those files are not recognised as notebooks and can only be opened in the editor.
Do you know if there is a way to make those extensions play well with jupytext so that .md file can be opened directly as notebook?
The text was updated successfully, but these errors were encountered: