Skip to content

Support opening Jupytext notebooks as notebooks #63

@yjoer

Description

@yjoer

Is your feature request related to a problem? Please describe.

The current extension does not differentiate Python source files and Jupytext notebooks as they share the same .py extension. Therefore, it will open all files ending with .py in a text editor.

Describe the solution you'd like

Open Jupytext notebooks as notebooks.

Describe alternatives you've considered

I created a POC at https://github.com/yjoer/jupyterlab-quickopen/tree/poc-1. When we hit enter after selecting a path, the client sends a request to the server if it ends with .py. On the server, we will read the first line of the file to identify the file type. I have implemented the tests for the percent format with and without metadata. If it matches, the handler will return "notebook" as the widget name otherwise "default". This allows us to open a conventional Python file in a text editor.

2024-10-09_01-30-46.mp4

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions