-
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
user-guide: examples #666
user-guide: examples #666
Conversation
* 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.
There was a problem hiding this 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
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 |
|
||
# 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
|
||
# 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 |
There was a problem hiding this comment.
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)
Upstream branch merged, tests now running. One spelling mistake causing the failures, fixed in: cylc/cylc-flow#5951 |
Passed, merging |
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.