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

Update to isodatetime 3.0 #4554

Merged
merged 8 commits into from
Apr 7, 2022
Merged

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Dec 14, 2021

These changes address #4110 (comment). When we release isodatetime 3.0.0, this PR allows Cylc to work with the changed API.

  • Relies on isodatetime 3.0.0 being released

isodatetime 3.0.0 fixes a longstanding mistake in the implementation of recurrence format number 1 (metomi/isodatetime#45).

See also isodatetime changelog

Edit: as recurrence format 1 is undocumented (in Cylc docs) and rarely used, will postpone this to 8.0rc3

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.
  • Already covered by existing tests.
  • Appropriate change log entry included.
  • (master branch) I have opened a documentation PR Improve cycling docs cylc-doc#454

@MetRonnie MetRonnie added the non-cylc bug This is a bug, but not in Cylc label Dec 14, 2021
@MetRonnie MetRonnie added this to the cylc-8.0rc1 milestone Dec 14, 2021
@MetRonnie MetRonnie self-assigned this Dec 14, 2021
@MetRonnie MetRonnie added the BLOCKED This can't happen until something else does label Dec 14, 2021
@MetRonnie MetRonnie modified the milestones: cylc-8.0rc1, cylc-8.0rc2 Dec 14, 2021
@MetRonnie MetRonnie removed the BLOCKED This can't happen until something else does label Jan 6, 2022
@MetRonnie MetRonnie modified the milestones: cylc-8.0rc2, cylc-8.0rc3 Mar 16, 2022
@MetRonnie MetRonnie force-pushed the update-isodatetime branch 3 times, most recently from 73cc84e to b92485a Compare March 31, 2022 15:27
@MetRonnie MetRonnie marked this pull request as ready for review March 31, 2022 15:36
@@ -9,7 +9,7 @@ dependencies:
- graphene >=2.1,<3
- graphviz # for static graphing
- jinja2 ==2.11.0,<2.12
- metomi-isodatetime >=1!2.0.2, <1!2.1.0
- metomi-isodatetime >=1!3.0.0, <1!3.1.0
Copy link
Member

Choose a reason for hiding this comment

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

I think the upper pin is a good idea for isodatetime!

@MetRonnie MetRonnie marked this pull request as draft March 31, 2022 17:40
@MetRonnie MetRonnie marked this pull request as ready for review April 5, 2022 09:02

run_fail "${TEST_NAME_BASE}" cylc validate .
cmp_ok "${TEST_NAME_BASE}.stderr" <<'__ERR__'
SequenceDegenerateError: R/20100101T0000Z/P0Y, point format CCYYMMDDThhmmZ: equal adjacent points: 20100101T0000Z => 20100101T0000Z.
Copy link
Member Author

@MetRonnie MetRonnie Apr 5, 2022

Choose a reason for hiding this comment

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

This error was only raised on validation, was never raised on run. I have replaced it with a warning, see tests/unit/test_config.py

(Note the diff here should really be deletion of the file and creation of a new, unrelated test, though Git thinks it has been renamed and changed)

@MetRonnie
Copy link
Member Author

(Test failures due to usual integration tests hanging on GH Actions)

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

Read through, need to do some manual testing tomorrow.

@@ -668,13 +665,14 @@ def ingest_time(value: str, now: Optional['TimePoint'] = None) -> str:

# correct for year in 'now' if year only,
# or year and time, specified in input
# TODO: Figure out why this correction is needed
Copy link
Member

Choose a reason for hiding this comment

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

Should this still be here? If yes, is there a matching issue?

Copy link
Member Author

@MetRonnie MetRonnie Apr 5, 2022

Choose a reason for hiding this comment

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

Not sure if it's worth an issue, why ever it's doing that it seems to be working. But if someone can figure this out down the line it would be good to update the comment above to improve the explanation

Copy link
Member

Choose a reason for hiding this comment

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

I've spent far too long trying to figure this out - I think I'd quite like an issue raised to poke this - I'm not thrilled that I've not been able to get the bottom of it.

I'm also not clear that I can find definitive docs of what --icp can accept.

Copy link
Member Author

Choose a reason for hiding this comment

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

oliver-sanders on 16 Nov 2018
Comments like this have a habit of becoming a bit cryptic to future developers. Perhaps copy in the URL of the isodatetime issue.

#2815 (comment)

Sadly not done for this particular comment 😬

Copy link
Member Author

@MetRonnie MetRonnie Apr 6, 2022

Choose a reason for hiding this comment

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

I have opened 2 issues:

I haven't opened anything regarding --icp, would you like to do that?

Copy link
Member

Choose a reason for hiding this comment

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

I'm also not clear that I can find definitive docs of what --icp can accept.

This. Yes. #4807 (Put in cylc-flow not cylc-doc because although it should touch both I think the CLI help is upstream)

tests/unit/test_time_parser.py Show resolved Hide resolved
@@ -779,7 +779,7 @@ mock_smtpd_kill() { # Logic borrowed from Rose
install_and_validate() {
# First part of the reftest function, to allow separate use.
# Expect 1 OK test.
local TEST_NAME="${1:-${TEST_NAME_BASE}}-validate"
local TEST_NAME="${1:-${TEST_NAME_BASE}}"
Copy link
Member

Choose a reason for hiding this comment

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

What was wrong with this?

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 was resulting in NN-testname-validate-validate

@wxtim
Copy link
Member

wxtim commented Apr 6, 2022

(Test failures due to usual integration tests hanging on GH Actions)

Pity grumpy face isn't available...

But it looks ok now.

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

Yay

@oliver-sanders oliver-sanders merged commit 9f7b9b5 into cylc:master Apr 7, 2022
@MetRonnie MetRonnie deleted the update-isodatetime branch April 7, 2022 09:43
@MetRonnie MetRonnie changed the title Update isodatetime Update to isodatetime 3.0 Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-cylc bug This is a bug, but not in Cylc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants