Coder Social home page Coder Social logo

Comments (5)

jabbera avatar jabbera commented on June 11, 2024 1

@mahendrapaipuri thanks! I'll follow up there.

from jupytext.

mwouts avatar mwouts commented on June 11, 2024

Hey @jabbera , thanks for reaching out!

I don't think this is possible at the moment (cc @mahendrapaipuri ?).

The closest that we can offer now is to setup Jupytext as the default viewer but you seem already aware of that option.

from jupytext.

mahendrapaipuri avatar mahendrapaipuri commented on June 11, 2024

As @mwouts pointed out, currently, defaultViwers is JupyterLab native way of changing renderers. The defaultViewers config setting is exposed by DocumentManager extension and not Jupytext. So, we cannot really modify the setting using Jupytext extension (at least not in an elegant way).

If you are using JupyterHub, you have something like c.Spawner.default_url config where you can set it /lab/tree/nfs-location/notebook.py so when users are redirected to their Lab instances the notebooks will be opened in Jupytext format. Do you think that will work for you @jabbera ?

from jupytext.

jabbera avatar jabbera commented on June 11, 2024

@mahendrapaipuri I don't think that's exactly what I'm talking about. I can't change the default document viewer for all PY files. We have people who have their environment setup in very specific ways and I can't really mess with that. What I need is a way to tell JupyterLab to open a specific file in Jupytext via the URL. That way when we are sending out these dashboard links it doesn't matter how anyone has the document manager configured. Basically I need the Open in Jupytext context menu option triggerable via a query param or URL path modification.

from jupytext.

mahendrapaipuri avatar mahendrapaipuri commented on June 11, 2024

Basically I need the Open in Jupytext context menu option triggerable via a query param or URL path modification.

I am afraid that this needs to be addressed with JupyterLab's docmanager-extension as it is responsible for opening files. Jupytext itself registers its file type Jupytext Notebook with that extension and does not control on how the file will be opened. Does it make sense?

from jupytext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.