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

Assorted tutorial fixes against Cylc 8 #4869

Merged
merged 10 commits into from
Jun 28, 2022

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented May 12, 2022

Correct get-wind-data

These changes close #4660

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Not currently tested - manually tested.
  • No change log entry required (tutorial workflow content).
  • No documentation update required.

Correct get-wind-data
@wxtim wxtim requested a review from MetRonnie May 12, 2022 11:19
@wxtim wxtim self-assigned this May 12, 2022
@wxtim wxtim added the doc Documentation label May 12, 2022
@wxtim wxtim added this to the cylc-8.0.0 milestone May 12, 2022
Comment on lines -84 to +85
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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better now

wind

Copy link
Member Author

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/cylc-forecasting-workflow/flow.cylc Outdated Show resolved Hide resolved
@MetRonnie MetRonnie added tutorial-workflows small and removed doc Documentation labels May 12, 2022
@wxtim wxtim marked this pull request as draft May 13, 2022 12:22
@wxtim wxtim marked this pull request as ready for review May 13, 2022 12:50
@wxtim wxtim requested review from hjoliver and MetRonnie May 17, 2022 14:35
@hjoliver
Copy link
Member

Failing test:

FAILED tests/unit/test_resources.py::test_get_resources_all[tutorial/runtime-tutorial]

@MetRonnie MetRonnie modified the milestones: cylc-8.0.0, cylc-8.0rc4 May 18, 2022
@@ -0,0 +1,12 @@
# WARNING: This file contains an anti-pattern
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problems:

Copy link
Member Author

@wxtim wxtim May 20, 2022

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

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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.

Copy link
Member

@MetRonnie MetRonnie Jun 27, 2022

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?

Copy link
Member

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...

@wxtim wxtim requested a review from MetRonnie May 19, 2022 07:16
@wxtim wxtim removed the request for review from oliver-sanders May 20, 2022 09:08
@wxtim wxtim changed the title Pass Path Variables to Job Assorted tutorial fixes against Cylc 8 Jun 21, 2022
@wxtim
Copy link
Member Author

wxtim commented Jun 27, 2022

@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.

Comment on lines -20 to +21
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
Copy link
Member

@MetRonnie MetRonnie Jun 27, 2022

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
Copy link
Member

@MetRonnie MetRonnie Jun 27, 2022

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?

@hjoliver hjoliver merged commit d522ad8 into cylc:master Jun 28, 2022
@wxtim wxtim deleted the tutorial.workflow_fixes branch June 28, 2022 09:11
@hjoliver hjoliver modified the milestones: cylc-8.0rc4, cylc-8.0.0 Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial workflow: messed up wind plot
4 participants