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

Merge new changes in pydata master #4

Merged
merged 108 commits into from
Mar 7, 2019
Merged

Conversation

phausamann
Copy link
Owner

No description provided.

gerritholl and others added 30 commits November 16, 2018 08:40
Add missing , and article in error message when attribute values have the wrong type.
This makes string indexing usable in a pandas.MultiIndex.
* DOC: remove example using Dataset.T

* Update reshaping.rst

* Update reshaping.rst
* Fix multidimensional co-ordinate example.

* Use open_dataset().load() in other example
* wip: getting started

* preliminary support for zarr consolidated metadata

* update zarr dev repo

* add consolidate to close

* doc updates

* skip tests based on zarr version

* fix doc typos

* fix PEP8 issues

* fix test skipping

* fixed integration test

* update version check

* rename keyword arg

* Update whats-new.rst

* instructions for consolidating existing stores
This version should be a little less noisy, since instructions only for
authors are put in commented out HTML.
* Fix h5netcdf saving scalars with filters or chunks

* Revert adding scalar dataset to central test function

* Add fix description to what's new.
* Add keep_attrs to binary_op

* added test for binary_ops keep_attrs=True

* PEP8 issues + blank lines removed

* whitespace removed

* keep_attrs in DataArray

* enhancement

* simpler testing
* Support HighLevelGraphs

Fixes #4291

* test __dask_layers__

* Skip dependnecies test with old dask

* Reenable dask-dev test on Travis-CI
* concatenates along a single dimension

* Wrote function to find correct tile_IDs from nested list of datasets

* Wrote function to check that combined_tile_ids structure is valid

* Added test of 2d-concatenation

* Tests now check that dataset ordering is correct

* Test concatentation along a new dimension

* Started generalising auto_combine to N-D by integrating the N-D concatentation algorithm

* All unit tests now passing

* Fixed a failing test which I didn't notice because I don't have pseudoNetCDF

* Began updating open_mfdataset to handle N-D input

* Refactored to remove duplicate logic in open_mfdataset & auto_combine

* Implemented Shoyers suggestion in #2553 to rewrite the recursive nested list traverser as an iterator

* --amend

* Now raises ValueError if input not ordered correctly before concatenation

* Added some more prototype tests defining desired behaviour more clearly

* Now raises informative errors on invalid forms of input

* Refactoring to alos merge along each dimension

* Refactored to literally just apply the old auto_combine along each dimension

* Added unit tests for open_mfdatset

* Removed TODOs

* Removed format strings

* test_get_new_tile_ids now doesn't assume dicts are ordered

* Fixed failing tests on python3.5 caused by accidentally assuming dict was ordered

* Test for getting new tile id

* Fixed itertoolz import so that it's compatible with older versions

* Increased test coverage

* Added toolz as an explicit dependency to pass tests on python2.7

* Updated 'what's new'

* No longer attempts to shortcut all concatenation at once if concat_dims=None

* Rewrote using itertools.groupby instead of toolz.itertoolz.groupby to remove hidden dependency on toolz

* Fixed erroneous removal of utils import

* Updated docstrings to include an example of multidimensional concatenation

* Clarified auto_combine docstring for N-D behaviour

* Added unit test for nested list of Datasets with different variables

* Minor spelling and pep8 fixes

* Reverted API so that N-D generalisation is hidden

* Removed infer_order_from_coords argument
* Fix parsing '_Unsigned' attribute

Fixes #2583

* Fix encode step too.

* Add tests.

* Fix whats-new.

* Undo unnecessary change

* Yay! fix test failure.
* doc fixes

Fixes #2610

* minor doc fixes.

* Fix examples path for open statements.
There seems to be some sort of dependency issue on Appveyor, but it's not
worth tracking down given how we'll be dropping Python 2.7 in the new year
anyways.
* .resample now supports loffset.

* Update whats-new.rst

* Fix for pandas 0.19.2

* doc update.

* Review comments.
* CF: also decode time bounds when available

* Fix failing test when cftime not present and what's new

* Fix windows

* Reviews

* Reviews 2
…lex} (#2615)

* Don't raise a warning for xarray.ufuncs.angle

* Update warning message
* Add test to ensure that 0d slices are views

* Get 0d slices of ndarrays directly from indexing

* Add 0d slice documentation
…hs (#2589)

* added some logic to deal with rasterio objects in addition to filepath strings

* added no network test, pep8 compliance, whatsnew.rst

* removed subclass, added to base RasterioArrayWrapper

* upped rasterio test version to > 1

* specified rasterio version should be greater than 1
* Close files when CachingFileManager is garbage collected

Fixes GH2560

This frees users from needing to worry about this.

* Minor tweak

* Test raising an error in __del__

* restore change

* Remove the need for a lock in __del__

* Handle locking ourselves with rasterio

* Remove race condition with netCDF4

* refactor optional lock

* Fix more possible race conditions

* Warn if we can't close in FileManager.__del__

* Fix lock acquisition in CachingFileManager.__del__

* Cleaner fall-back for no dask-distributed

* Test tweaks

* Test for FileManager.__repr__

* Add reference counting to CachingFileManager

* remove unused import

* Spelling / reorg
* Fix multiindex selection

* Support pandas0.19

* a bugfix

* Do remove_unused_levels only once in unstack.

* import algos

* Remove unused import

* Adopt local import
observingClouds and others added 29 commits January 31, 2019 09:28
* ENH: resample methods with tolerance

* ENH: resample methods bfill, pad, nearest accept tolerance keyword

* DOC: documentation is updated with examples

Fixes: GH2695

* TST: Upsampling with tolerance keyword

Include tests for GH2695

* pep8

* Make resample().nearest(tolerance) test meaningful

* DOC: Mention units of tolerance
* added integrate.

* Docs

* Update via comment

* Update via comments

* integrate can accept multiple dimensions.

* using set instead of list

* dim -> coord
* deprecate compat & encoding

* stacklevel

* whatsnew

* imports

* merge conflicts

* remove deprecations

* removal date
* Support dropna() for a Series indexed by a CFTimeIndex

* Add a what's new entry

* Use == instead of is
* add tests for GH#697 - handling of empty pandas objects in constructors

* make pep8 happy
* First implementation of resampling for CFTimeIndex.

* First implementation of resampling for CFTimeIndex, cleaned.

* First implementation of resampling for CFTimeIndex, cleaned.

* First implementation of resampling for CFTimeIndex, cleaned.

* First implementation of resampling for CFTimeIndex.

* First implementation of resampling for CFTimeIndex,
more bugs fixed, cleaned.

* First implementation of resampling for CFTimeIndex, test file written.

* First implementation of resampling for CFTimeIndex, test file written, cleaned.

* First implementation of resampling for CFTimeIndex, test file written, cleaned.

* First implementation of resampling for CFTimeIndex, test file written, cleaned.

* First implementation of resampling for CFTimeIndex, test file written, cleaned.

* Docstrings for resample_cftime.py written. Upsample still not fixed.

* Fixed PEP8 and test parametrization.

* PEP8

* Test file fixes and other optimizations (2018-12-16 @spencerclark and 2018-12-05 @max-sixty GitHub reviews for resample-v2-clean pull request). Not cleaned.

* Test file fixes and other optimizations (2018-12-16 @spencerclark and 2018-12-05 @max-sixty GitHub reviews for resample-v2-clean pull request). Cleaned.

* _get_range_edges logic changed to emulate latest version of pandas.

* Simplified resampling logic (errors persist). Pre-cleaning.

* Simplified resampling logic (error persists). Cleaned.

* Simplified resampling logic (error persists). Fixed first_items.dropna() in groupby.py. Pandas cannot drop indices made up of CFTime objects, so integer indices were swapped in for dropping then swapped back out once NAs are dropped.

* Simplified resampling logic (error persists). Logic slightly altered after more tests. 5578 out of 5920 tests passed. Pre-cleaning.

* Simplified resampling logic (error persists). Logic slightly altered after more tests. 5578 out of 5920 tests passed. Cleaned.

* Precise cftime arithmetic. Reduced overall test time. Added test for _get_range_edges.

* Added default values for closed and label args of resample function in common.py. Cleaned up print statements. Modified tests that were written under the assumption that CFTimeIndex cannot be resampled so that the tests now pass.

* Added back replace['dayofwk'] = -1 to cftime_offsets.py and cftimeindex.py. Removed unused code from resample_cftime.py. Removed tests that raise error when resampling CFTimeIndex. Removed temp files.

* Optimizations as per #2593

* Simple test for non-standard calendars added and documentation updated.

* Simple test for non-standard calendars added and documentation updated.

* Added loffset support to CFTimeIndex resampling. Better adherence to PEP8 and other coding style conventions.

* Added loffset support to CFTimeIndex resampling. Better adherence to PEP8 and other coding style conventions.

* Support datetime.timedelta objects for loffset. Improved test coverage.

* Removed support for Python 2 compatibility.

* Updated pandas minversion to 0.24 as 0.24 is officially out.

* Removed Python 2 support from test_cftimeindex_resample.py.

* Moved full_index and first_items generation logic to a helper function so that the complexity of GroupBy.__init__ is reduced.

* In groupby.py, moved s to _get_index_and_items helper function.

* Removed redundant code from test_formatting.py due to bad merge.

* Removed redundant test and simplify code now that dropna is implemented.

* delete unnecessary test

* eliminate some repetition
Fixes #2050

I'm not quite sure what was going on, but it passes now.
* Refactor (part of) dataset.py to use explicit indexes

* Use copy.copy()

* Ensure coordinate order is deterministic
* Fix CRS being WKT instead of PROJ.4

See https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L7

* Fix rasterio usage for older rasterio without to_proj4

Co-Authored-By: djhoese <david.hoese@ssec.wisc.edu>

* Fix indentation on rasterio AttributeError check

* Add CRS WKT fix to whats-new
* add h5netcdf+dask tests

* pep8

* reactivate pynio/rasterio/iris in py36 test builds

* revert changes to test_backends.py -- unrelated to this PR
* BUG: Pass kwargs to the FileManager for pynio engine (#2380)

* TST: Added test for pynio kwargs passing (#2380)

* Fixed formatting (#2380)
enable internal plotting with cftime datetime
Apparently I wasn't paying attention in my last PR :)
* WIP: fix regression about datetime_to_numeric

* Workaround for object array

* added a whatsnew

* rearrange tests

* lint

* Added Variable._to_numeric

* Fix for cftime

* Update via comments

* lint

* Fix via comment

* Fix errors

* lint
* fix renaming

* formatting

* added tests

* shoyer's solution

* what's new
* add h5netcdf+dask tests

* pep8

* pass encoding through to _replace_vars_and_dims in ds.chunk()

* lint

* _kwargs=None in roundtrip methods
* Update computation.py to use Python 3 function signatures

This lets us remove lots of ugly explicit calls to ``kwargs.pop()``.

* Lint / py35 fixup
* New test for reduce func which takes no axes

* Fixed axis logic

* Recorded fix in what's new

* Added intermediate variable
* Add use_cftime option to open_dataset

* Remove f-strings

* Fix test-skipping logic and remove 'dummy' from warning

* Note that use_cftime is only relevant for standard calendar dates

* Move use_cftime option to CFDatetimeCoder constructor
* Quarter offset implemented (base is now latest pydata-master).

* Fixed issues raised in review (#2721 (review))

* Updated whats-new.rst with info on quarter offset support.

* Updated whats-new.rst with info on quarter offset support.

* Update doc/whats-new.rst

Co-Authored-By: jwenfai <jwenfai@gmail.com>

* Added support for quarter frequencies when resampling CFTimeIndex. Less redundancy in CFTimeIndex resampling tests.

* Removed normalization code (unnecessary for cftime_range) in cftime_offsets.py. Removed redundant lines in whats-new.rst.

* Removed invalid option from _get_day_of_month docstring. Added tests back in that raises ValueError when resampling (base=24 when resampling to daily freq, e.g., '8D').

* Minor edits to docstrings/comments

* lint
* ENH: Add Dataset.drop_dims()

* Drops full dimensions and any corresponding variables in a
  Dataset
* Fixes GH1949

* DOC: Add Dataset.drop_dims() documentation
* Added tests of desired name inferring behaviour

* Infers names

* updated what's new
It got deprecated in numpy 1.16 and throws a ton of warnings due to
that.
All the function does is returning .item() anyway, which is why it got
deprecated.
@phausamann phausamann merged commit b420005 into phausamann:master Mar 7, 2019
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.