Skip to content

Remove custom entry from Jupyter Notebook & Cell Metadata #205637

Closed

Description

This is an unnecessary layer
Everywhere in code we need to look at custom, when there's no such thing in Jupyter (specification) metdata.
This is a carry over from the old VS Code notebook Notebook format.
All metadata had to be stored under custom and this was never migrated when custom in core was removed.

This shows up in SCM view as well
I.e. when using the diff view, the custom node is displayed, and this is wrong, as there's no such thing in the spec.

Removing this will:

  • Improve SCM
  • Make it easier for extensions to access the metadata
  • Ensure the API lines up with the Jupyter specification
### Tasks
- [ ] https://github.com/microsoft/vscode-jupyter/issues/15378
- [ ] https://github.com/microsoft/vscode/issues/207968#issuecomment-2002992138
- [ ] https://github.com/microsoft/vscode-jupyter/issues/15380
- [ ] https://github.com/julia-vscode/julia-vscode/issues/3568
- [ ] https://github.com/microsoft/vscode-jupyter/issues/15402

Activity

  1. added
    papercut 🩸
    on Feb 20, 2024
  2. DonJayamanne commented on Feb 20, 2024

    @DonJayamanne
    ContributorAuthor

    Peng Lyu (@rebornix) /cc
    We will need to coordinate this with partner teams that read/write ipynb notebooks

  3. changed the title [-]Remote `custom` entry from Jupyter Notebook Cell Metadata[/-] [+]Remove `custom` entry from Jupyter Notebook Cell Metadata[/+] on Feb 20, 2024
  4. added this to the On Deck milestone on Feb 22, 2024
  5. DonJayamanne commented on Mar 17, 2024

    @DonJayamanne
    ContributorAuthor

    David Anthoff (@davidanthoff)
    From what I can tell, the only place where the Notebook or Cell metadata is accessed, is in the notebookFeature.ts file.
    My plan is to submit a PR that would make a change to support both the old custom and the new format.
    This way, it would be backwards compatible if and when we move away from the custom property.

    Should be easy enough to create a single function that returns the metadata and use that everywhere.

    How does that sound?

  6. DonJayamanne commented on Mar 18, 2024

    @DonJayamanne
    ContributorAuthor

    Diego Colombo (@colombod)

    Looking at the code in Polyglot Notebooks (Interactive)
    I can see it is used in a large number of places notebookControllers.ts, metadataUtilities.ts, notebookSerializers.ts, etc.
    I think the best and safest way to make such a change in your repo would be to have an if condition that conditionally uses custom based on the version of VS Code being used.
    From what I can tell, tehre are a number of files that would be effected, hence the change would not be as simple/straightforward, happy to discuss offline.

  7. changed the title [-]Remove `custom` entry from Jupyter Notebook Cell Metadata[/-] [+]Remove `custom` entry from Jupyter Notebook & Cell Metadata[/+] on Mar 18, 2024
  8. davidanthoff commented on Mar 18, 2024

    @davidanthoff
    Contributor

    Don Jayamanne (@DonJayamanne) that definitely works!

  9. DonJayamanne commented on Apr 22, 2024

    @DonJayamanne
    ContributorAuthor

    Closing as done.

  10. locked and limited conversation to collaborators on Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtnotebooknotebook-ipynbon-testplanpapercut 🩸

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions