Is there a list of which formats offer roundtripping ?
See original GitHub issueI tried jupytext initially, with .py
, but I noticed, when roundtripping to ipynb, that multiple newlines can result in code cells splitting up.
Now I’m trying .md, as I could see this in github, though it turns out to be not completely ideal as github shows all the metadata at the top.
What is the best format to use that can handle a round trip ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Round-tripping (finance) - Wikipedia
In international scenarios, round-tripping is a method of structuring to evade taxes and to launder money. Other companies making unconventional round-tripping ...
Read more >What is round-trip time? | RTT definition - Cloudflare
Round-trip time (RTT) is the duration in milliseconds (ms) it takes for a network request to go from a starting point to a...
Read more >Standard date and time format strings | Microsoft Learn
Learn how to use a standard date and time format string to define the text representation ... More information: The round-trip ("O", "o")...
Read more >Roundtrip vs Flex - Zipcar
At Zipcar we offer two ways of getting around: Roundtrip and Flex. Roundtrip is our traditional service, used for pre-planned round trips, whilst...
Read more >How to Format Fixed Broadband Availability Location Lists
Field Header Data Type Example
Provider ID provider_id Integer 131425
Brand Name brand_name String Acme Broadband
Location ID location_id Integer 1000000121
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 Free
Top 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
That’s a good idea! I’ll update the PR. Basically,
.md
extension corresponds to either themarkdown
(default) orpandoc
formats (calls pandoc, so you should have a recent version of pandoc installed).Rmd
extension corresponds to thermarkdown
format (default).py
in the context of a Python notebook. And the available formats arelight
(the default),percent
(# %%
markers),sphinx
(if you are using sphinx-gallery, cannot store cell metadata),hydrogen
(same aspercent
, except that magic commands are not commented out), andnomarker
(no cell marker nor metadata, obviously not robust to a round trip).Hello @stuaxo , thanks for asking.
The three main formats, i.e.
py:percent
,py:light
andmd
should be robust to the round-trip. Now the question is how you define the cells:py:percent
is the most explicit with# %%
before every cell, the two others may indeed use single or double blank lines as cell breaks.These formats are documented here.
Given a text file, or an
.ipynb
notebook, you can test the round-trip withFor this, you can give a try to the notebook metadata filter. Uncheck the ‘include metadata’ entry in the Jupytext menu, or execute: