-
Notifications
You must be signed in to change notification settings - Fork 93
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
Assorted tutorial fixes against Cylc 8 #4869
Conversation
Correct get-wind-data
x_coords = [datum[0] for datum in data] | ||
y_coords = [datum[1] for datum in data] | ||
x_coords = [datum[1] for datum in data] | ||
y_coords = [datum[0] for datum in data] |
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.
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 wanted to add a map layer but couldn't find a nice way of doing it without adding another dependency. No thanks.
cylc/flow/etc/tutorial/runtime-tutorial/etc/python-job.settings
Outdated
Show resolved
Hide resolved
Failing test:
|
cylc/flow/etc/tutorial/runtime-tutorial/etc/python-job.settings
Outdated
Show resolved
Hide resolved
cylc/flow/etc/tutorial/consolidation-tutorial/etc/python-job.settings
Outdated
Show resolved
Hide resolved
cylc/flow/etc/tutorial/runtime-introduction/etc/python-job.settings
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,12 @@ | |||
# WARNING: This file contains an anti-pattern |
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.
Any reason this one has not been made into a symlink?
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 didn't pass the tests when it was a symlink.
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.
Then it seems suspicious the others are passing
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 problems:
-
The symlink points outside of the workflow source so gets broken on install
-
There is inconsistency in the test scripts between the three:
cylc-flow/cylc/flow/etc/tutorial/runtime-introduction/.validate
Lines 18 to 23 in 47ec638
set -eux FLOW_NAME="$(< /dev/urandom tr -dc A-Za-z | head -c6)" cylc install --workflow-name "$FLOW_NAME" --no-run-name cylc validate --check-circular --icp=2000 "$FLOW_NAME" cylc play --no-detach --abort-if-any-task-fails "$FLOW_NAME" cylc clean "$FLOW_NAME" cylc-flow/cylc/flow/etc/tutorial/consolidation-tutorial/.validate
Lines 19 to 21 in 9ad4c07
set -eux cylc validate . --icp=2000 (
runtime-tutorial
does not even have a.validate
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.
Yes. Might as well fix it in this PR, it's mission-creeped enow already - I haven't touched these files before, so I have no idea why they are failing - Although since I moved them into the repo it's probably my fault! 😄
There is inconsistency in the test scripts between the three:
Some of these workflows are committed in a broken state, the aim of the tutorial to be to get the student to fix them.
On examination the usage of runtime-introduction
in .validate
doesn't match the usage in Cylc-doc - I've made it match and now it should work.
I've opened a ticket to thoroughly check the docs #4892
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.
Note we have been using symlinks with the tutorials for years when they were in Rose, using rsync
to install. Since cylc install
is rsync
underneath I would expect it to be the same deal?
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'll have a look. I guess this is urgent - it ought to go in before the seminars
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 seems to have sorted itself out. I don't know what was going on, but it no longer appears to be going.
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.
Ah got it - cylc get-resources tutorial
turns the symlinks into files.
But cylc install
does not. Worth opening an issue about?
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.
Answer: no. We might consider adding an option that would turn on this feature of rsync, but only if someone asks for it...
@MetRonnie @oliver-sanders _ I think that this is both ready - I've double checked the discussions and I think that the PR's made since those discussions have sorted the problem. I feel that this should go in ASAP now. |
cylc install --workflow-name "$FLOW_NAME" --no-run-name | ||
SRC=$(cylc get-resources tutorial 2>&1 | head -n1 | awk '{print $NF}') | ||
cylc install "${SRC}/runtime-introduction" --workflow-name "$FLOW_NAME" --no-run-name |
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.
Just a thought for consistency, instead of doing this here, how about making run-validate-tutorials
do
+SRC=$(cylc get-resources tutorial 2>&1 | head -n1 | awk '{print $NF}')
+cd "$SRC"
-for FILE in $(echo ../../cylc/flow/etc/tutorial/*/.validate) ; do
+for FILE in $(echo */.validate) ; do
@@ -0,0 +1,12 @@ | |||
# WARNING: This file contains an anti-pattern |
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.
Ah got it - cylc get-resources tutorial
turns the symlinks into files.
But cylc install
does not. Worth opening an issue about?
Correct get-wind-data
These changes close #4660
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.