Skip to content

Added functionality to sort attrs for variables#100

Merged
joshuatorrance merged 15 commits intomasterfrom
99-sort-variable-attrs
Mar 23, 2026
Merged

Added functionality to sort attrs for variables#100
joshuatorrance merged 15 commits intomasterfrom
99-sort-variable-attrs

Conversation

@joshuatorrance
Copy link
Copy Markdown
Collaborator

@joshuatorrance joshuatorrance commented Mar 18, 2026

Allow the attributes of variables to be sorted.

  • New command line option, support full variable names or regex
  • Allow sorting of variables
  • Abstracted common functionality between global/variable attr sorting
  • Tweaked verbose printing in set_attribute for variable attrs (now does varname:attrname) and to print something when trying to remove an attr that isn't there
  • Fix existing tests
  • Add tests for variable sorting
  • Fix and tests for _FillValue not being allowed to be set as variable attr
  • Update docs

Closes #99

@joshuatorrance joshuatorrance self-assigned this Mar 18, 2026
@joshuatorrance joshuatorrance marked this pull request as ready for review March 20, 2026 01:12
Copy link
Copy Markdown
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

I have some questions/suggestions.

Comment thread addmeta/addmeta.py Outdated
Comment thread addmeta/addmeta.py
Comment thread addmeta/addmeta.py Outdated
Comment thread addmeta/addmeta.py Outdated
Comment thread addmeta/cli.py
Copy link
Copy Markdown
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuatorrance joshuatorrance merged commit 9949195 into master Mar 23, 2026
6 checks passed
@joshuatorrance joshuatorrance deleted the 99-sort-variable-attrs branch March 23, 2026 23:49
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.

Optional sorting for variable metadata

2 participants