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

added chain offset logic #5885

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

markgrahamdawson
Copy link
Contributor

@markgrahamdawson markgrahamdawson commented Dec 18, 2023

Closes #5047

  • When calculating the offeset relative to the base_point it now checks if there are multiple opperators in the expression.
  • If there are it splits the expresion into multiple expressions and calculates the offset by adding or subtracting each expression in turn.
  • If there are not it executes as it would previously
  • Added a unit test to cover chained offset expressions

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 if present).
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@markgrahamdawson markgrahamdawson changed the base branch from master to 8.2.x December 18, 2023 15:07
Tidy chained offset expression code
@MetRonnie
Copy link
Member

Suggestion for changelog entry:

diff --git a/changes.d/5885.fix.md b/changes.d/5885.fix.md
new file mode 100644
index 000000000..57f70bc60
--- /dev/null
+++ b/changes.d/5885.fix.md
@@ -0,0 +1 @@
+Fixed bug in using a final cycle point with chained offsets e.g. `final cycle point = +PT6H+PT1S`.

changes.d/5885.fix.md Outdated Show resolved Hide resolved
@MetRonnie MetRonnie marked this pull request as ready for review December 18, 2023 16:47
Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

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

👍

@MetRonnie MetRonnie added the bug Something is wrong :( label Dec 19, 2023
@MetRonnie MetRonnie added this to the cylc-8.2.4 milestone Dec 19, 2023
@MetRonnie MetRonnie merged commit 8f975c4 into cylc:8.2.x Dec 19, 2023
21 of 23 checks passed
wxtim added a commit to wxtim/cylc that referenced this pull request Jan 9, 2024
* upstream/master: (350 commits)
  Apply suggestions from code review [skip ci]
  Added missing union type import (cylc#5906)
  set CYLC_DEBUG env var when set-verbosity DEBUG (cylc#5854)
  coverage: exclude report-timings and set 90% as the lower limit
  lint: Warn users that `CYLC_VERSION={{CYLC_VERSION}}` is deprecated (cylc#5890)
  Add a new entry_point for xtriggers (cylc#5831)
  Update copyright year
  Tests: fix cached datetime arithmetic contamination between tests using different calendar modes
  Replace cyclers functional reftests with integration reftests
  Simplify integration reftest
  Replace pre-initial functional reftests with integration reftests
  Integration tests: add a simpler reftest fixture
  auto update syntax files
  id: catch traceback in ID parsing
  actions: downgrade macos runners to macos 11 (cylc#5892)
  Feat.lint obsolete vars (cylc#5879)
  dump: restrict window to n=0 (cylc#5600)
  Add chained offset logic for FCP (cylc#5885)
  Test.example replace a reftest (cylc#5860)
  GH Actions artifact name fixes
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chain offset expression with time units does not work
3 participants