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

Include xtrigger function signatures in cylc config #6071

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Apr 17, 2024

Closes #5877

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).
  • No dependency changes
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • No docs needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added this to the 8.2.6 milestone Apr 17, 2024
@MetRonnie MetRonnie requested a review from wxtim April 17, 2024 13:27
@MetRonnie MetRonnie self-assigned this Apr 17, 2024
@MetRonnie MetRonnie linked an issue Apr 17, 2024 that may be closed by this pull request
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.

  • Makes sense
  • Manually tested as working

No test?

@MetRonnie
Copy link
Member Author

@wxtim added test now 👍

cylc/flow/subprocctx.py Outdated Show resolved Hide resolved
@MetRonnie MetRonnie marked this pull request as draft April 18, 2024 13:15
@MetRonnie MetRonnie marked this pull request as ready for review April 18, 2024 14:02
@MetRonnie MetRonnie requested a review from wxtim April 18, 2024 14:02
Comment on lines +162 to +171
def dump(self) -> str:
"""Output for logging."""
return SubProcContext.__str__(self)

def __str__(self) -> str:
"""
>>> str(SubFuncContext('label', 'my_func', [1, 2], {'a': 3}))
'my_func(1, 2, a=3):10.0'
"""
return f"{self.get_signature()}:{self.intvl}"
Copy link
Member Author

@MetRonnie MetRonnie Apr 18, 2024

Choose a reason for hiding this comment

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

The previous __str__() implementation was removed in #5617 (comment), but I've ensured the output from xtriggers still gets logged in the workflow log by adding a dump method and using that instead

Copy link
Member

Choose a reason for hiding this comment

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

That was it! Great.

@MetRonnie MetRonnie merged commit e621d9c into cylc:8.2.x Apr 18, 2024
21 of 23 checks passed
@MetRonnie MetRonnie deleted the xtrig-config branch April 18, 2024 16:54
@MetRonnie MetRonnie removed the request for review from oliver-sanders April 19, 2024 10:19
wxtim added a commit to wxtim/cylc that referenced this pull request Apr 22, 2024
* upstream/master: (25 commits)
  Delete public DB if private DB does not exist on scheduler start (cylc#6070)
  Include xtrigger function signatures in `cylc config` (cylc#6071)
  Add Nano syntax highlighter (cylc#6072)
  Play should have no cylc rose options (cylc#6068)
  tests/integration: address urwid deprecation warning (cylc#6063)
  Bump dev version
  Prepare release 8.2.5
  add mailmap entry
  Tutorials: avoid validation errors due to implicit tasks
  Update CONTRIBUTING.md
  Update xtrigger_mgr.py documentation
  Another small tweak.
  Tweak previous.
  Tutorials: increase sleep and don't sleep in CI
  Fix bad doctests
  tutorial: make the tutorial workflow run a little slower
  Style tweaks.
  Simply workflow-state code a bit.
  Add unit tests for workflow-state.
  Add to doc string.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cylc config shows unhelpful information for xtriggers
4 participants