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

Move to markdown-it-py markdown parser implementation #107

Merged
merged 22 commits into from
Apr 1, 2020

Conversation

chrisjsewell
Copy link
Member

Using an alpha release of executablebooks/MyST-Parser#123

All the current tests pass, with no changes to the expected outputs. I also took the opportunity to split up the code in NotebookParser.parse in to separate functions.

@chrisjsewell
Copy link
Member Author

chrisjsewell commented Mar 29, 2020

From a quick scan of the Circle-CI documentation, I don't see any issues.

However, @choldgraf I do note that the plotly and ipywidgets no longer show, moving from:

I assume this is because this notebook is now being executed during the build, and is thus encountering jupyter/nbclient#39

@chrisjsewell
Copy link
Member Author

chrisjsewell commented Mar 29, 2020

In 74cf6a3 I have introduced some nice, self-documenting render tests, see tests/nb_fixtures/basic.txt

Report line number as <cell index>*10000 + <line number>. This is a simple solution to addresses #71, that doesn't require any complex overrides of the sphinx reporting machinery.
@chrisjsewell chrisjsewell linked an issue Mar 29, 2020 that may be closed by this pull request
@chrisjsewell
Copy link
Member Author

chrisjsewell commented Mar 29, 2020

In 536a1dd I have added a simple fix for cell index / line number reporting:

Line number are now set as <cell index>*10000 + <line number> (I'm guessing a cell won't have more than 10000 lines!). This is a simple solution to addresses #71, that doesn't require any complex overrides of the sphinx reporting machinery.

See tests/nb_fixtures/reporter_warnings.txt for examples

We should also document this.

@choldgraf
Copy link
Member

I think this looks great, and agreed about the widgets not showing up. I don't think that should block us here

Rather than having a global variable, we save the exclude paths in the sphinx env and use a seperate function `is_valid_exec_file`. Also added tests
@chrisjsewell chrisjsewell merged commit 1d20384 into master Apr 1, 2020
phaustin pushed a commit to phaustin/MyST-NB that referenced this pull request Apr 1, 2020
…s#107)

This commit move to markdown-it-py markdown parser implementation, concurrently with myst-parser. Additionally:

- Add notebook render tests
- Add simple solution for reporting correct cell index/line number:
  Report line number as <cell index>*10000 + <line number>. This is a simple solution to addresses executablebooks#71, that doesn't require any complex overrides of the sphinx reporting machinery.
- Make tests use the actual sphinx Application
- Re-write validation of which docs to execute/cache:
  Rather than having a global variable, we save the exclude paths in the sphinx env and use a seperate function `is_valid_exec_file`. Also added tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants