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

Create a symbiflow-sphinx-docs-common repository #49

Open
4 tasks
mithro opened this issue Apr 27, 2020 · 11 comments
Open
4 tasks

Create a symbiflow-sphinx-docs-common repository #49

mithro opened this issue Apr 27, 2020 · 11 comments

Comments

@mithro
Copy link
Contributor

mithro commented Apr 27, 2020

It feels like there is a lot of duplication between all the symbiflow (and some non-symbiflow repositories like the Fomu workshop) around getting a nice sphinx setup.

It would be good if there was a common repository that could be shared between everything. This could also be a good place to use git subtrees (rather than git submodules) to pull the module into the dependent repositories.

The repository should include;

We should also decide if we want to use m2r rather than the existing rather hacky https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks and recommonmark.

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

FYI - @rw1nkler @mgielda @daniellimws

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

@xobs - You might also be interested in this....

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

This could help with #9

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

You can find the Fomu workshop at http://github.com/im-tomu/fomu-workshop

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

This could potentially be reused by the OpenROAD project too -> https://openroad.readthedocs.io/en/latest/

@xobs
Copy link

xobs commented Apr 27, 2020

For what it's worth, I didn't get satisfactory results out of recommonmark, but I think that's mostly because I found you can't mix both markdown and rst in the same file.

I switched to using m2r in lxsocdoc to allow per-section switching: https://github.com/enjoy-digital/litex/blob/master/litex/soc/doc/csr.py#L458-L467

Overall I'm reasonably happy with how well it's worked, though there definitely are a few things that you can express in markdown that can't be expressed in rst, mostly pertaining to tables (see https://github.com/miyakogi/m2r#restrictions). But it's a nice way to add support for people who are familiar with markdown and don't want to learn how to write rst.

GitHub
Build your hardware, easily! Contribute to enjoy-digital/litex development by creating an account on GitHub.
GitHub
Markdown to reStructuredText converter. Contribute to miyakogi/m2r development by creating an account on GitHub.

@daniellimws
Copy link

I think we should use m2r if we want to use markdown files. I found it to be more flexible than the markdown symlinks and recommonmark. It can include md files into rst files, which those two cannot do. On the other hand, anything that those two can do, m2r can do by including the md file into a rst file.

@daniellimws
Copy link

daniellimws commented Apr 27, 2020

Oh we have 2 votes on m2r!

The current upstream version of m2r breaks with newer sphinx version due to changes in the api. I forked and applied a fix found at miyakogi/m2r#55 over here https://github.com/daniellimws/m2r.

I can transfer this repo to SymbiFlow for future maintenance.

GitHub
Markdown to reStructuredText converter. Contribute to daniellimws/m2r development by creating an account on GitHub.

@mithro
Copy link
Contributor Author

mithro commented Apr 27, 2020

If we convert the following repositories which are a big users of https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks then I think we can decide to use m2r.

We should also make sure that with m2r the links between markdown documents continue to work when included into the sphinx documentation, which is what the symlinks project was trying to do.

GitHub
Python library to solve markdown cross-reference links when building sphinx documentation - SymbiFlow/sphinxcontrib-markdown-symlinks
GitHub
Documenting the Xilinx 7-series bit-stream format. - SymbiFlow/prjxray
GitHub
Documentation for SymbiFlow. Contribute to SymbiFlow/symbiflow-docs development by creating an account on GitHub.
GitHub
Verilog to Routing -- Open Source CAD Flow for FPGA Research - verilog-to-routing/vtr-verilog-to-routing

@mithro
Copy link
Contributor Author

mithro commented May 8, 2020

It would be nice to also support linking to GitHub issues / commits / etc easily. Can we use https://github.com/sloria/sphinx-issues ?

GitHub
A Sphinx extension for linking to your project's issue tracker - sloria/sphinx-issues

@eine
Copy link

eine commented Jun 5, 2020

It would be nice to also support linking to GitHub issues / commits / etc easily.

See https://github.com/ghdl/ghdl/blob/361f9e99e9f26ba8608621583efab6cf624ed2a8/doc/conf.py#L149-L156 and also https://github.com/ghdl/ghdl/blob/361f9e99e9f26ba8608621583efab6cf624ed2a8/doc/conf.py#L141-L147.

GitHub
VHDL 2008/93/87 simulator. Contribute to ghdl/ghdl development by creating an account on GitHub.
GitHub
VHDL 2008/93/87 simulator. Contribute to ghdl/ghdl development by creating an account on GitHub.

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

4 participants