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

BUG: Fix+test timezone-preservation in DTA.repeat #24483

Merged
merged 6 commits into from
Dec 30, 2018

Conversation

jbrockmendel
Copy link
Member

Also added a whatsnew for #24265.

@@ -1367,6 +1367,7 @@ Datetimelike
- Bug in :attr:`Series.dt` where the cache would not update properly after an in-place operation (:issue:`24408`)
- Bug in :class:`PeriodIndex` where comparisons against an array-like object with length 1 failed to raise ``ValueError`` (:issue:`23078`)
- Bug in :meth:`DatetimeIndex.astype`, :meth:`PeriodIndex.astype` and :meth:`TimedeltaIndex.astype` ignoring the sign of the ``dtype`` for unsigned integer dtypes (:issue:`24405`).
- Fixed bug in :meth:`Series.max` with ``datetime64[ns]``-dtype failing to return ``NaT`` when nulls are present and ``skipna=False`` is passed (:issue:`24265`)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is only for tz aware right?

Copy link
Member Author

Choose a reason for hiding this comment

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

the example in 24265 was tz-naive

@@ -90,3 +90,10 @@ def test_setitem_clears_freq(self):
tz='US/Central'))
a[0] = pd.Timestamp("2000", tz="US/Central")
assert a.freq is None

Copy link
Contributor

Choose a reason for hiding this comment

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

is this near other repeat tests

Copy link
Member Author

Choose a reason for hiding this comment

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

There are no other repeat tests AFAICT; I think those are in the tests.extension part of 24024

Copy link
Contributor

Choose a reason for hiding this comment

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

(pandas) bash-3.2$ grep -r test_repeat pandas/tests
pandas/tests/series/test_analytics.py:    def test_repeat(self):
pandas/tests/extension/base/methods.py:    def test_repeat(self, data, repeats, as_series, use_numpy):
pandas/tests/extension/base/methods.py:    def test_repeat_raises(self, data, repeats, kwargs, error, msg, use_numpy):
Binary file pandas/tests/extension/base/__pycache__/methods.cpython-36.pyc matches
pandas/tests/io/test_stata.py:    def test_repeated_column_labels(self):
pandas/tests/test_multilevel.py:    def test_repeat(self):
pandas/tests/test_strings.py:    def test_repeat(self):
pandas/tests/indexes/multi/test_reshape.py:def test_repeat():
pandas/tests/indexes/period/test_period.py:    def test_repeat_freqstr(self, index, use_numpy):
pandas/tests/indexes/common.py:    def test_repeat(self):
pandas/tests/indexes/datetimes/test_ops.py:    def test_repeat_range(self, tz_naive_fixture):
pandas/tests/indexes/datetimes/test_ops.py:    def test_repeat(self, tz_naive_fixture):
pandas/tests/indexes/timedeltas/test_ops.py:    def test_repeat(self):
pandas/tests/indexes/test_base.py:    def test_repeat(self):

Copy link
Member Author

Choose a reason for hiding this comment

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

right, i meant repeat tests for DTA/TDA/PA. There are more coming up in the tests.extension part of 24024.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, i guess that 's fine. need a followup then to consolidate DTI/DTA test for common methods at some point then.

@jreback jreback added the Timezones Timezone data dtype label Dec 29, 2018
@jreback jreback added this to the 0.24.0 milestone Dec 29, 2018
@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@aeff38d). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #24483   +/-   ##
=========================================
  Coverage          ?   43.04%           
=========================================
  Files             ?      166           
  Lines             ?    52328           
  Branches          ?        0           
=========================================
  Hits              ?    22524           
  Misses            ?    29804           
  Partials          ?        0
Flag Coverage Δ
#single 43.04% <0%> (?)
Impacted Files Coverage Δ
pandas/core/arrays/datetimelike.py 46.03% <0%> (ø)

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 aeff38d...4741f2d. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #24483 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24483      +/-   ##
==========================================
+ Coverage   92.31%   92.31%   +<.01%     
==========================================
  Files         166      166              
  Lines       52335    52335              
==========================================
+ Hits        48313    48314       +1     
+ Misses       4022     4021       -1
Flag Coverage Δ
#multiple 90.73% <100%> (ø) ⬆️
#single 43.04% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/datetimelike.py 95.66% <100%> (ø) ⬆️
pandas/util/testing.py 87.84% <0%> (+0.09%) ⬆️

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 aeff38d...2a7a5f1. Read the comment docs.

@jbrockmendel
Copy link
Member Author

looks like this survived with needing rebase

@gfyoung gfyoung merged commit 1ebfd8a into pandas-dev:master Dec 30, 2018
@gfyoung
Copy link
Member

gfyoung commented Dec 30, 2018

looks like this survived with needing rebase

Nice. Thanks @jbrockmendel !

thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
* upstream/master:
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
@jbrockmendel jbrockmendel deleted the repeat branch December 30, 2018 15:05
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
* upstream/master:
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
…strings

* upstream/master:
  TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492)
  Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502)
  DOC: Fix building of a single API document (pandas-dev#24506)
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants