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

mystmd #1178

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

mystmd #1178

wants to merge 17 commits into from

Conversation

thewtex
Copy link
Member

@thewtex thewtex commented Jul 15, 2024

  • docs: create myst.yml
  • docs: run myst init --write-toc
  • docs: toc tweaks
  • docs: add dark logo
  • docs: packages pagee myst re-formatting

@thewtex
Copy link
Member Author

thewtex commented Jul 15, 2024

@agoose77 @rowanc1 @stevejpurves

@thewtex
Copy link
Member Author

thewtex commented Jul 16, 2024

@agoose77 the docs have been converted to myst 🎉 🌮 less the api-docs. I am wondering if you have implemented any of the py:obj etc. directives yet before I go about it.

@agoose77
Copy link

Hi @thewtex, this is cool!

I'm currently working on a Sphinx plugin that generates MyST AST. The idea is that we would then natively embed this into a MyST-MD project. I think this won't use the same mechanism as the embed directive, because otherwise we won't be able to link from the non-Sphinx project into the Sphinx project.

I have already tested it on your documentation, which is really exciting!

image

We have a MyST developers meeting today at 3 PM BST. You'd be welcome to attend, although I suspect we won't be able to add much more than my discussion here just yet. In that meeting, though, we'll discuss next-steps for this work to figure out how best to tie it in to MyST-MD as a whole

@thewtex
Copy link
Member Author

thewtex commented Jul 17, 2024

@agoose77 thanks for the note! Sorry I missed the meeting. Any other thoughts on next steps?

@agoose77
Copy link

Next steps are really all on our side. I'm building this out to work as nicely as possible. Here's the latest screenshot: https://discord.com/channels/1083088970059096114/1177359316886503464/1263870267604729876

@thewtex
Copy link
Member Author

thewtex commented Jul 19, 2024

@agoose77 thanks for the update. That discord link is not working for me. Any links to code 👨‍💻 📖 😄 ?

@agoose77
Copy link

@thewtex
Copy link
Member Author

thewtex commented Jul 20, 2024

This is what I get:

image

@agoose77
Copy link

agoose77 commented Jul 21, 2024

Huh, maybe you need to join the discord first. In any case:

Will need to do a pass to see what's not working, but:

@agoose77
Copy link

A small update -- we've merged in some of these PRs (into mystmd), making it easier to get started. To try this out, you'd need to

  1. Build mystmd from its main branch (follow the development guide).
  2. Modify your conf.py to pull in sphinx_ext_mystmd from GitHub, and remove any other extensions that aren't required for the API docs
  3. Modify conf.py to only build the apidocs, e.g.
    exclude_patterns = [".venv", '_build', 'Thumbs.db', '.DS_Store', "cxx", "development", "introduction", "model", "myst", "python", "static", "typescript"]
  4. Run sphinx-build with the new myst builder (sphinx-build -b myst . ./myst)
  5. Run myst start (using the new build of myst) in headless mode (so we can use a newer theme), i.e. myst start --headless
  6. Build the myst-theme PR and run the book theme npm run theme:book

@thewtex
Copy link
Member Author

thewtex commented Jul 31, 2024

join the discord first.

I believe I tried to do this at some point, but I received a notice that it was only available for free for students at academic institutions or similar, which is not accessible to me. And I am not sure how to get that prompt up again.

A small update

Big update! Outstanding work, @agoose77 !

As I mentioned in the airport, I would like to forgo Sphinx altogether. As I understand it, the approach that you are taking is more general and provides a workable solution for other projects that are not necessarily using autodoc2. I will still need to write a autodoc2 JSON database to Myst-MD AST translator. But I should be able to use your Sphinx-extension generated Myst-MD as a reference.

I also see references to Myst xref -- are there any documentation pointers on this that I can use to get a better understanding?

Thank you, Angus!

@thewtex
Copy link
Member Author

thewtex commented Aug 7, 2024

I also see references to Myst xref -- are there any documentation pointers on this that I can use to get a better understanding?

I found this myst-xref-json description and this Guide entry on External References, which also mentions Intersphinx objects.inv.

@agoose77
Copy link

agoose77 commented Aug 7, 2024

If you really want to drop Sphinx and directly move to autodoc2, then you will want to think about where you pull in the docs.

What I would suggest is generation of .myst.json documents from autodoc.db.json, and then you can pull those in to your build. You can see what a .myst.json file should contain by investigating the .json endpoint of a normal MyST page e.g. https://mystmd.org/guide/frontmatter.json

@thewtex
Copy link
Member Author

thewtex commented Aug 7, 2024

Great, thanks for the guidance @agoose77 🙏

Is there a plan to list the Python autodoc node types in the Myst Schema Node Type Index or someplace else?

@agoose77
Copy link

@thewtex the new plan is to avoid updating our AST by transforming the Spinx AST into MDAST nodes and adding some annotations (classes).

@thewtex
Copy link
Member Author

thewtex commented Aug 12, 2024

@agoose77 cool, thanks for the clarification.

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