-
Notifications
You must be signed in to change notification settings - Fork 94
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
Cylc 728 (with linter) #4900
Cylc 728 (with linter) #4900
Conversation
77871a1
to
aa4e933
Compare
Looks good 👍 only thing is we should probably exclude the log directory |
Would probably call the command |
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 have tried this on
[cylc]
UTC mode = True
[scheduling]
initial cycle point = 2000-01-01T00Z
final cycle point = 2000-01-04T00Z
[[dependencies]]
[[[PT3H]]]
graph = """
get_observations_belmullet & get_observations_camborne & get_observations_heathrow & get_observations_shetland => consolidate_observations
"""
expecting it to pick up on [cylc]
and graph =
, but instead it just says
Checked cylc7-datetime-cycling/suite.rc and found 0 issues.
I cannot replicate this - does it still happen? I get > cylc 728
[001: 7-to-8]/net/home/h02/tpilling/cylc-src/temp/flow.cylc: 0: section ``[cylc]`` is now called ``[scheduler]``.
[021: 7-to-8]/net/home/h02/tpilling/cylc-src/temp/flow.cylc: 5: ``[dependencies]`` is deprecated.
[022: 7-to-8]/net/home/h02/tpilling/cylc-src/temp/flow.cylc: 7: ``[cycle point]graph =`` is deprecated, use ``cycle point = <graph>``
Checked /net/home/h02/tpilling/cylc-src/temp and found 3 issues. |
@MetRonnie - I showed @oliver-sanders the fact that I've effectively already written a linter and he got a bit excited and made a fair few suggestions. I've implemented a couple so this PR has changed again. |
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.
Partial review done @wxtim but there's a bunch of spurious changes that already exist on master - might be a rebase required?
@hjoliver - I think that I must have botched a rebase - I think that's now fixéd. |
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.
Linting works, however the line numbers are 1 lower than they should be
This may be due to the shebang line? If so, note this may or may not be present. |
required a |
@wxtim Flake8 failure (and while you're at it could you squash down these |
6623ebb
to
f171c72
Compare
I'm getting spurious changes coming through in f171c72 (undoing recent commits on master). This is my effort at rebasing: https://github.com/MetRonnie/cylc-flow/tree/tmp. If you're happy with it could you reset your branch to the tip of that? (Converting to draft so as not to merge with these reversions) |
- Delete the examples section of the docstring as per HO suggestion Co-authored-by: Hilary James Oliver <hilary.j.oliver@gmail.com>
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.
Now it is running 728 checks on suite.rc workflows
Found two small issues (sorry):
|
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.
Formatting issue
$ cylc lint simple-c7-datetime/
Checked ~/cylc-run/simple-c7-datetime against style checksFound no issues.
$ # ^ missing punctuation
cylc/flow/scripts/lint.py
Outdated
f'Checked {target} against {check_names} checks' | ||
f'rules and found {count} issue' | ||
f'rules and found {count} issue(s).' |
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.
"checksrules"
Checked {target} against {check_names} checksrules and found {count} issue(s).
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.
Tested, happy my review comments have been addressed.
(please squash this one when you merge 😁)
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
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.
🎇🎊🎉
Work in Progress
Posted as a PR for discussion on whether the approach seems OK - it's slightly over-engineered on the basis that it could become a Cylc Linter with very little work.
These changes close #4519
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.cylc lint
cylc-doc#480.