Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ UPDATE: markdown-it-py to v1 #769

Closed
wants to merge 6 commits into from

Conversation

chrisjsewell
Copy link
Contributor

@chrisjsewell chrisjsewell commented Apr 25, 2021

Shouldn't actually change anything specific for jupytext, see: https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md

@mwouts
Copy link
Owner

mwouts commented Apr 25, 2021

Hi @chrisjsewell 👋 , thanks for the update, I'll be happy to take this in the next release! I was planning to work on version 1.11.2 soon (or maybe 1.12.0, since there will be quite a few (small) updates)

Shouldn't actually change anything specific for jupytext

Just to double check, you mean we don't need to increase the version number for the MyST format? (jupytext.myst.myst_version has been at 0.13 for a while, maybe we should replace that fixed number with some import from markdown-it-py?)

@mwouts mwouts added this to the 1.11.2 milestone Apr 25, 2021
@chrisjsewell
Copy link
Contributor Author

Heya 👋, cheers

Just to double check, you mean we don't need to increase the version number for the MyST format?

Well this should not affect at all how MyST Notebooks are converted to Jupyter Notebooks, so in that respect I'd say no.
Can you remind me what effect changing the version has (how it will affect existing MyST Notebooks)?

FYI, I've got a sneaky package to fix my short term circular-dependency issues for myst development https://pypi.org/project/jupytext-ebp/ 😉

@mwouts
Copy link
Owner

mwouts commented Apr 26, 2021

Can you remind me what effect changing the version has

No other effect as changing the format_version field in the YAML header. This can be useful for compatibility if you want to parse past versions in a different manner.

FYI, I've got a sneaky package to fix my short term circular-dependency issues for myst development https://pypi.org/project/jupytext-ebp/ wink

Oh I guess you would appreciate a faster release? If you need that I'll be happy to ship your change first. What is the circular dependency issue precisely?

@chrisjsewell
Copy link
Contributor Author

This can be useful for compatibility if you want to parse past versions in a different manner.

So if we do change the version here, notebooks with older versions will still work fine? Thats the thing I just wanted to check.

What is the circular dependency issue precisely?

Oh its mainly just for development: markdown-it-py's documentation is created with myst-nb, which has the dependency chain: markdown-it-py -> myst-parser -> myst-nb, and then myst-nb also has a test dependency on jupytext, see: executablebooks/MyST-NB#320
Mainly I just wanted to have everything ready and checked before making the non-beta markdown-it-py v1 release

setup.py Outdated Show resolved Hide resolved
@mwouts mwouts mentioned this pull request May 1, 2021
@mwouts
Copy link
Owner

mwouts commented May 1, 2021

Hi @chrisjsewell , sorry for the delay, I'll try to get the new version done by the end of the week-end :)
Right now I am trying to add a few changes on top of yours in the environment files at #773

So if we do change the version here, notebooks with older versions will still work fine?

Well the format version can be useful at the time of converting the text notebook to ipynb, like we do here:

# Markdown files in version >= 1.3 represent code chunks with no language as Markdown cells
if self.format_version not in ["1.0", "1.1"]:
self.cell_type = "markdown"
self.explicit_eoc = False
cell_end_marker += 1
self.content = lines[:cell_end_marker]
# Previous versions mapped those to raw cells
else:
self.cell_type = "raw"

However any document will be saved in the current version, so if you decide to upgrade the version to 0.14 then every myst:md document created with the new version of Jupytext will have a format_version equal to 0.14.

@mwouts
Copy link
Owner

mwouts commented May 1, 2021

Merged at #773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants