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

Remove data variable inference API #196

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Jan 26, 2022

Description

  • It seems to be adding feature bloat and an unnecessary overhead when working with the API.
  • By explicitly referencing the data var key, the API behavior remains consistent, predictable, and controllable.
    • For example, API behaves the same even if the dataset was opened via xarray or XCDAT, or if a single or multiple data vars exist
    • It might be redundant with a dataset that starts out with a single data variable, but if we add more data variables via agg methods (tas_climo), API behavior isn’t straightforward
  • It cleans up our tests by eliminating the need to test the APIs with inferred data variables.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

- Removing this feature makes the XCDAT APIs more consistent, predictable, and controllable
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2022

Codecov Report

Merging #196 (09045e3) into main (201a575) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #196   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          381       463   +82     
=========================================
+ Hits           381       463   +82     
Impacted Files Coverage Δ
xcdat/__init__.py 100.00% <100.00%> (ø)
xcdat/axis.py 100.00% <100.00%> (ø)
xcdat/bounds.py 100.00% <100.00%> (ø)
xcdat/dataset.py 100.00% <100.00%> (ø)
xcdat/spatial_avg.py 100.00% <100.00%> (ø)
xcdat/xcdat.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 194f84d...09045e3. Read the comment docs.

@tomvothecoder
Copy link
Collaborator Author

tomvothecoder commented Jan 27, 2022

Just an FYI @jasonb5 and @pochedls.

@jasonb5 you may need to rebase and adjust your regridding API to remove inferred variables.
@pochedls Hopefully you can see why dropping this feature is a good idea from a software engineering perspective. The PR diff should communicate this as well.

@tomvothecoder tomvothecoder merged commit 0958a99 into main Jan 27, 2022
@tomvothecoder tomvothecoder deleted the feature/194-remove-inference-api branch January 27, 2022 00:04
@jasonb5
Copy link
Collaborator

jasonb5 commented Jan 29, 2022

@tomvothecoder Thanks, I'll adjust the regridding code.

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.

[FEATURE]: Remove data variable inference API
3 participants