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

Put counter board output into separate tabs. #233

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mithro
Copy link
Contributor

@mithro mithro commented Dec 29, 2021

Fixes #164

Signed-off-by: Tim 'mithro' Ansell tansell@google.com

Fixes chipsalliance#164

Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
@mithro
Copy link
Contributor Author

mithro commented Dec 29, 2021

This is currently failing with;

(venv) tansell@tansell-glapstation:~/github/SymbiFlow/symbiflow-examples$ make -C docs html                                                                                                                                            
make: Entering directory '/ssd/github/SymbiFlow/symbiflow-examples/docs'                                                                                                                                                               
Running Sphinx v4.3.2                                                                                              
<string>:49: (ERROR/3) Unknown directive type "tabs".                                                              
                                                         
.. tabs::                                  
                                                                                                                   
   .. tab:: Arty and Basys 3

Screenshot from 2021-12-28 17-50-33

@mithro
Copy link
Contributor Author

mithro commented Dec 29, 2021

I believe this is being caused by https://github.com/SymbiFlow/symbiflow-examples/blob/master/docs/collect_readmes.py which was added by @rw1nkler and modified by @fkokosinski

GitHub
Example designs showing different ways to use SymbiFlow toolchains. - symbiflow-examples/collect_readmes.py at master · SymbiFlow/symbiflow-examples

@mithro mithro requested a review from rw1nkler December 29, 2021 01:52
@mithro
Copy link
Contributor Author

mithro commented Dec 29, 2021

The issue seems to be the line @ https://github.com/SymbiFlow/symbiflow-examples/blob/master/docs/collect_readmes.py#L205 which calls publish_doctree without the correct arguments for the sphinx context. A quick Googling seems to indicate you need to do something more like this;

https://github.com/sphinx-doc/sphinx/blob/eed0730b4ba3bd2fbd34f2d6ab555ba876c77717/sphinx/testing/restructuredtext.py#L29-L33

def parse(app: Sphinx, text: str, docname: str = 'index') -> nodes.document:
    """Parse a string as reStructuredText with Sphinx application."""
    try:
        app.env.temp_data['docname'] = docname
        reader = SphinxStandaloneReader()
        reader.setup(app)
        parser = RSTParser()
        parser.set_application(app)
        with sphinx_domains(app.env):
            return publish_doctree(text, path.join(app.srcdir, docname + '.rst'),
                                   reader=reader,
                                   parser=parser,
                                   settings_overrides={'env': app.env,
                                                       'gettext_compact': True})
    finally:
        app.env.temp_data.pop('docname', None)
GitHub
Example designs showing different ways to use SymbiFlow toolchains. - symbiflow-examples/collect_readmes.py at master · SymbiFlow/symbiflow-examples
GitHub
Main repository for the Sphinx documentation builder - sphinx/restructuredtext.py at eed0730b4ba3bd2fbd34f2d6ab555ba876c77717 · sphinx-doc/sphinx

@mithro mithro marked this pull request as ready for review September 6, 2024 23:42
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.

The Zybo and Arty pictures and instructions are displayed at the same time
1 participant