Skip to content

Add support for deprecated names, raise warning instead of error for unknown filter values, refactor descriptors code.#91

Draft
aaronweeden wants to merge 11 commits into
ubccr:v1.x.yfrom
aaronweeden:warn-deprecations
Draft

Add support for deprecated names, raise warning instead of error for unknown filter values, refactor descriptors code.#91
aaronweeden wants to merge 11 commits into
ubccr:v1.x.yfrom
aaronweeden:warn-deprecations

Conversation

@aaronweeden
Copy link
Copy Markdown

@aaronweeden aaronweeden commented Apr 16, 2026

This PR depends on [upcoming PR in xdmod] that will need to be merged first for the CI tests to pass on this one.

Description

This PR does the following:

  • Add support for deprecated names (in conjunction with an upcoming PR to xdmod), where the XDMoD portal can mark names of realms, metrics, dimensions, and/or raw fields as deprecated, and xdmod-data will throw a FutureWarning if it is used while using the updated name for its requests to the portal.
  • Change to raising a warning instead of an error when a provided filter value is not found.
  • Refactor the descriptors code (doesn't change the API):
    • Rather than a single object containing both descriptors, have one object each for aggregate and raw descriptors, each with their own specialized class.
    • Finding IDs and labels in descriptors is now done in the descriptor classes instead of in functions in other classes (to encapsulate behavior).
  • Update the maximum Python version that is tested in the CI build.

Motivation and Context

See [upcoming PR in xdmod].

Tests performed

This PR updates the integration tests to make sure:

  • The FutureWarning is properly raised for a deprecated raw field.
  • Unknown filter values produce a UserWarning instead of a KeyError.

Type of change:

  • Refactoring / documentation update (non-breaking change which does not change functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix, feature, or removal that would cause existing functionality to change)
  • Release preparation

Checklist:

  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request
  • Updates have been made to the xdmod-notebooks repository as necessary, and the notebooks all run successfully

@aaronweeden aaronweeden added this to the 1.2.0 milestone Apr 16, 2026
@aaronweeden aaronweeden added enhancement New feature or request refactor Refactor of existing functionality labels Apr 16, 2026
@aaronweeden aaronweeden added the qa/testing Updates/additions to tests label Apr 16, 2026
@aaronweeden aaronweeden changed the title Add support for deprecated names, raise warning instead of error for unknown filter values, refactor. Add support for deprecated names, raise warning instead of error for unknown filter values, refactor descriptors code. Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request qa/testing Updates/additions to tests refactor Refactor of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant