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

Userguide overhaul #316

Merged
merged 33 commits into from
Nov 24, 2021
Merged

Userguide overhaul #316

merged 33 commits into from
Nov 24, 2021

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Nov 12, 2021

Cranking through a pre-8.0 full User Guide check 😫 ...

Companion to #310

Close #248

  • update any remaining Cylc 7 bits
  • make various bits of excessive verbiage more clean and concise

@hjoliver hjoliver self-assigned this Nov 12, 2021
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Nice to cut out some of the lengthier sections of cruft.

Some small issues and test failures to fix.

@@ -1204,7 +1213,7 @@ Glossary
The new flow will now continue to run to the end.

It is also possible to have multiple :term:`flows <flow>` running in the
scheduler :term:`schduler` simultaneously.
scheduler :term:`scheduler` simultaneously.
Copy link
Member

Choose a reason for hiding this comment

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

What's the status of the reflow example above?

Can we now document a basic "reflow" workflow (something like start/pause/play/stop)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'll try to document that today, as well as optional outputs.

Copy link
Member

Choose a reason for hiding this comment

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

Bumped to a separate issue - #335

src/user-guide/task-implementation/job-scripts.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/workflows/integer-pipeline/flow.cylc Show resolved Hide resolved
@MetRonnie MetRonnie added this to the 8.0.0 milestone Nov 15, 2021
@hjoliver
Copy link
Member Author

hjoliver commented Nov 16, 2021

Thanks for the early review @oliver-sanders - some things you noted were due to this still being an in-process Draft, but mostly very useful (and time is of the essence right now!)

@hjoliver hjoliver force-pushed the userguide-overhaul branch 2 times, most recently from e66a286 to bd33774 Compare November 16, 2021 03:40
@hjoliver
Copy link
Member Author

hjoliver commented Nov 16, 2021

Have now cleaned up most of the "Running Workflows" "Writing Workflows" -> "Runtime" section, which was a real mess 😬

@hjoliver
Copy link
Member Author

(And rebased onto master, to pick up changes from my previous PR)

@hjoliver hjoliver force-pushed the userguide-overhaul branch 3 times, most recently from 5019665 to a9128bd Compare November 16, 2021 10:50
@hjoliver
Copy link
Member Author

"Writing Workflows" section almost done now. Turns out, getting through the whole thing in one day was , erm, over-optimistic. 😭

@hjoliver hjoliver force-pushed the userguide-overhaul branch 5 times, most recently from f922e05 to a7661d2 Compare November 17, 2021 22:04
@hjoliver hjoliver marked this pull request as ready for review November 18, 2021 10:19
@hjoliver
Copy link
Member Author

Undrafted. Let's get what we can in for the final beta. (I have a little more to do as noted in Element chat, but that could be a follow up).

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

👍

src/user-guide/introduction/cycling-workflows.rst Outdated Show resolved Hide resolved
src/user-guide/introduction/note-on-examples.rst Outdated Show resolved Hide resolved
src/user-guide/introduction/note-on-examples.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/authentication-files.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/authentication-files.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/index.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/scheduler-log-files.rst Outdated Show resolved Hide resolved
job states by coloured job icons.


.. TODO include task and job state images
Copy link
Member

Choose a reason for hiding this comment

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

Note, I think we can use the Cylc UI test framework (Cypress) to auto-generate screenshots of UI components e.g. the task/job state key when we get the time.

@MetRonnie MetRonnie self-requested a review November 18, 2021 18:27
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Partial review

src/user-guide/writing-workflows/jinja2.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/jinja2.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/jinja2.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/parameterized-tasks.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/parameterized-tasks.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/parameterized-tasks.rst Outdated Show resolved Hide resolved
@oliver-sanders oliver-sanders modified the milestones: 8.0rc1, 8.0b3 Nov 19, 2021
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Ongoing review

src/ext/database_diagram.py Outdated Show resolved Hide resolved
src/tutorial/scheduling/graphing.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
Comment on lines +769 to +772
The scheduler can only check for lateness once a task has appeared in its
active task window. In Cylc 8 this is usually when the task is actually
ready to run, which severely limits the usefulness of late events as
currently implemented.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The scheduler can only check for lateness once a task has appeared in its
active task window. In Cylc 8 this is usually when the task is actually
ready to run, which severely limits the usefulness of late events as
currently implemented.
The scheduler can only check for lateness once a task has appeared in its
active task window. In Cylc 8 this is usually when the task is actually
ready to run, which severely limits the usefulness of late events as
currently implemented.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sphinx doesn't mind, right? Is 3 spaces a convention we've agreed on?

