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

jupytext-config and foreign kernels / extensions #1164

Closed
parmentelat opened this issue Nov 21, 2023 · 4 comments · Fixed by #1188
Closed

jupytext-config and foreign kernels / extensions #1164

parmentelat opened this issue Nov 21, 2023 · 4 comments · Fixed by #1188

Comments

@parmentelat
Copy link
Contributor

now that #1163 is giving us an ability to easily create exotic formats like bash or javascript notebooks,
I notice that I cannot open them by double-clicking, because I don't know the string to use in jupytext-config

specifically I have tried
jupytext-config set-default-viewer bash sh javascript js

meaning that I now have

$ jupytext-config list-default-viewer
python: Jupytext Notebook
markdown: Jupytext Notebook
myst: Jupytext Notebook
r-markdown: Jupytext Notebook
quarto: Jupytext Notebook
julia: Jupytext Notebook
r: Jupytext Notebook
bash: Jupytext Notebook
sh: Jupytext Notebook
javascript: Jupytext Notebook
js: Jupytext Notebook

but to no avail in either case...

@mahendrapaipuri
Copy link
Contributor

When you say "open them by double-clicking", you mean you were trying to open them as text notebooks? If so, I can without any issues.

js_text_nb

And I dont have any special jupytext config.

@parmentelat
Copy link
Contributor Author

since these documents are notebooks, I would like a double-click in the file browser to open them .. as notebooks, and not as text files

so for .md and .py files, this is possible using

jupytext-config set-default-viewer

which by default defines "Jupyter Notebook" as the default factory for viewing a predefined set of file types

it is possible, like I do in the OP, to add other file types, that will also be bound to "Jupyter Notebook" as the default viewer
except that I don't know how to describe the "right" filetype for these 2 cases (js and bash), and I expect the issue would be the same for any foreign kernel indeed...

@mwouts mwouts added this to the 1.16.0 milestone Nov 23, 2023
@mwouts
Copy link
Owner

mwouts commented Dec 2, 2023

Hey @parmentelat , that's a good question. I am afraid I don't know the answer. Given that the setting UI says that the available file types are

text notebook directory markdown PDF python json julia csv tsv r
yaml svg tiff jpeg gif png bmp webp html vega5 vega-lite5 vega-lite4
vega-lite3 plotly jupyterlab-workspace myst r-markdown quarto

I did try text and notebook but that did not help in opening a .sh notebook as a notebook with a single click.

image

@mwouts mwouts removed this from the 1.16.0 milestone Dec 2, 2023
@parmentelat
Copy link
Contributor Author

hi @mwouts
thanks for your input
something I'll try to ask to the jlab gurus if I get a chance ;-)

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 a pull request may close this issue.

3 participants