-
Notifications
You must be signed in to change notification settings - Fork 19
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
Include, rather than write in, significant code examples #67
Comments
That sounds like a good idea. I suspect it might be a bit boring the whole copy-paste process to get the code out of the documentation. There is an issue in cylc-sphinx-extensions that I think is related to this issue: cylc/cylc-sphinx-extensions#8 |
Ooh, good spot. Thanks for noting that.
Yes, you are right there! But not everything can be fun &/or interesting, sadly 😁 |
FYI on the validation front it's actually kinda tricky as most code examples are actually snippets which aren't necessarily valid workflows. |
True, good point. But we should certainly aim to validate all of the full suite.rc snippets, & other self-contained logical aspects such as graph strings. In future, we could even develop a set of regular expressions etc. to check for correct & up-to-date syntax for some elements in snippets & bare lines, or for valid section headings from a list, etc. Perhaps a bit OTT, but it would be nice. |
Solving cylc/cylc-flow#2392 may help. |
We should aim towards moving all significant chunks of hard-written code out of the
.rst
content files, & (if not located already in a known place, as in e.g. #65) into a separate dedicated directory as individual files, where they would be written into the built docs from the relevant file by theliteralinclude:
directive.This would have various benefits, for example it would:
suite.rc
examples;The text was updated successfully, but these errors were encountered: