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

Main loop plugins #119

Merged
merged 3 commits into from
Apr 22, 2020
Merged

Main loop plugins #119

merged 3 commits into from
Apr 22, 2020

Conversation

oliver-sanders
Copy link
Member

Companion to cylc/cylc-flow#3492

Document the newfangled main-loop plugins.

@oliver-sanders oliver-sanders added the content Addition or modification of documentation label Apr 6, 2020
@oliver-sanders oliver-sanders added this to the 1.0.0 milestone Apr 6, 2020
@oliver-sanders oliver-sanders self-assigned this Apr 6, 2020
Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Nice, very helpful for reviewing the Cylc Flow PR for plugins. The documentation is in the code of Cylc Flow , so will comment there if I find anything.

Approved! Only minor issue were some links that are not working @oliver-sanders , like auto_restart. For some reason I didn't get the module in my User Guide I think? This link (from my generated singlehtml file) works:

file:///home/kinow/Development/python/workspace/cylc-doc/doc/8.0a1/singlehtml/index.html#module-cylc.flow.main_loop

But every link for one of the modules in this package result in 404, like

file:///home/kinow/Development/python/workspace/cylc-doc/doc/8.0a1/singlehtml/index.html#module-cylc.flow.main_loop.auto_restart

I re-created the venv, and used pip install -e .[all] in Cylc Flow (from your other branch) and again for cylc-doc. Not a blocker IMO 👍 great stuff.

such they can often trigger on time even if the suite is delayed to
the point that downstream tasks are late due to their dependence on
previous-cycle tasks that are delayed.
See :py:mod:`cylc.flow.main_loop.auto_restart` for details.
Copy link
Member

Choose a reason for hiding this comment

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

Link not working for me (checked out Cylc Flow PR for main loop, then pip install -e . with my cylc-doc's venv).

Copy link
Member

Choose a reason for hiding this comment

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

Yes I found the same..

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yeah, so these :py: thinggies are code references which only work if the code being referenced is auto-documented. The documentation system uses Python introspection so the thing you're documenting must be installed.

@oliver-sanders
Copy link
Member Author

I think from a similar Simmental by Tim on the Sphinx-Cylc-extensions repo, that the Sphinx autosummary plugin is not simpatico with singlehtml, at lest when autobuilding. Simple solution, don’t build singlehtml, perhaps unhelpful. Will look and see if anyone has raised this with sphinxdoc at some point.

@oliver-sanders
Copy link
Member Author

In the above there are phone typos for the words, “comment” and “compatible” that are so brilliant that I’m not going to edit the comment to fix them.

@kinow
Copy link
Member

kinow commented Apr 6, 2020

Links working on the make clean html version. Thanks @oliver-sanders !

Copy link
Member

@dwsutherland dwsutherland left a comment

Choose a reason for hiding this comment

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

Looks good to me..

However, as @kinow found;

  • I had to install cylc-flow with the entry-points branch checked out..
  • And the "Next/Previous" navigation doesn't cycle through all the built-in plugins.. Although they are available via the table: file:///home/sutherlander/cylc/cylc-doc/doc/current/html/user-guide/plugins/main-loop/index.html#built-in-plugins

⭐️

@oliver-sanders
Copy link
Member Author

And the "Next/Previous" navigation doesn't cycle through all the built-in plugins

Replied on Riot with a video on my branch.

@oliver-sanders
Copy link
Member Author

Whilst we're all here, how do you feel about this approach of burying large quantities of documentation in the Cylc Flow codebase.

When you're documenting functions, classes, etc it makes good sense. When you are writing more user-guide oriented narrative, however, perhaps not quite perfect.

@kinow
Copy link
Member

kinow commented Apr 7, 2020

Whilst we're all here, how do you feel about this approach of burying large quantities of documentation in the Cylc Flow codebase.

When you're documenting functions, classes, etc it makes good sense. When you are writing more user-guide oriented narrative, however, perhaps not quite perfect.

Fine either way I think. Only possible disadvantage I can think of, is if a user finds an error in the docs. That would require fixing in Cylc Flow, not in cylc-doc if that's auto-generated. Then probably the CI would take care to re-publish latest docs with the fix. For a user contributing, I think it's harder to preview the changes. But it could be easier to maintain for developers this way (i.e. code and docs are synced).

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Apr 7, 2020

A couple of disadvantages from me:

  • Hard to git grep for phrases.
  • It is possible/easy to break the docs build due to simple errors in docstrings.

I'm in two minds, but for niche dev stuff that's tied to an API, perhaps best to have the docs in the code.

@kinow
Copy link
Member

kinow commented Apr 7, 2020

It is possible/easy to break the docs build due to simple errors in docstrings.

At the same time forces developers to fix the doc in their code, a good side-effect I think.

@kinow
Copy link
Member

kinow commented Apr 22, 2020

Two approvals, LGTM

@kinow kinow merged commit d1e5cdb into cylc:master Apr 22, 2020
@oliver-sanders oliver-sanders deleted the main-loop-plugins branch April 22, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Addition or modification of documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants