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

Docs: "Splitting Up Long Graph Lines" is misleading #766

Open
elliotfontaine opened this issue Sep 27, 2024 · 2 comments
Open

Docs: "Splitting Up Long Graph Lines" is misleading #766

elliotfontaine opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@elliotfontaine
Copy link

Description

Splitting Up Long Graph Lines

It is not necessary to use the fragile line continuation marker \ to split long graph lines. You can break at dependency arrows (=>) and operators (&, |), or split long chains into smaller ones. This graph:

R1 = "A & B => C"

is equivalent to this:

R1 = """
    A & B =>
    C
"""

and also to this:

R1 = """
    A &
    B => C
"""

The docs imply that you need to have the symbol at the end of the first line, for line continuation to work.
However, this works too:

R1 = """
    A & B
    => C
"""

Reproducible Example

https://github.com/cylc/cylc-flow/blob/master/tests/functional/ext-trigger/00-satellite/flow.cylc , cylc graph is the same for the following 3 permutations:

P1 = """
            # Processing chain for each dataset
            get_data => proc1 => proc2 => products
            # As one dataset is retrieved, start waiting on another.
            get_data[-P1] => get_data
        """
P1 = """
            # Processing chain for each dataset
            get_data => proc1 => proc2 => 
            products
            # As one dataset is retrieved, start waiting on another.
            get_data[-P1] => get_data
        """
P1 = """
            # Processing chain for each dataset
            get_data => proc1 => proc2
            => products
            # As one dataset is retrieved, start waiting on another.
            get_data[-P1] => get_data
        """

Expected Behaviour

For it to be documented.

@elliotfontaine elliotfontaine added the bug Something isn't working label Sep 27, 2024
@elliotfontaine
Copy link
Author

elliotfontaine commented Sep 27, 2024

This should probably be an issue for https://github.com/cylc/cylc-doc. But I wasn't 100% of it being expected behavior.

I'll close and repost it on the docs repo if needed.

@hjoliver
Copy link
Member

Thanks @elliotfontaine - fair point. No need to close and repost, I can move the issue to cylc-doc.

@hjoliver hjoliver transferred this issue from cylc/cylc-flow Sep 30, 2024
@hjoliver hjoliver added this to the 8.3.x milestone Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants