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

Fix parsec example code #2882

Merged
merged 1 commit into from
Nov 26, 2018
Merged

Fix parsec example code #2882

merged 1 commit into from
Nov 26, 2018

Conversation

kinow
Copy link
Member

@kinow kinow commented Nov 26, 2018

Had fixed the examples before while working on the setup.py #2834 PR, but removed it as it doesn't really belong there.

Instead submitting a separated PR. After fixing it, the test.py prints:

title = parsec torture test
[list values]
    [[integer lists]]
        foo = 1..3, 3, 3, 4, 4
        bar = 1..3, 3, 3, 4, 4
    [[float lists]]
        foo = 1.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0
        bar = 1.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0
    [[string lists]]
        compulsory = one, two
        one = the quick, brown fox
        two = the quick, brown fox
        thr = the quick, brown fox
        fou = 'the, quick', 'brown , fox'
        fiv = 'the #quick', 'brown #fox'
[single values]
    [[integers]]
        one = 1
        two = 1
        thr = 1
    [[multiline strings with internal comments]]
        one = """
            the quick # or slow
            brown fox # or lazy dog
        """
        two = """
            the quick # or slow
            brown fox # or lazy dog
        """
    [[booleans]]
        one = False
        two = False
        thr = False
        fou = False
        fiv = False
        six = False
    [[multiline strings]]
        one = """
            the quick
            brown fox
        """
        two = """
            the quick
            brown fox
        """
    [[strings with internal comments]]
        fou = the quick brown fox # jumped over
        fiv = the quick brown fox # jumped over
        eig = the quick BROWN fox # jumped over
        nin = the quick BROWN fox # jumped over
    [[strings]]
        one = the quick brown fox
        two = the quick brown fox
        thr = the quick brown fox
        six = the quick brown fox
        sev = the quick brown fox
        an item = the quick brown fox
        override me = OVERRIDDEN
    [[floats]]
        one = 9.9
        two = 9.9
        thr = 9.9

Not sure whether the examples are important/used right now, but maybe once fixed, later we could port to documentation, or to doctests, or even to parsec unit tests; I think.

@kinow kinow self-assigned this Nov 26, 2018
@kinow kinow added this to the later milestone Nov 26, 2018
@kinow kinow added the small label Nov 26, 2018
@hjoliver
Copy link
Member

Thanks @kinow. Cylc users should never have to see this, I guess (it was probably for my own use when writing parsec, as I recall, with vague intentions of making it independent of cylc at the time)... but good to have it fixed anyway!

@hjoliver hjoliver self-requested a review November 26, 2018 03:14
@hjoliver
Copy link
Member

One review will do.

@hjoliver
Copy link
Member

(I can see from this example that parsec predates our adoption of PEP8 coding style 😬 ).

@kinow
Copy link
Member Author

kinow commented Nov 26, 2018

(I can see from this example that parsec predates our adoption of PEP8 coding style grimacing ).

I started fixing the PEP8 issues too, but gave up to make reviewing simpler (way too many changes for using GitHub's diff UI). But happy to quickly add another commit fixing that if that's better

@hjoliver
Copy link
Member

But happy to quickly add another commit fixing that if that's better

No, don't bother for now. I'll merge this now....

@hjoliver hjoliver modified the milestones: later, next release Nov 26, 2018
@hjoliver hjoliver merged commit ca34aaf into cylc:master Nov 26, 2018
@kinow kinow deleted the fix-parsec-examples branch March 14, 2019 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants