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 NESTML documentation to ReadTheDocs #517

Merged
merged 172 commits into from
May 28, 2020
Merged

Conversation

clinssen
Copy link
Contributor

This PR adds the necessary files to make NESTML API documentation render on readthedocs.org.

Please see the rendered results (based on my personal fork) at: https://nestml-api-documentation.readthedocs.io/

The public-facing version of the documentation will be at https://nestml.readthedocs.io/

Sphinx is a little obtuse when it comes to the organisation into modules/submodules/packages. We therefore have limited room to play around with this. My current strategy is to have a minimal landing page, with a single link to the "pynestml" package, which then lists all subpackages and -modules. Is this acceptable to the reviewers?

Some rendering errors exist when converting the ReST-style docstrings to HTML. This will of course be addressed, but I would like to do this in a separate PR, where we can then tackle the specification of parameter and return types at the same time.

Open question: should we consistently refer to PyNESTML API documentation, as these documents pertain more to the toolchain than the language itself?

N.B. please squash these commits when merging!

@Silmathoron
Copy link
Member

Ah, sorry, I completely forgot I said I would take care of that...
Thanks for doing it then ^^"
Couple of remarks:

  1. I think we should distinguish between the language and the API so I would leave out the Py
  2. I really think RtD should include a doc that would actually be useful to human beings (a raw API seldom is) so I would prefer if we made the current doc more readable and prettier by moving it to RST and including it in RtD
  3. I did not get that:

Sphinx is a little obtuse when it comes to the organisation into modules/submodules/packages

No it's not, that's its main purpose so you can make it do pretty much anything ^^ what did you want to do ?

@clinssen
Copy link
Contributor Author

Hi @Silmathoron, thanks for your thoughts. At some point during coding I just really wished I had the HTML API docs nearby; already forgot that we talked about it before!

Re the distinction between NESTML and PyNESTML: should this API doc then not be called "PyNESTML API documentation", rather than "NESTML API documentation", as it pertains to the toolchain and not the language?

As for human-written docs: I want to prevent the fragmentation of documents across too many places. This is why I suggested to keep the readthedocs page strictly for the API docs. Of course we can still do a lot better there by adding introductory text to the main modules (e.g. in meta_model/__init__.py, write what the meta model directory is for, and so on). However, as a future extension, we could also automatically render the ReST/MarkDown files in doc/ on readthedocs. Then they would always be synchronous.

Copy link

@jessica-mitchell jessica-mitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clinssen

image

I would expect the :text: to be marked up differently. I'm not sure if the proper terms are being used here.

  • Some other output that looks strange:

https://nestml-api-documentation.readthedocs.io/en/latest/pynestml.generated.html#pynestml.generated.PyNestMLLexer.PyNestMLLexer.symbolicNames

  • Who is the intended audience? This feels like an internal reference file, which would only be suitable for those who know what's going on with the code.

@clinssen
Copy link
Contributor Author

A custom Pygments lexer was added to enable NESTML syntax highlighting on readthedocs.

@abigailm
Copy link
Contributor

Merging after live review

@abigailm abigailm merged commit dd816b1 into nest:master May 28, 2020
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.

4 participants