Opening non Notebook related scripts automatically adds metadata
See original GitHub issueImagine I have a non-notebook related script which contents are:
print('Hello World')
If I open in it using the jupyter interface, after installing jupytext, it opens as if it were a notebook. Then if I do some minor edits and save it, its contents become:
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.3'
# jupytext_version: 0.8.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# language_info:
# codemirror_mode:
# name: ipython
# version: 3
# file_extension: .py
# mimetype: text/x-python
# name: python
# nbconvert_exporter: python
# pygments_lexer: ipython3
# version: 3.7.0
# toc:
# nav_menu: {}
# number_sections: true
# sideBar: true
# skip_h1_title: false
# toc_cell: false
# toc_position: {}
# toc_section_display: block
# toc_window_display: false
# varInspector:
# cols:
# lenName: 16
# lenType: 16
# lenVar: 40
# kernels_config:
# python:
# delete_cmd_postfix: ''
# delete_cmd_prefix: 'del '
# library: var_list.py
# varRefreshCmd: print(var_dic_list())
# r:
# delete_cmd_postfix: ') '
# delete_cmd_prefix: rm(
# library: var_list.r
# varRefreshCmd: 'cat(var_dic_list()) '
# types_to_exclude:
# - module
# - function
# - builtin_function_or_method
# - instance
# - _Feature
# window_display: false
# ---
print('Hello World!')
Is there a way to avoid jupytext interfering with native python scripts?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
The Notebook file format — nbformat 5.7 documentation
This page contains a human-readable description of the notebook format. Note. All metadata fields are optional. While the types and values of some...
Read more >how to programmatically add slides cell metadata in jupyter ...
which programmatically adds metadata to hide cell code. I would like to be able to do the same but adding slideshow metadata. For...
Read more >Add metadata to your book pages - Jupyter Book
There are two straightforward ways to add metadata to cells: Use the Jupyter Notebook cell tag editor. The Jupyter Notebook ships with a...
Read more >Build large-scale data copy pipelines with metadata-driven ...
Go throughput the copy data tool, and it will come up with a new SQL script for you. Rerun the SQL script to...
Read more >Notebook Instance Metadata - Amazon SageMaker
For information about notebook instance lifecycle configurations, see Customize a Notebook Instance Using a Lifecycle Configuration Script. The resource- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mwouts I had the chance to give it a try now. So far it looks awesome! It fits perfectly the use of my team. Thank you for your support 😃
Hi @mwouts,
Thanks for your support.
As far as my understanding goes, I believe the behaviour should be the same from jupyter and jupytext.
This makes sense to me. The reasoning behind me opening this issue was seeing if it was possible to make jupytext as less intrusive (read, not changing default behaviour) as possible in functionalities (such as editing pure python scripts) that go outside of Jupytext core (notebooks).
At the same time I also see the option of editing script as notebooks with good eyes 😃
That’s awesome. Thank you so much once again for your support!