-
Notifications
You must be signed in to change notification settings - Fork 391
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
jupytext.write doesn't error if fmt
is unknown, but the output file has a known extension
#462
Comments
Hello @choldgraf , @chrisjsewell , well, I'd suggest adding a test based on your document to either test_ipynb_to_myst.py, or to a new test file As far as I can tell, it's just that the file gets classified as a plain markdown file, not a Meanwhile, @choldgraf , you could give the full format name when doing conversions, e.g.
|
I tried adding to @requires_myst
def test_matches_mystnb_full():
text = dedent(
"""\
---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: '0.6'
jupytext_version: 1.4.1
kernelspec:
display_name: Python 3
language: python
name: python3
---
```{code-cell} python3
print('hi')
```
```{code-cell} python3
print('hi')
```
"""
)
print(myst_to_notebook(text))
assert matches_mystnb(text) is True try running |
Are you sure it doesn't start on the 2nd line or something? The only other thing I can think of is that you are running in windows right? Perhaps it could be something to do with line ending in |
Oh I've just noticed you are using myst-parser v0.6, you should be using >= 0.7.1 Line 39 in a0676d7
but no specific check is done for a lowest version within jupytext (just that you are using the same minor version). |
ahhh yes, I believe that myst-parser was a key issue here. I've upgraded it and it now works much better! Amazing :-) One thing that I think exacerbated my problem, if I write the notebook to markdown and give a I think what it is doing is inferring the output type from the |
Thanks @choldgraf , that is a good point... I agree that |
fmt
is unknown, but the output file has a known extension
Just playing around with MyST -> ipynb -> MyST right now. The ipynb syncing works beautifully! I love it
I am having a hard time getting MyST code cells to render as
ipynb
code cells.E.g., this markdown:
has its
```{code-cell} ```
read in as markdown instead of being converted to Python code cells.I tried adding double-spaces between them but that didn't do the trick. Anything I am missing?
(I also noticed a weird thing where the YAML header of the MyST markdown file would be read into the notebook as a
raw
cell at the top, rather than in the notebook metadata...is that expected behavior?)The text was updated successfully, but these errors were encountered: