sha,message,author_date,committer_date,raw_author,raw_committer,repo,author,committer c2cd1dd27fa0723f498c9cbe758cce413f6d91bd,Mark `test_use_cftime_false_standard_calendar_in_range` as an expected failure (#8996),2024-05-03T15:21:48Z,2024-05-03T15:21:48Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 2983c5326c085334ed3e262db1ac3faa0e784586,Fix non-nanosecond casting behavior for `expand_dims` (#8782),2024-02-27T18:51:49Z,2024-02-27T18:51:49Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 d8c3b1ac591914998ce608159a15b4b41cc53c73,"Add chunk-friendly code path to `encode_cf_datetime` and `encode_cf_timedelta` (#8575) * Add proof of concept dask-friendly datetime encoding * Add dask support for timedelta encoding and more tests * Minor error message edits; add what's new entry * Add return type for new tests * Fix typo in what's new * Add what's new entry for update following #8542 * Add full type hints to encoding functions * Combine datetime64 and timedelta64 zarr tests; add cftime zarr test * Minor edits to what's new * Address initial review comments * Add proof of concept dask-friendly datetime encoding * Add dask support for timedelta encoding and more tests * Minor error message edits; add what's new entry * Add return type for new tests * Fix typo in what's new * Add what's new entry for update following #8542 * Add full type hints to encoding functions * Combine datetime64 and timedelta64 zarr tests; add cftime zarr test * Minor edits to what's new * Address initial review comments * Initial work toward addressing typing comments * Restore covariant=True in T_DuckArray; add type: ignores * Tweak netCDF3 error message * Move what's new entry * Remove extraneous text from merge in what's new * Remove unused type: ignore comment * Remove word from netCDF3 error message",2024-01-29T19:12:30Z,2024-01-29T19:12:30Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 dfe6435c270957b0322e0d31db4f59a257f2d54d,"Deprecate certain cftime frequency strings following pandas (#8415) * Deprecate certain frequency strings following pandas [test-upstream] Specifically the frequency strings ""A"", ""AS"", ""Q"", ""M"", ""H"", ""T"", ""S"", ""L"", ""U"", and ""N"" are deprecated in favor of ""Y"", ""YS"", ""QE"", ""ME"", ""h"", ""min"", ""s"", ""ms"", ""us"", and ""ns"", respectively. * Apply suggestions from code review Co-authored-by: Pascal Bourgault --------- Co-authored-by: Pascal Bourgault Co-authored-by: Deepak Cherian ",2023-11-16T15:19:40Z,2023-11-16T15:19:40Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 d933578ebdc4105a456bada4864f8ffffd7a2ced,"Port fix from pandas-dev/pandas#55283 to cftime resample (#8393) * Port fix from pandas-dev/pandas#55283 to cftime resample [test-upstream] * Skip test for pandas versions older than 2.2 [test-upstream] * Update doc/whats-new.rst Co-authored-by: Justus Magin --------- Co-authored-by: Deepak Cherian Co-authored-by: Justus Magin ",2023-11-02T04:12:51Z,2023-11-02T04:12:51Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 1b0012a44aa45c67858489bc815928e1712dbd00,Fix time encoding regression (#8272),2023-10-06T14:08:51Z,2023-10-06T14:08:51Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 c9c1c6d681b68d36c3145da3223f16d649fcf9ab,"Continue to use nanosecond-precision Timestamps in precision-sensitive areas (#7731) * [test-upstream] use nanosecond-precision timestamps for now * [test-upstream] allow kwargs to be passed to nanosecond_precision_timestamp * unpin `pandas` * Add type hint for nanosecond_precision_timestamp Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> * Add one more TODO comment * Remove deleted attributes in CFTimeIndex documentation * Add a what's new entry * Remove one more attribute from api-hidden.rst * Silence conversion warnings in tests * Silence more conversion warnings --------- Co-authored-by: Deepak Cherian Co-authored-by: Justus Magin Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>",2023-04-13T14:58:33Z,2023-04-13T14:58:33Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 84607c3b1d61e3bc2d4b07b4f12f41a40b027f6f,"Preserve formatting of reference time units under pandas 2.0.0 (#7441) * [test-upstream] Preserve formatting of reference time units Changes in pandas 2.0.0 interfere with the way we expect some times to be formatted. * Use strftime to force expected date format Co-authored-by: Justus Magin * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [test-upstream] Preserve formatting of reference time units Changes in pandas 2.0.0 interfere with the way we expect some times to be formatted. * Use strftime to force expected date format Co-authored-by: Justus Magin * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [test-upstream] Remove old comment and move what's new entry to latest version * [test-upstream] remove old comment and move what's new entry * Update xarray/core/formatting.py * Use isoformat() now that pandas zero-pads years Co-authored-by: Justus Magin * [test-upstream] update what's new * replace the `isoformat` separator with `"" ""` [test-upstream] * use the `sep` parameter to `isoformat` instead Co-authored-by: Spencer Clark * Update doc/whats-new.rst --------- Co-authored-by: Deepak Cherian Co-authored-by: Justus Magin Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Justus Magin ",2023-04-01T12:36:55Z,2023-04-01T12:36:55Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 6d771fc82228bdaf8a4b77d0ceec1cc444ebd090,"Preserve `base` and `loffset` arguments in `resample` (#7444) * [test-upstream] Preserve base and loffset arguments in resample While pandas is getting set to remove these, we have not had a chance to emit a deprecation warning yet for them in xarray. This should hopefully give users some extra time to adapt. * Emit warning when base is not None Co-authored-by: Deepak Cherian * Modify warnings to refer loffset and base as parameters; add tests * Add type validation for loffset arguments * Add typing and support for pd.Timedelta as an loffset * pd.Timedelta is a subclass of datetime.timedelta * [test-upstream] Remove unneeded skipif * Fix failing tests * [test-upstream] Add return type to tests * [test-upstream] Update documentation * [test-upstream] Fix mypy errors in tests * Move _convert_base_to_offset to pdcompat and add a few more tests * Use offset instead of base in documentation --------- Co-authored-by: Deepak Cherian ",2023-03-08T16:55:21Z,2023-03-08T16:55:21Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 fb748be127c88b4bbd0c7f654e0a0d2ebd154ef8,"Add `inclusive` argument to `cftime_range` and `date_range` and deprecate `closed` argument (#7373) * Add inclusive argument to cftime_range and date_range; deprecate closed * Add documentation of deprecation * Update xarray/coding/cftime_offsets.py Co-authored-by: Justus Magin * [skip-ci] [test-upstream] Update xarray/coding/cftime_offsets.py * [test-upstream] Use parameter instead of argument when describing function signature * [test-upstream] Add references to pandas PRs for _NoDefault * [test-upstream] Move _NoDefault to pdcompat; fix doc build * Apply suggestions from code review Co-authored-by: Spencer Clark * Update xarray/coding/cftime_offsets.py Co-authored-by: Spencer Clark --------- Co-authored-by: Deepak Cherian Co-authored-by: Justus Magin ",2023-02-06T17:51:46Z,2023-02-06T17:51:46Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 1581fe84c3946928839d643ccb36d53a54ca475e,Fix PR number in what’s new (#7331),2022-11-29T07:37:05Z,2022-11-29T07:37:05Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 1083c9d3f9ff7b5b03ffb65fa0cf7876c2e73a1a,"Enable `origin` and `offset` arguments in `resample` (#7284) * Initial work toward enabling origin and offset arguments in resample * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix _convert_offset_to_timedelta * Reduce number of tests * Address initial review comments * Add more typing information * Make cftime import lazy * Fix module_available import and test * Remove old origin argument * Add type annotations for resample_cftime.py * Add None as a possibility for closed and label * Add what's new entry * Add missing type annotation * Delete added line * Fix typing errors * Add comment and test for as_timedelta stub * Remove old code * [test-upstream] Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian ",2022-11-28T23:38:52Z,2022-11-28T23:38:52Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 a744e63642e066b2c25778f40fec63fc47d15a7b,"Improve non-nanosecond warning (#7238) * Point to Variable or DataArray constructor in non-nanosecond warning * [test-upstream] Use find_stack_level function from pandas",2022-11-04T20:13:18Z,2022-11-04T20:13:18Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 be6594e6e327c95cfa64c8c6c06143022d0b6743,"Emit a warning when converting datetime or timedelta values to nanosecond precision (#7201) * [test-upstream] Emit a warning when converting to nanosecond precision * Assert nanosecond dtype after conversion in all cases * Apply suggestions from code review Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> * [test-upstream] add separate test for second-precision TimedeltaIndex Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>",2022-10-26T16:00:33Z,2022-10-26T16:00:33Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 9df2dfca57e1c672f6faf0f7945d2f38921a4bb2,"Set `longdouble=False` in `cftime.date2num` within the date encoding context (#7171) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>",2022-10-18T16:37:56Z,2022-10-18T16:37:56Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 96db9f804cf6bb3ed5e333237b69cb7c47b527e3,"Include variable name in message if `decode_cf_variable` raises an error (#7147) * Include variable name in message if decode_cf_variable raises an error * flake8",2022-10-12T15:25:41Z,2022-10-12T15:25:41Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 25537623edafd4a2f99a011ebb91ae55bccb96a2,"Enable taking the mean of dask-backed cftime arrays (#6940) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian ",2022-09-09T16:48:19Z,2022-09-09T16:48:19Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 77d961a8c43444e16b51e9700e7805a9e7e0d190,Simplify datetime64 `dt.calendar` tests (#6988),2022-09-08T23:34:43Z,2022-09-08T23:34:43Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 6c8db5ed005e000b35ad8b6ea9080105e608e976,Accommodate `OutOfBoundsTimedelta` error when decoding times (#6717),2022-06-24T18:48:18Z,2022-06-24T18:48:18Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 8de706151e183f448e1af9115770713d18e229f1,Fix overflow issue in decode_cf_datetime for dtypes <= np.uint32 (#6598),2022-05-15T14:42:31Z,2022-05-15T14:42:31Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 4b18065af6acff72f479a17bda23b1401285732f,"Ensure datetime-like variables are left unmodified by `decode_cf_variable` (#6489) * Add fix to decode_cf_variable * Add PR link to what's new * Variable.data is not lazy so only attempt it on object type arrays * Add a check that the decoded variable is identical to the input",2022-04-18T15:29:19Z,2022-04-18T15:29:19Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 69dec51cfca065f2abdc9933c938c8c03e694184,Remove use of deprecated `kind` argument in `CFTimeIndex` tests (#5723),2021-10-24T09:55:33Z,2021-10-24T09:55:33Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 b34f92b1bbe0d85ac51db7b7eb5ff02431242edc,[test-upstream] Install upstream version of nc-time-axis in upstream build (#5744),2021-08-27T12:49:32Z,2021-08-27T12:49:32Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 5a14d7d398be7e0efc6d5c8920dc8886212c3b2a,Explicitly state datetime units in array constructors in `test_datetime_mean` (#5463),2021-06-12T12:58:42Z,2021-06-12T12:58:42Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 2290a5fd8e1b2ae49a1276364c0f1c0524abbf60,Remove xfail decorator from nc-time-axis tests (#5461),2021-06-12T12:57:52Z,2021-06-12T12:57:52Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 ca72d56c213a1c47e54b12ee559f412e60fbf9b1,"Make `kind` argument in `CFTimeIndex._maybe_cast_slice_bound` optional (#5359) * [test-upstream] Make kind argument in CFTimeIndex._maybe_cast_slice_bound optional * Update doc/whats-new.rst Co-authored-by: keewis Co-authored-by: keewis ",2021-05-23T00:13:19Z,2021-05-23T00:13:19Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 44f4ae11019ca9c9e7280c41d9d2fd86cf86ccce,Convert calendar to lowercase in standard calendar checks (#5180),2021-04-18T10:17:08Z,2021-04-18T10:17:08Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 9b60f01066c1209b719ab3a3b111aa66b5fc3e26,Catch either OutOfBoundsTimedelta or OverflowError in CFTimeIndex.__sub__ and CFTimeIndex.__rsub__ (#5154),2021-04-14T13:27:10Z,2021-04-14T13:27:10Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 b610a3c4317474b4b999c23cf66d1dc55c9b3cd6,"Adapt exception handling in CFTimeIndex.__sub__ and __rsub__ (#5006) The latest version of pandas raises an OutOfBoundsTimedelta error instead of an Overflow error.",2021-03-07T13:22:02Z,2021-03-07T13:22:02Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 f554d0a487d8ee286c96002a09f00379c80bd7f4,Add DataArrayCoarsen.reduce and DatasetCoarsen.reduce methods (#4939),2021-02-23T16:01:27Z,2021-02-23T16:01:27Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 10f0227a1667c5ab3c88465ff1572065322cde77,Ensure maximum accuracy when encoding and decoding cftime.datetime values (#4758),2021-02-10T21:44:25Z,2021-02-10T21:44:25Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 46591d28d9fbbfc184aaf4075d330b1c8f070627,Modify _encode_datetime_with_cftime for compatibility with cftime > 1.4.0 (#4871),2021-02-07T23:12:29Z,2021-02-07T23:12:29Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 ed255736664f8f0b4ea199c8f91bffaa89522d03,"Ensure maximum accuracy when encoding and decoding np.datetime64[ns] values (#4684) * Use integers when possible to encode/decode times * Improve tests * Further improvements to tests * Remove optimization in favor of maximum correctness * Remove print statements * Restore optimization * Add a what's new entry * Add test for decoding timedeltas with nanosecond units too * Some minor cleanups * Add comment to motivate new test * Add some print statements to try and debug things on Windows * xfail round-trip test on Windows; remove print statements * Don't xfail Windows tests for now; we should figure why they fail * Fix things on Windows * Use pandas for divisiblity check for older NumPy compatibility * Reduce changes needed; improve comments * Checking remainder against zero nanoseconds is more straightforward It probably doesn't really matter though. * Add a note to the breaking changes section",2021-01-03T23:39:03Z,2021-01-03T23:39:03Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 0f0a5ed8521172bd1e9e217c6fd6db8e23d5be56,Eliminate use of calendar-naive cftime objects (#4517),2020-10-19T15:20:36Z,2020-10-19T15:20:36Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 5198360c0bc28dd7528e909c6b6ccffe731474ad,"Allow for datetime strings formatted following the default cftime format in cftime_range and partial datetime string indexing (#4343) * Expand accepted partial datetime string patterns * Update doc/weather-climate.rst Co-authored-by: Mathias Hauser Co-authored-by: Mathias Hauser ",2020-08-17T23:27:06Z,2020-08-17T23:27:06Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 26547d19d477cc77461c09b3aadd55f7eb8b4dbf,Fix bug in computing means of cftime.datetime arrays (#4344),2020-08-15T20:05:22Z,2020-08-15T20:05:22Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 50dcdacc98906f5f5721bb6bbe1b9cef2425dc1e,Un-xfail cftime plotting tests (#4272),2020-07-26T19:04:54Z,2020-07-26T19:04:54Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 8f688ea92ae8416ecc3e18f6e060dad16960e9ac,Remove outdated note from datetime accessor docstring (#4148),2020-06-11T23:23:28Z,2020-06-11T23:23:28Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 604835603c83618dbe101331813cc6ae428d8be1,"Add a days_in_month accessor to CFTimeIndex (#3935) * Add days_in_month accessor to CFTimeIndex * Add pull request number * Add version-dependent skip for test * Fix pull request number * Strip outputs from notebook; add documentation update note * typo",2020-04-06T14:02:10Z,2020-04-06T14:02:10Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 6bccbff975d59530a8c9cb1979cfcd5c8327254e,Only fail if a specific warning occurs (#3930),2020-04-03T19:35:17Z,2020-04-03T19:35:17Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 b084064fa62d3dedc3706c2f6c2dff90940fec27,Un-xfail test_dayofyear_after_cftime_range (#3907),2020-03-28T14:26:45Z,2020-03-28T14:26:45Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 2d0b85e84fa1d3d540ead8be04fc27703041b2cb,"Re-enable tests xfailed in #3808 and fix new CFTimeIndex failures due to upstream changes (#3874) * Re-enable tests xfailed in #3808 * Add _cache attribute to CFTimeIndex * Temporarily install pandas master from GitHub instead of wheel * Fix pandas url",2020-03-22T22:19:41Z,2020-03-22T22:19:41Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 650a981734ce3291f5aaa68648ebde451339f28a,"Fix CFTimeIndex-related errors stemming from updates in pandas (#3764) * Allow subtraction of a generic Index of cftime.datetimes from a CFTimeIndex * black * Test that NotImplemented logic works * Vendor _get_nearest_indexer and _filter_indexer_tolerance * Test OverflowError in __rsub__ * Fix name of pandas method in docstring * Add what's new entries * Enable use of tolerance greater than 292 years * newlinw Co-authored-by: Deepak Cherian ",2020-03-13T06:14:41Z,2020-03-13T06:14:41Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 45d88fc4b2524ecb0c1236cd31767d00f72b0ea1,"Enable pandas-style rounding of cftime.datetime objects (#3792) * Initial progress on implementing cftime floor/ceil/round * Improve tests and docstrings * Add tests of rounding cftime datetimes via dt accessor * Add documentation * docstring edits * Test rounding raises error with non-fixed frequency * black * typo * A couple cleanup items: - Fix floating point issue in asi8 and add tests - Ensure dask only computes once when using the rounding accessors * black",2020-03-02T09:41:19Z,2020-03-02T09:41:19Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 fd08842e81576f5ea6b826e31bc2031bcca79de2,xfail tests due to #3751 (#3808),2020-02-28T13:39:58Z,2020-02-28T13:39:57Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 99594051ef591f12b4b78a8b24136da46d0bf28f,"Use encoding['dtype'] over data.dtype when possible within CFMaskCoder.encode (#3652) * Use encoding['dtype'] over data.dtype when possible * Add what's new entry * Fix typo in what's new Co-authored-by: Deepak Cherian ",2020-01-15T15:22:29Z,2020-01-15T15:22:29Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 59d3ba5e938bafb4a1981c1a56d42aa31041df0a,Explicitly convert result of pd.to_datetime to a timezone-naive type (#3688),2020-01-13T16:31:37Z,2020-01-13T16:31:37Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 1c446d374e81afcd174a6a2badda9121d2d776c0,"Minor fix to combine_by_coords to allow for the combination of CFTimeIndexes separated by large time intervals (#3543) * Select first element of each index * black * Add comment to test * Move what's new entry to unreleased section * Fix link in what's new * Remove newline after what's new entry",2019-12-07T20:37:59Z,2019-12-07T20:37:59Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 cb5eef1ad17e36626e2556bc2cfaf5c74aedf807,"Remove outdated code related to compatibility with netcdftime (#3450) * Remove code leftover from the netcdftime -> cftime transition * Add a what's new note * black formatting * Add more detail to what's new note * More minor edits to what's new note",2019-10-29T15:30:54Z,2019-10-29T15:30:54Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 b9a920e1a9012e88719cc96e8113bb877279c854,"Reduce length of cftime resample tests (#2879) * Reduce length of cftime resample tests * Update per @jwenfai's suggestions; silence to_datetimeindex warnings * Restore 91% coverage for resample_cftime.py",2019-04-11T11:42:08Z,2019-04-11T11:42:08Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 c770eec39c401d49d01ec87c5c8499893da08cb5,Add support for cftime.datetime coordinates with coarsen (#2778),2019-03-06T19:47:47Z,2019-03-06T19:47:47Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,caabe6633d9bef7f2f52807cc5a1f477f3a077d4,13221727,6628425,6815844 612d390f925e5490314c363e5e368b2a8bd5daf0,"Add use_cftime option to open_dataset (#2759) * 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",2019-02-19T20:47:26Z,2019-02-19T20:47:26Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,6628425,19864447 cd8e370e63f82deeaf4fc190f5c1d90463067368,'standard' now refers to 'gregorian' in cftime_range (#2771),2019-02-15T21:58:15Z,2019-02-15T21:58:15Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 a1ff90be63667ac4384ec74e82406dbcd1e05165,"dropna() for a Series indexed by a CFTimeIndex (#2734) * Support dropna() for a Series indexed by a CFTimeIndex * Add a what's new entry * Use == instead of is",2019-02-02T06:56:12Z,2019-02-02T06:56:12Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 fd2552a0f2d837c43085bc0c5d5da428771b8989,"Enable subtracting a scalar cftime.datetime object from a CFTimeIndex (#2672) * Enable subtracting a scalar cftime.datetime object from a CFTimeIndex * lint * Test cftime.datetime minus CFTimeIndex as well * Fix cftime minus CFTimeIndex",2019-01-30T16:45:09Z,2019-01-30T16:45:09Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 dba299befbdf19b02612573b218bcc1e97d4e010,Improve test for GH 2649 (#2654),2019-01-06T00:55:21Z,2019-01-06T00:55:21Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 85f88e7ac363c55b77375af93ebfc8c15b75c129,"Convert ref_date to UTC in encode_cf_datetime (#2651) * Convert ref_date to UTC in encode_cf_datetime * Only convert ref_date if it is not timezone-naive",2019-01-05T19:06:54Z,2019-01-05T19:06:54Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 49731d438e261073ddd71269e829c77418e465e9," Use built-in interp for interpolation with resample (#2640) * Use built-in interp for interpolation with resample Use bounds_error=False in interpolate * Add test for 2197 * lint * flake8",2019-01-03T01:18:05Z,2019-01-03T01:18:05Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 a8e5002ab616e43f2e1b19a5963475a8275b0220,"Fix dayofweek and dayofyear attributes from dates generated by cftime_range (#2633) * Add workaround for cftime issue 106 * Raise ImportError for too old a version of cftime * lint * Simplify version check logic * Fix test skipping logic",2018-12-28T19:04:49Z,2018-12-28T19:04:49Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 7fcb80f9865a7ade1b9c2f3d48bf0d31d6672bdb,"Fix failure in time encoding for pandas < 0.21.1 (#2630) * Fix failure in time encoding for pandas < 0.21.1 * Add a test",2018-12-24T15:58:02Z,2018-12-24T15:58:02Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 a4c9ab5b5044801d2656e6e5527dcf21bd2dc356,Remove meaningless tz argument in cftime_range (#2613),2018-12-18T17:21:35Z,2018-12-18T17:21:35Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 cbb32e16079ad56555ffa816cd880fb2ef803315,Bump cftime version in doc environment (#2604),2018-12-13T17:12:37Z,2018-12-13T17:12:37Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 5d8ef5f885f7dc1cff5a34ab0e0aec1b4c2e3798,Add dayofyear and dayofweek accessors (#2599),2018-12-11T19:28:30Z,2018-12-11T19:28:30Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 70f3b1cb251798335099ccdcca27ac85c70e6449,Remove old-style resample example in documentation (#2543),2018-11-05T16:46:29Z,2018-11-05T16:46:29Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,0c7e9e762dbfd6554e60c953bf27493047d95109,13221727,6628425,2448579 656f8bd05e44880c21c1ad56a03cfd1b4d0f38ee,"Switch enable_cftimeindex to True by default (#2516) * Switch enable_cftimeindex to True by default * Add a friendlier error message when plotting cftime objects * Mention that the non-standard calendars are used in climate science * Add GH issue references to docs * Deprecate enable_cftimeindex option * Add CFTimeIndex.to_datetimeindex method * Add friendlier error message for resample * lint * Address review comments * Take into account microsecond attribute in cftime_to_nptime * Add test for decoding dates with microsecond-resolution units This would have failed before including the microsecond attribute of each date in cftime_to_nptime in eaa4a44. * Fix typo in time-series.rst * Formatting * Fix test_decode_cf_datetime_non_iso_strings * Prevent warning emitted from set_options.__exit__",2018-11-01T05:04:25Z,2018-11-01T05:04:25Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 3176d8a241ff2bcfaa93536a59497c637358b022,Remove tests where answers change in cftime 1.0.2.1 (#2522),2018-10-30T01:00:43Z,2018-10-30T01:00:43Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 c2a6902f090e063692c53e1dacd6c20e584d8e80,Fix bug where OverflowError is not being raised (#2519),2018-10-28T00:38:59Z,2018-10-28T00:38:59Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 b622c5e7da928524ef949d9e389f6c7f38644494,Remove Dataset.T from api-hidden.rst (#2515),2018-10-26T14:50:35Z,2018-10-26T14:50:35Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,279c587273ec459ffb5192e60bf8447c05601fa5,13221727,6628425,5635139 7cab33a1335cc2cbeb93090145a7f6d4c25a1692,"Improve arithmetic operations involving CFTimeIndexes and TimedeltaIndexes (#2485) * Improve arithmetic involving CFTimeIndexes and TimedeltaIndexes * Fix Appveyor Python 2.7 test failure * Clarify comment in _add_delta",2018-10-17T04:00:56Z,2018-10-17T04:00:56Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 3cef8d730d5bbd699a393fa15266064ebb9849e2,"Clean up _parse_array_of_cftime_strings (#2464) * Make _parse_array_of_cftime_strings more robust * lint",2018-10-05T08:02:17Z,2018-10-05T08:02:17Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 8fb57f7b9ff683225650a928b8d7d287d8954e79,"Add CFTimeIndex.shift (#2431) * Add CFTimeIndex.shift Update what's new Add bug fix note * Add example to docstring * Use pycompat for basestring * Generate an API reference page for CFTimeIndex.shift",2018-10-02T14:44:29Z,2018-10-02T14:44:29Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 f9c4169150286fa1aac020ab965380ed21fe1148,Fix FutureWarning in CFTimeIndex.date_type (#2448),2018-09-30T13:16:48Z,2018-09-30T13:16:48Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 c2b09d697c741b5d6ddede0ba01076c0cb09cf19,"Enable use of cftime.datetime coordinates with differentiate and interp (#2434) * Enable use of cftime.datetime coords with differentiate and interp * Raise TypeError for non-datetime x_new * Rename to_numeric to datetime_to_numeric",2018-09-28T13:44:54Z,2018-09-28T13:44:54Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,caabe6633d9bef7f2f52807cc5a1f477f3a077d4,13221727,6628425,6815844 5b87b6e2f159b827f739e12d4faae57a0b6f6178,"WIP Add a CFTimeIndex-enabled xr.cftime_range function (#2301) * Initial work on adding a cftime-compatible date_range function Add docstring for xr.date_range Fix failing test Fix test skipping logic Coerce result of zip to a list in test setup Add and clean up tests Fix skip logic Skip roll_forward and roll_backward tests if cftime is not installed Expose all possible arguments to pd.date_range Add more detail to docstrings flake8 Add a what's new entry Add a short example to time-series.rst * Allow empty CFTimeIndexes; add calendar to CFTimeIndex repr * Enable CFTimeIndex constructor to optionally take date_range arguments * Simplify date_range to use new CFTimeIndex constructor * Rename xr.date_range to xr.cftime_range * Follow pandas behavior/naming for rollforward, rollback, and onOffset * Update docstring * Add pandas copyright notice to cftime_offsets.py * Check validity of offset constructor arguments * Fix TypeError versus ValueError uses * Use a module-level importorskip in test_cftime_offsets.py * Only return a CFTimeIndex from cftime_range * Keep CFTimeIndex constructor simple * Add some explicitly calendar-specific tests * Revert back to default repr * lint * return NotImplemented * Convert pandas copyright notices to comments * test_calendar_leap_year_length -> test_calendar_year_length * Use return NotImplemented in __apply__ too",2018-09-19T20:24:39Z,2018-09-19T20:24:39Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 48d55eea052fec204b843babdc81c258f3ed5ce1,"Fix string slice indexing for a length-1 CFTimeIndex (#2166) * Fix string slice indexing for length-1 CFTimeIndex * Skip test if cftime is not installed * Add a what's new entry",2018-05-21T08:02:34Z,2018-05-21T08:02:34Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 188141fe97a5effacf32f2508fd05b644c720e5d,"Fix datetime.timedelta casting bug in coding.times.infer_datetime_units (#2128) * Fix #2127 * Fix typo in time-series.rst * Use pd.to_timedelta to convert to np.timedelta64 objects * Install cftime through netcdf4 through pip * box=False",2018-05-14T19:17:36Z,2018-05-14T19:17:36Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 91ac573e00538e0372cf9e5f2fdc1528a4ee8cb8,Add cftime to doc/environment.yml (#2126),2018-05-13T11:56:54Z,2018-05-13T11:56:54Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,b0f4ce5150c3c23b1766db99ba73f575ddfc0e71,13221727,6628425,10050469 ebe0dd03187a5c3138ea12ca4beb13643679fe21,"CFTimeIndex (#1252) * Start on implementing and testing NetCDFTimeIndex * TST Move to using pytest fixtures to structure tests * Address initial review comments * Address second round of review comments * Fix failing python3 tests * Match test method name to method name * First attempts at integrating NetCDFTimeIndex into xarray This is a first pass at the following: - Resetting the logic for decoding datetimes such that `np.datetime64` objects are never used for non-standard calendars - Adding logic to use a `NetCDFTimeIndex` whenever `netcdftime.datetime` objects are used in an array being cast as an index (so if one reads in a Dataset from a netCDF file or creates one in Python, which is indexed by a time coordinate that uses `netcdftime.datetime` objects a NetCDFTimeIndex will be used rather than a generic object-based index) - Adding logic to encode `netcdftime.datetime` objects when saving out to netCDF files * Cleanup * Fix DataFrame and Series test failures for NetCDFTimeIndex These were related to a recent minor upstream change in pandas: https://github.com/pandas-dev/pandas/blame/master/pandas/core/indexing.py#L1433 * First pass at making NetCDFTimeIndex compatible with #1356 * Address initial review comments * Restore test_conventions.py * Fix failing test in test_utils.py * flake8 * Update for standalone netcdftime * Address stickler-ci comments * Skip test_format_netcdftime_datetime if netcdftime not installed * A start on documentation * Fix failing zarr tests related to netcdftime encoding * Simplify test_decode_standard_calendar_single_element_non_ns_range * Address a couple review comments * Use else clause in _maybe_cast_to_netcdftimeindex * Start on adding enable_netcdftimeindex option * Continue parametrizing tests in test_coding_times.py * Update time-series.rst for enable_netcdftimeindex option * Use :py:func: in rst for xarray.set_options * Add a what's new entry and test that resample raises a TypeError * Move what's new entry to the version 0.10.3 section * Add version-dependent pathway for importing netcdftime.datetime * Make NetCDFTimeIndex and date decoding/encoding compatible with datetime.datetime * Remove logic to make NetCDFTimeIndex compatible with datetime.datetime * Documentation edits * Ensure proper enable_netcdftimeindex option is used under lazy decoding Prior to this, opening a dataset with enable_netcdftimeindex set to True and then accessing one of its variables outside the context manager would lead to it being decoded with the default enable_netcdftimeindex (which is False). This makes sure that lazy decoding takes into account the context under which it was called. * Add fix and test for concatenating variables with a NetCDFTimeIndex Previously when concatenating variables indexed by a NetCDFTimeIndex the index would be wrongly converted to a generic pd.Index * Further namespace changes due to netcdftime/cftime renaming * NetCDFTimeIndex -> CFTimeIndex * Documentation updates * Only allow use of CFTimeIndex when using the standalone cftime Also only allow for serialization of cftime.datetime objects when using the standalone cftime package. * Fix errant what's new changes * flake8 * Fix skip logic in test_cftimeindex.py * Use only_use_cftime_datetimes option in num2date * Require standalone cftime library for all new functionality Add tests/fixes for dt accessor with cftime datetimes * Improve skipping logic in test_cftimeindex.py * Fix skipping logic in test_cftimeindex.py for when cftime or netcdftime are not available. Use existing requires_cftime decorator where possible (i.e. only on tests that are not parametrized via pytest.mark.parametrize) * Fix skip logic in Python 3.4 build for test_cftimeindex.py * Improve error messages when for when the standalone cftime is not installed * Tweak skip logic in test_accessors.py * flake8 * Address review comments * Temporarily remove cftime from py27 build environment on windows * flake8 * Install cftime via pip for Python 2.7 on Windows * flake8 * Remove unnecessary new lines; simplify _maybe_cast_to_cftimeindex * Restore test case for #2002 in test_coding_times.py I must have inadvertently removed it during a merge. * Tweak dates out of range warning logic slightly to preserve current default * Address review comments",2018-05-13T05:19:09Z,2018-05-13T05:19:09Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,5f199557d0f8f69fbea5e027a407146e2669a812,13221727,6628425, a0bdbfbe5e2333d150930807e3c31f33ab455d26,"Updates for the renaming of netcdftime to cftime (#2054) * Update for renaming of netcdftime to cftime * Use pip to install cftime for now * Update documentation * Use now-available conda-forge installation pathway",2018-04-16T01:07:58Z,2018-04-16T01:07:58Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f10b21bed2846b879806f87039b77245b18e7671,13221727,6628425,1217238 697cc74b9af5fbfedadd54fd07019ce7684553ec,"Use requires_netcdftime decorators in test_coding_times.py (#1929) * Switch requires_netCDF4 decorators to requires_netcdftime decorators in test_coding_times.py * Fix 'netcdftime' has no attribute 'netcdftime' error",2018-02-21T06:18:34Z,2018-02-21T06:18:34Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,5f199557d0f8f69fbea5e027a407146e2669a812,13221727,6628425, 340a7396d70ef4fbceb05ee7f5b2de6aea1f9a68,Add separate requirements files for windows tests,2017-02-18T01:22:41Z,2017-02-18T01:22:41Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f04422bfa03dadc75fab6ce64de238fbe48f5be4,13221727,6628425,6628425 28f3f38b7274aa4f4862fab3dea9e5e11dec1311,Switch AppVeyor CI to use conda env,2017-02-17T11:56:24Z,2017-02-17T11:59:44Z,f04422bfa03dadc75fab6ce64de238fbe48f5be4,f04422bfa03dadc75fab6ce64de238fbe48f5be4,13221727,6628425,6628425