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 support for spatial averaging parallelism via Dask #132

Merged
merged 16 commits into from
Oct 29, 2021

Conversation

pochedls
Copy link
Collaborator

Description

This PR is intended to fix #115. It simply updates the dataarray.values attribute directly (when applicable) to maintain compatibility with chunked dataarray data (for spatial averaging routines).

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) [Not Applicable]

@tomvothecoder tomvothecoder added Priority: Medium type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Oct 25, 2021
Copy link
Collaborator

@tomvothecoder tomvothecoder 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 overall, just a few suggestions. Thanks!

tests/test_spatial_avg.py Outdated Show resolved Hide resolved
tests/test_spatial_avg.py Outdated Show resolved Hide resolved
xcdat/spatial_avg.py Show resolved Hide resolved
xcdat/spatial_avg.py Outdated Show resolved Hide resolved
@pochedls
Copy link
Collaborator Author

Note that this needs more work: #115 (comment)

xcdat/spatial_avg.py Outdated Show resolved Hide resolved
xcdat/spatial_avg.py Outdated Show resolved Hide resolved
xcdat/spatial_avg.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2021

Codecov Report

Merging #132 (e7b85f6) into main (a446376) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #132   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          336       341    +5     
=========================================
+ Hits           336       341    +5     
Impacted Files Coverage Δ
xcdat/spatial_avg.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 a446376...e7b85f6. Read the comment docs.

Copy link
Collaborator Author

@pochedls pochedls left a comment

Choose a reason for hiding this comment

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

@tomvothecoder - This looks good to me. It is passing tests and giving the correct output now.

@tomvothecoder tomvothecoder added this to the v1.0.0 milestone Oct 29, 2021
@tomvothecoder tomvothecoder changed the title 115 not implemented error Add support for spatial averaging parallelism via Dask Oct 29, 2021
@tomvothecoder tomvothecoder merged commit d73d910 into main Oct 29, 2021
@tomvothecoder tomvothecoder deleted the 115_notImplementedError branch October 29, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix NotImplementedError: xarray can't set arrays with multiple array indices to dask yet.
3 participants