-
Notifications
You must be signed in to change notification settings - Fork 94
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
User Guide: convert to sphinx #2651
Comments
Sphinx Infrastructure For Cylc DocumentationRather than opening loads of issues for different aspects of the documentation I've listed them here. This comment relates to the "infrastructure" side of creating a sphinx project into which the LaTeX documentation can be decanted. Auto DocumentationSphinx makes auto-documentation easy providing a good way to reduce the maintenance and the risk of documentation diverging from the code base. The Suite Configuration APIAs cylc has a rigid API we could auto-document this to prevent the need to document it separately in LaTeX. See #2660 (comment). Ideally we would also bring in information from the upgrader for:
This would require:
Cylc Suite API (HTTP)See API On The Fly - #2123 This would require:
Cylc API (CLI)With Rose we wrote a parser which converts the standard CLI help into rst (http://metomi.github.io/rose/doc/html/api/command-reference.html). We could use this code or adopt an alternative markup e.g. markdown. This would require:
Cylc Python InterfacesIf we wish to expose any python interfaces, sphinx can auto-document from the source code. Rose example: http://metomi.github.io/rose/doc/html/api/configuration/api.html#python For the moment the only modules I can think we might want to auto-document from the source code are the Jinja2 filters. In the future the main driver for this would be the Python API For Suite Definition - #1962 This would require:
Software RequirementsRose now auto-documents its software requirements from the This would require:
The Suite DatabaseSee https://github.com/cylc/cylc/issues/2483, I don't know of any Sphinx extensions which can be of help here. This would require:
Cylc Specific Sphinx ExtensionsDesired / required Sphinx extensions:
Production Of Documentation For Multiple Versions In Multiple FormatsSee the version selector in the bottom left-hand corner of the rose documentation http://metomi.github.io/rose/doc/html/index.html. We can serve multiple versions of the documentation in formats including:
This would require:
Production Of Multiple Documents Under One SystemWe currently serve two PDF documents from the cylc website:
Sphinx builds PDFs from a file hierarchy meaning that we can build multiple documents from a single source tree. I.E. we could move the Suite Design Guide into Sphinx as well. Documents we may want to serve:
This would require:
|
@oliver-sanders - wow, excellent! |
metomi/rose#2216 means that objects documented in the Rose documentation (e.g. Rose configurations, environment variables, etc) can now be cross-referenced in other projects. This opens up cross-referencing between the Rose and Cylc documentation at an object level. If the projects become out of sync and references get broken Sphinx will raise warnings accordingly. It would be fairly streightforeward to extend this functionality to raise warnings if referencing deprecated configurations etc. |
I've just had a look at a ticket #2747 which raises a few more points:
|
For the new Rose docs we use the The difference in specification for a graph string is minimal, with digraphs being specified via the DOT language, e.g.: one -> two -> three which would clearly take only a simple The only cases I can think of where it would be time-consuming &/or tricky to get equivalent graphs converted into digraphs for the docs would be when a suite has many different graph strings which combine in a non-trivial way e.g. due to multiple recurrence sections & inter-cycle dependencies, or has many conditional triggers or parameters. But since the CUG has mainly simple example suites, by nature, I think it would not be worth the effort to do anything fancier e.g. with |
I definitely like the new Rose sphinx approach. However, I guess only cylc can generate cycling graphs, for those examples - unless you manually code the all the cycle point instances shown, as if they were different tasks.
I'll just fight back here a tiny smidgeon 😁 - you don't have to take screenshots. |
@hjoliver good point! I should have said images as well as, or instead of, screenshots. Either way, they would not be built into the documentation to be displayed nicely & to make change There would be some drudgery required to either manually convert some aspects of non-trivial docs example suites or get a working |
I created the This was just a quick bit of JS, nothing serious, I would have taken it further to make the documentation more illustrative (e.g. explaining the concept of a stalled suite is much easier with an animation). In the end I moved onto more pressing matters and left this one by the wayside, but it's perfectly possible to expand this functionality and build a [primitive] Cylc scheduler in Javascript. It would only have to emulate true/false (also maybe sleep X) type commands so is less complex than it sounds. |
Quick note to add to the feature wish-list, a quick test to ensure that the syntax highlighting doesn't encounter any erroneous syntax. This is a cheep way to spot invalid code examples and to ensure the lexer stays up-to-date with language specification. A quick $ grep -l --color=none -r '<span class="err"' | sed 's/\.html/\.rst/' | sed 's/^/doc\/src\//' |
The core origin of this Issue, namely "convert [the User Guide] to sphinx" as per the title, has been fully addressed by #2910 which has now been merged. Follow-on work which was registered in comments here, & as noted during work towards #2910, has been moved into #2933 which supersedes (though links into the detail) contained here. Therefore this can be closed. |
LaTeX produces book-quality PDF and hardcopy, but the generated HTML is awful.
The new sphinx Rose docs are very nice: https://metomi.github.io/rose/doc/html/index.html
Email from @oliver-sanders on this:
The text was updated successfully, but these errors were encountered: