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

user-guide: examples #666

Merged
merged 1 commit into from
Jan 31, 2024
Merged

user-guide: examples #666

merged 1 commit into from
Jan 31, 2024

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Oct 17, 2023

  • Document the major design patters for implementing Cylc workflows.
  • Along with add example workflows cylc-flow#5773, this closes examples #627
  • Add some functional examples for users to play with.
  • The aim is to help assist workflow writers by providing them with minimal templates to flush out.

Screenshot from 2023-10-17 17-39-36

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.

* Document the major design patters for implementing Cylc workflows.
* Along with cylc/cylc-flow#5773, this closes cylc#627
* Add some functional examples for users to play with.
* The aim is to help assist workflow writers by providing them with
  minimal templates to flush out.
@oliver-sanders oliver-sanders added this to the 8.3.0 milestone Oct 17, 2023
@oliver-sanders oliver-sanders self-assigned this Oct 17, 2023
Copy link
Contributor

@markgrahamdawson markgrahamdawson left a comment

Choose a reason for hiding this comment

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

Nice - these will be useful for me! - there is an error message from the tests
/home/runner/work/cylc-doc/cylc-doc/src/user-guide/examples/index.rst:6: WARNING: toctree glob pattern '*/index' didn't match any documents

@oliver-sanders oliver-sanders marked this pull request as ready for review December 13, 2023 13:54
@markgrahamdawson markgrahamdawson dismissed their stale review December 13, 2023 13:58

Tests failing

@oliver-sanders
Copy link
Member Author

The tests will fail until the cylc-flow PR is merged.

To build locallay, you'll need to checkout this branch (cylc-doc) and the corresponding cylc-flow branch then make clean html.


# rm cylc-flow-examples || true
examples="$(python -c 'import cylc.flow; from pathlib import Path; print(Path(cylc.flow.__file__).parent)')/etc/examples"
for example in $(echo "${examples}/"*); do
Copy link
Member

Choose a reason for hiding this comment

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

Might be a bit less awkward if this whole file was a python script?

Copy link
Member Author

Choose a reason for hiding this comment

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

I generally use Bash for simple systemy things like this.

Copy link
Member

Choose a reason for hiding this comment

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

If you want to switch to the light side 😛

#!/usr/bin/env python3
from pathlib import Path
import cylc.flow

examples_dir = Path(cylc.flow.__file__).parent / "etc/examples"

for example in examples_dir.iterdir():
    if example.is_dir():
        target = Path("src/user-guide/examples") / example.name
        target.unlink(missing_ok=True)
        target.symlink_to(example)

src/user-guide/examples/index.rst Show resolved Hide resolved

# rm cylc-flow-examples || true
examples="$(python -c 'import cylc.flow; from pathlib import Path; print(Path(cylc.flow.__file__).parent)')/etc/examples"
for example in $(echo "${examples}/"*); do
Copy link
Member

Choose a reason for hiding this comment

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

If you want to switch to the light side 😛

#!/usr/bin/env python3
from pathlib import Path
import cylc.flow

examples_dir = Path(cylc.flow.__file__).parent / "etc/examples"

for example in examples_dir.iterdir():
    if example.is_dir():
        target = Path("src/user-guide/examples") / example.name
        target.unlink(missing_ok=True)
        target.symlink_to(example)

@oliver-sanders
Copy link
Member Author

Upstream branch merged, tests now running.

One spelling mistake causing the failures, fixed in: cylc/cylc-flow#5951

@oliver-sanders oliver-sanders merged commit c527537 into cylc:master Jan 31, 2024
1 of 2 checks passed
@oliver-sanders oliver-sanders deleted the examples branch January 31, 2024 14:59
@oliver-sanders
Copy link
Member Author

Passed, merging

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.

examples
3 participants