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

Make some pre-releases? #47

Closed
choldgraf opened this issue Mar 24, 2020 · 8 comments
Closed

Make some pre-releases? #47

choldgraf opened this issue Mar 24, 2020 · 8 comments

Comments

@choldgraf
Copy link
Member

choldgraf commented Mar 24, 2020

In our last meeting, @jstac suggested that we could release the myst-parser and myst-nb projects in a "public beta" fashion, relatively soon. I think it could be a good idea to get some of these tools out there sooner than later. What do people think about:

  • In the next few days, start telling twitter, open-source colleagues, etc about the MyST-parser for Sphinx
  • After @AakashGfude's PR lands in MyST-NB and we have a week-or-so to test it out, do the same thing for MyST-NB

What do folks think about that?

And on the second point, we should also reach out to the nbsphinx project and see if they have any ideas for how we could dovetail our stacks into one another.

The one question I have here, is whether @chrisjsewell thinks that recent conversations about markdown-it-py should delay the "announcement" of MyST and the MyST parser. Chris, what do you think?

@choldgraf choldgraf changed the title Make some pre-releases Make some pre-releases? Mar 24, 2020
@jstac
Copy link
Member

jstac commented Mar 24, 2020

+1 in principle but it depends on @chrisjsewell . We all know things can happen fast when he gets an idea in his head 💡

@chrisjsewell
Copy link
Member

chrisjsewell commented Mar 25, 2020

See ExecutableBookProject/markdown-it-py 😄 Its largely done (see the README for details) and in markdown_it/doc_renderer.py is the initial port of the docutils renderer, which works exactly the same as the mistletoe one, and its now faster than mistletoe.

The main niggling issue is executablebooks/markdown-it-py#1.

Its pretty nice that you can configure any aspect of the syntax. I could envisage some of that configurability eventually bubbling up to the CLI:

md = (
    MarkdownIt()
    .use(front_matter_plugin)
    .use(myst_block_plugin)
    .use(myst_role_plugin)
    .disable('image')
    .enable('table')
)
md.render("some text")

@chrisjsewell
Copy link
Member

chrisjsewell commented Mar 25, 2020

Note the footnote extension also supports the inline feature discussed in executablebooks/MyST-Parser#98 (comment), you can configure math to use $...$ or \[....\], and with both, they recognize an equation label
which should mean you wouldn't have to use the math directive for this any more, i.e.:

$$s(w) = s_0 w \cdot \mathbb 1\{w \geq \hat w\}$$ (md:sav_ah)

instead of

```{math}
:label: md:sav_ah

s(w) = s_0 w \cdot \mathbb 1\{w \geq \hat w\}
```

(will have to see how this fits in with the docutils renderer)

@jstac
Copy link
Member

jstac commented Mar 25, 2020

That's awesome, love your work @chrisjsewell !

@najulizu, please not this simplified syntax. Please add some whitespace between equation and $$.

(Edit: This will work after the parsers are swapped.)

@choldgraf
Copy link
Member Author

Ah one other thing - @chrisjsewell mentioned that markdown-it-py is nearly ready to go, but there's still another step of making the myst-parser parse using it, right?

@jstac
Copy link
Member

jstac commented Mar 26, 2020

Best to leave this until after the first round of blog posts / publicizing?

@choldgraf
Copy link
Member Author

That was the question I wanted to ask @chrisjsewell - I guess the question is whether we think that switch will make any kind of differece for myst-parser...I don't think so, I think it's a purely-backend thing, but just wanted to make sure

chrisjsewell added a commit to executablebooks/MyST-Parser that referenced this issue Apr 1, 2020
This commit implements the move from `mistletoe` to `markdown-it-py`, as the underlying markdown parser. The reason for this is are discussed in executablebooks/meta#44 (comment) and executablebooks/meta#47, and the PR #123 discusses in more details the update.

Additional changes:

- Update `pydata-sphinx-theme` requirement
- Improve testing and move to GitHub Actions CI
- Add tests and fixes for reporter warnings and include directive
- Add documentation of sphinx parser options
- Apply doc fixes suggested by @rossbar in #121
- Add warning for non-consecutive headings
@chrisjsewell
Copy link
Member

done and dusted

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

No branches or pull requests

3 participants