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

Add date to cset plot menu items #934

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mo-sanamahmood
Copy link

@mo-sanamahmood mo-sanamahmood commented Nov 12, 2024

Adding in the date to the CSET plots menu

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@mo-sanamahmood mo-sanamahmood linked an issue Nov 12, 2024 that may be closed by this pull request
@jfrost-mo jfrost-mo self-requested a review November 12, 2024 16:56
Copy link
Member

@jfrost-mo jfrost-mo left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jfrost-mo jfrost-mo changed the title adding in date to cset plot menu Add date to cset plot menu items Nov 12, 2024
@jfrost-mo
Copy link
Member

Ah, the tests are failing because the space should only be added if the date is.

Comment on lines 36 to 40
plot_metadata["category"]: {
directory.name: plot_metadata["title"]
+ " "
+ os.getenv("CYLC_TASK_CYCLE_POINT", "")
}
Copy link
Member

@jfrost-mo jfrost-mo Nov 12, 2024

Choose a reason for hiding this comment

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

Suggested change
plot_metadata["category"]: {
directory.name: plot_metadata["title"]
+ " "
+ os.getenv("CYLC_TASK_CYCLE_POINT", "")
}
plot_metadata["category"]: {
directory.name: plot_metadata["title"]
+ " "
+ os.getenv("CYLC_TASK_CYCLE_POINT", "")
}.strip()

This will strip any trailing spaces. Once the change is made ping it back to me and I'll re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Case date information in menu item
2 participants