-
Notifications
You must be signed in to change notification settings - Fork 284
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
Improve Coord and Cube attributes printout #4528
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pp-mo
force-pushed
the
coord_print_attrs
branch
from
January 25, 2022 17:20
dc0f786
to
bc7cec7
Compare
pp-mo
commented
Jan 26, 2022
pp-mo
commented
Jan 26, 2022
pp-mo
commented
Jan 26, 2022
pp-mo
changed the title
Improve Coord attributes printout
Improve Coord and Cube attributes printout
Jan 26, 2022
Added code to clip over-long strings, as in previous comments. |
lbdreyer
approved these changes
Jan 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks @pp-mo !
wjbenfold
pushed a commit
that referenced
this pull request
Jan 28, 2022
tkknight
added a commit
to tkknight/iris
that referenced
this pull request
Mar 16, 2022
* main: (64 commits) [pre-commit.ci] pre-commit autoupdate (SciTools#4587) fix test (SciTools#4585) Loading Benchmarks (SciTools#4477) Fix refresh lockfile worrkflow pull request title (SciTools#4579) gha: lockfiles labels and auto-pr details (SciTools#4578) Bump actions/script from 4 to 5.1.0 (SciTools#4576) Bump actions/stale from 4.0.0 to 4.1.0 (SciTools#4575) Bump peter-evans/create-pull-request from 3.8.2 to 3.12.1 (SciTools#4577) adopt dependabot GHA (SciTools#4568) New tool-agnostic ASV environment management (SciTools#4571) Updated environment lockfiles (SciTools#4567) Update version to 3.3.dev0 (SciTools#4565) Reset whats new (SciTools#4563) docs: move whatsnew (SciTools#4540) Deprecate regrids (SciTools#4548) Update latest.rst (SciTools#4556) Updated environment lockfiles (SciTools#4555) Added whatsnew for SciTools#4551. (SciTools#4553) Update SciTools#4505 doctests for SciTools#4528. (SciTools#4554) minor optimisations (SciTools#4549) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During development of #4499, and discussion in #4501, it was suggested that when printing cube components with names/units/attributes (i.e. derived from CFVariableMixin) we should be listing any attributes in a one-per-line fashion, as
Cube.__str__
already does.This wasn't initially done in #4499 as I was concerned it introduced more change to an already complex PR.
On subsequent investigation though, it isn't really that complex, so this PR introduces that.
Results go from looking (schematically) like
to
Comparing the output of attributes in Cube listings to those in Coords, I also came to the conclusion that it would be better to always quote strings when they appear as attribute values -- that is, in Cube listings also.
Luckily that is very easy to do -- though there were quite a few tests to fix, so it's a bit noisy.