Copy link
Member Author

@hjoliver hjoliver Nov 22, 2021

Choose a reason for hiding this comment

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

(applied anyway, as it does look a bit nicer in the source file)

Copy link
Member

Choose a reason for hiding this comment

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

Is 3 spaces a convention we've agreed on

Yes.

When we started the cylc-doc we inherited the convention from rose (http://metomi.github.io/rose/doc/html/developing/restructuredtext.html) e.g. heading order =, -, ^ which tried to use the prevailing conventions. These are still the prevailing conventions, more or less.

Sphinx doesn't mind, right.

Depends on the version! Mixed indentation did cause us issues in the past when upgrading Sphinx version.

(I think Sphinx might now be going beyond the ReST spec to make things more user friendly now, not sure.)

ReST is highly sensitive to indentation, this is by design, some things might work but not generate the result you intended.

Safer and easier to stick to the prevailing convention.

...

Long answer to aforementioned quibbles since you raised it...

Directives

Directive form 1:

.. directive:: arg1 arg2
   :opt1: value1
   :opt2: value2

   content

Directive form 2:

.. directive::
   arg1
   arg2
   :opt1: value1
   :opt2: value2

   content

Admonitions

In this case the content is actually passed to the directive as an argument.

.. note::
   content

I think Sphinx has some logic to handle this for admonitions, however, it will break other directives so safer to be consistent.

Indentation

"Natural indentation" should be used i.e subsequent lines should align with the start of previous lines, so:

* foo
  bar (2 space)

1. foo
   bar (3 space)

.. directive::

   content (3 space)

Blockquotes and .. code

Code and blockquotes are indentation sensitive:

Paragraph::

   Code example

Paragraph

   Blockquote

Example: Malformed directive:

.. directive::

  two space indented content

Should this be:

<directive>
  content
</directive>

Or:

<directive />
<blockquote>
  content
</blockquote>

???

Example: Mixed indentation (someone came along later and edited or added to a directive):

.. directive::

   content (3 spaces)

  more content (2 spaces)

Same ambiguity as before but worse.

Note there is a line reset character, I think its |, I'm not sure if its a ReST or a Sphinx feature though which muddies the water somewhat.

Bullets and definition lists

.. two bullet lists NOT connected

* one
* two
* three

* one
* two
* three

.. two definition lists NOT connected

foo
   foo
bar
   bar
baz
   baz

foo
   foo
bar
   bar
baz
   baz

Arbitrary white-space matters here.

Headings

Heading order is based on definition order so the following two examples are both correct:

H1
===

H2
---

H3
^^^
H1
^^^

H2
---

H3
===

This is confusing as heck so keep to convention!

Note Sphinx likes threes, three space indent, and three character minimum for heading underlines!

Copy link
Member

Choose a reason for hiding this comment

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

@oliver-sanders Is it worth adding that to CONTRIBUTING.md?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, in a slightly more refined form.

I think this is in the Sphinx docs and in the rose/developing page (I think the rose dev pages are a little out of date).

src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

Ongoing review

src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
.. versionadded:: 8.0.0

Breaking graph strings on ``&`` and ``|`` is new at Cylc 8
Graph strings can be broken on ``&`` and ``|`` as well as ``=>``.
Copy link
Member

Choose a reason for hiding this comment

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

The placement of this versionadded admonition disrupts the example that is being shown imho

src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/scheduler-start-up.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/task-job-states.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/task-job-states.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/task-job-states.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/tracking-task-state.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/authentication-files.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/simulation-modes.rst Outdated Show resolved Hide resolved
src/user-guide/running-workflows/simulation-modes.rst Outdated Show resolved Hide resolved
.. _WorkflowStorageEtc:

Workflow Storage, Discovery, Revision Control, and Deployment
=============================================================
Copy link
Member

Choose a reason for hiding this comment

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

Is there not a replacement for this section?

Copy link
Member Author

@hjoliver hjoliver Nov 23, 2021

Choose a reason for hiding this comment

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

I don't think its necessary really. Python (for instance) doesn't bother to document why it doesn't have built in storage and revision control for Python programs - it should be obvious to users. And it seems to me we shouldn't be recommending Rose for the job until some future git-based version, knowing that everyone (even UM Partners) has moved away from svn outside of the MOSRS.

@hjoliver
Copy link
Member Author

@MetRonnie - hopefully good to go now 🤞

Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Good pending some minor points (will push changes and get this in!).

src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
@@ -1204,7 +1213,7 @@ Glossary
The new flow will now continue to run to the end.

It is also possible to have multiple :term:`flows <flow>` running in the
scheduler :term:`schduler` simultaneously.
scheduler :term:`scheduler` simultaneously.
Copy link
Member

Choose a reason for hiding this comment

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

Bumped to a separate issue - #335

src/user-guide/running-workflows/index.rst Show resolved Hide resolved
src/user-guide/writing-workflows/runtime.rst Show resolved Hide resolved
Comment on lines +769 to +772
The scheduler can only check for lateness once a task has appeared in its
active task window. In Cylc 8 this is usually when the task is actually
ready to run, which severely limits the usefulness of late events as
currently implemented.
Copy link
Member

Choose a reason for hiding this comment

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

Is 3 spaces a convention we've agreed on

Yes.

When we started the cylc-doc we inherited the convention from rose (http://metomi.github.io/rose/doc/html/developing/restructuredtext.html) e.g. heading order =, -, ^ which tried to use the prevailing conventions. These are still the prevailing conventions, more or less.

Sphinx doesn't mind, right.

Depends on the version! Mixed indentation did cause us issues in the past when upgrading Sphinx version.

(I think Sphinx might now be going beyond the ReST spec to make things more user friendly now, not sure.)

ReST is highly sensitive to indentation, this is by design, some things might work but not generate the result you intended.

Safer and easier to stick to the prevailing convention.

...

Long answer to aforementioned quibbles since you raised it...

Directives

Directive form 1:

.. directive:: arg1 arg2
   :opt1: value1
   :opt2: value2

   content

Directive form 2:

.. directive::
   arg1
   arg2
   :opt1: value1
   :opt2: value2

   content

Admonitions

In this case the content is actually passed to the directive as an argument.

.. note::
   content

I think Sphinx has some logic to handle this for admonitions, however, it will break other directives so safer to be consistent.

Indentation

"Natural indentation" should be used i.e subsequent lines should align with the start of previous lines, so:

* foo
  bar (2 space)

1. foo
   bar (3 space)

.. directive::

   content (3 space)

Blockquotes and .. code

Code and blockquotes are indentation sensitive:

Paragraph::

   Code example

Paragraph

   Blockquote

Example: Malformed directive:

.. directive::

  two space indented content

Should this be:

<directive>
  content
</directive>

Or:

<directive />
<blockquote>
  content
</blockquote>

???

Example: Mixed indentation (someone came along later and edited or added to a directive):

.. directive::

   content (3 spaces)

  more content (2 spaces)

Same ambiguity as before but worse.

Note there is a line reset character, I think its |, I'm not sure if its a ReST or a Sphinx feature though which muddies the water somewhat.

Bullets and definition lists

.. two bullet lists NOT connected

* one
* two
* three

* one
* two
* three

.. two definition lists NOT connected

foo
   foo
bar
   bar
baz
   baz

foo
   foo
bar
   bar
baz
   baz

Arbitrary white-space matters here.

Headings

Heading order is based on definition order so the following two examples are both correct:

H1
===

H2
---

H3
^^^
H1
^^^

H2
---

H3
===

This is confusing as heck so keep to convention!

Note Sphinx likes threes, three space indent, and three character minimum for heading underlines!

src/user-guide/writing-workflows/runtime.rst Outdated Show resolved Hide resolved
src/user-guide/writing-workflows/scheduling.rst Outdated Show resolved Hide resolved
@hjoliver
Copy link
Member Author

Test fail is unrelated:

error: can't copy 'metomi/rose/etc/tutorial/rose-weather-forecasting-suite/bin': doesn't exist or not a regular file

All review suggestions applied.

@hjoliver hjoliver merged commit 601010c into cylc:master Nov 24, 2021
@hjoliver hjoliver deleted the userguide-overhaul branch November 24, 2021 19:53
@MetRonnie MetRonnie mentioned this pull request Feb 7, 2022
4 tasks
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.

Add glossary entry for n window (aka window on the workflow)
3 participants