vscode-jupyter icon indicating copy to clipboard operation
vscode-jupyter copied to clipboard

Support configuring default ipynb format or change to a new minimum version

Open abhimanyu-bitsgoa opened this issue 2 years ago • 8 comments

Applies To

  • [X] Notebooks (.ipynb files)
  • [ ] Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Whenever you are creating new .ipynb files, you will by default create the nbformat_minor version as 2. Can't seem to change this behaviour.

VS Code Version

1.71.0

Jupyter Extension Version

v2022.8.1002431955

Jupyter logs

No response

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

No response

abhimanyu-bitsgoa avatar Sep 04 '22 22:09 abhimanyu-bitsgoa

Thanks for filing this issue, currently there's no way to change this.

  • What would you like this changed to?
  • Out of curiosity why do you want a different value?

DonJayamanne avatar Sep 05 '22 03:09 DonJayamanne

Thanks for filing this issue, currently there's no way to change this.

  • What would you like this changed to?
  • Out of curiosity why do you want a different value?

I am using nbformat to read a notebook string into a NotebookNode and it is facing a validation problem (as given here). The fix is to change the minor version to 5. But when someone will author a new notebook, it will again be with minor version 2.

So ideally we want it to be changed to 5.

abhimanyu-bitsgoa avatar Sep 05 '22 09:09 abhimanyu-bitsgoa

thanks, however I'm still struggling to understand this issue. please could you provide a sample code with instructions and with the versions of the packages used so i can repro this issue at my end

DonJayamanne avatar Sep 05 '22 10:09 DonJayamanne

Sure!

Steps to repro this issue:

  1. Use nbformat 5.4.0 version
  2. Create a notebook with major version = 4 and minor version =2
  3. Call nbformat.read(...) on the notebook string and it will generate a Notebook JSON failed error

Please let me know if you need my help in the repro.

abhimanyu-bitsgoa avatar Sep 05 '22 10:09 abhimanyu-bitsgoa

Please let me know if you need anymore info from my side.

abhimanyu-bitsgoa avatar Sep 07 '22 18:09 abhimanyu-bitsgoa

Sorry, forgot to get back to you, thanks I'll take a look at this..

DonJayamanne avatar Sep 07 '22 20:09 DonJayamanne

@DonJayamanne I see that something has been merged for this. Is it now possible to specify the nbformat version by default ?

hhalaby avatar Nov 29 '22 14:11 hhalaby

Unfortunately we haven't fixed this yet.

DonJayamanne avatar Dec 06 '22 00:12 DonJayamanne