-
Notifications
You must be signed in to change notification settings - Fork 54
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
Reduce Rose-Cylc interaction part 1 #2239
Reduce Rose-Cylc interaction part 1 #2239
Conversation
929473d
to
84a79d5
Compare
da6e33e
to
08b8d06
Compare
etc/rose.conf.example
Outdated
@@ -19,6 +19,9 @@ meta-path=DIR1[:DIR2[:...]] | |||
# | |||
# URL to Rose documentation. | |||
rose-doc=http://metomi.github.io/rose/ | |||
# |
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.
This will create a leading blank line in the docs.
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.
Should now be fixed.
Code looks good, a good bit of waffle removed. Functionality testing to follow. |
Just added another changeset to remove more unused logic. |
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'm mid-review, but will record some initial comments, all minor. I have been unable to break anything thus far. The new settings are documented well; the docs build & new parts read & link fine.
- The three test modules
26-...
to28- ...
undert/rose-suite-run
are very repetitive with respect to the example set-up & expected processedsuite.rc
files (not just due to this PR, but it has increased the replication). Is it worth trying to consolidate these? - While grepping for
--host
, I noticed thatt/rose-cli-bash-completion/01-suite-running.t
usesrose suite-run ... --host=localhost
on line 32, with the host option having no effect (setting it to another valid host or a random string does not change the test pass, both here & on the current master.) Unless you know of a purpose for it, we might as well remove it in this PR.
items = [] | ||
for dirpath, dnames, fnames in os.walk(rootd, followlinks=True): | ||
if dirpath != rootd and any( | ||
name in dnames or name in fnames for name in sub_names): |
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.
Is it perhaps more Pythonic to do any(name in dnames + fnames for ...)
?
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.
It is nicer syntax certainly. Not sure whether the extra +
operation will have a penalty against the or
short circuit logic. Not likely to have any impact here. I'll change the syntax just for the readability.
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 don't think or
and +
will do the same thing here?
>>> a = [1,2,3]
>>> b = [4,5,6]
>>> [x for x in a or x in b]
[1, 2, 3]
>>> [x for x in a + b]
[1, 2, 3, 4, 5, 6]
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.
The original logic is more like:
any(x in a or x in b for x in x_list)
# which should give the same results as:
any(x in a + b for x in x_list)
I'll leave I'll also leave |
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.
Functional & sensible overall. Tests pass locally. Previous feedback addressed well.
This has been broken by cylc/cylc-flow#2759 ( Re-starting Travis-CI build. |
OK. I'll take a look at the failed tests. |
36bdff5
to
34d4943
Compare
I am out of time. I have fixed 2 of 3 failed tests, but am unable to get the tutorial forecasting suite run to pass in my environment at the moment. |
I'll see if I can put up a fix to The failure occurs (with your changes to the A further change will be required after cylc/cylc-flow#2818 is merged, I'll take a look in tomorrow. |
34d4943
to
1086d67
Compare
Looks like the |
The `--host=HOST` option for Cylc commands should now be redundant. Load suite contact file to determine whether a suite is running or not. Find suite contact files to list running suites. Modify `rose suite-gcontrol --all` to launch `cylc gscan`. Modify `rose suite-scan` to launch `cylc scan` directly. Rose suite automatic/custom environment variables now go to suite.rc. New ROSE_SITE environment variable + site=SITE setting
bc38892
to
bc659d3
Compare
|
fix tutorial suite test
This is mainly a companion change for cylc/cylc-flow#2693:
--host=HOST
option for most Rose-wrapped-Cylc commands should now be redundant.rose suite-gcontrol --all
to launchcylc gscan
(instead of launching manycylc gui
which can cause a machine to run out of resource).rose suite-scan
to simply invokecylc scan
directly.suite.rc
.ROSE_SITE
environment/jinja2 suite variable +site=SITE
setting - useful for site portable suites.