Skip to content

diff reduction for 24024 #24543

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

Merged
merged 5 commits into from
Jan 2, 2019
Merged

diff reduction for 24024 #24543

merged 5 commits into from
Jan 2, 2019

Conversation

jbrockmendel
Copy link
Member

docstrings, comments, edits that are correct both before and after #24024

the only substantive change is adding a test specifically for constructing a DatetimeArray from a PandasArray.

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24543      +/-   ##
==========================================
+ Coverage   92.32%   92.33%   +<.01%     
==========================================
  Files         166      166              
  Lines       52454    52457       +3     
==========================================
+ Hits        48430    48434       +4     
+ Misses       4024     4023       -1
Flag Coverage Δ
#multiple 90.75% <100%> (ø) ⬆️
#single 43% <72.41%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/period.py 98.51% <ø> (-0.01%) ⬇️
pandas/core/indexes/datetimes.py 96.3% <ø> (ø) ⬆️
pandas/core/arrays/datetimelike.py 96.61% <100%> (ø) ⬆️
pandas/core/internals/blocks.py 93.83% <100%> (+0.01%) ⬆️
pandas/core/indexes/datetimelike.py 96.34% <100%> (+0.06%) ⬆️
pandas/core/arrays/timedeltas.py 87.42% <100%> (ø) ⬆️
pandas/core/arrays/datetimes.py 97.92% <100%> (ø) ⬆️
pandas/core/indexes/timedeltas.py 90.47% <100%> (ø) ⬆️
pandas/core/ops.py 94.28% <100%> (ø) ⬆️
pandas/core/indexes/period.py 92.28% <100%> (-0.09%) ⬇️
... and 1 more

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 f67aa13...1d2b9c3. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24543      +/-   ##
==========================================
+ Coverage   92.32%   92.32%   +<.01%     
==========================================
  Files         166      166              
  Lines       52454    52457       +3     
==========================================
+ Hits        48430    48433       +3     
  Misses       4024     4024
Flag Coverage Δ
#multiple 90.75% <100%> (ø) ⬆️
#single 43.01% <80.76%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/arrays/period.py 98.51% <ø> (-0.01%) ⬇️
pandas/core/indexes/datetimes.py 96.3% <ø> (ø) ⬆️
pandas/core/internals/blocks.py 93.83% <100%> (+0.01%) ⬆️
pandas/core/indexes/datetimelike.py 96.34% <100%> (+0.06%) ⬆️
pandas/core/arrays/timedeltas.py 87.42% <100%> (ø) ⬆️
pandas/core/arrays/datetimes.py 97.92% <100%> (ø) ⬆️
pandas/core/indexes/timedeltas.py 90.47% <100%> (ø) ⬆️
pandas/core/ops.py 94.28% <100%> (ø) ⬆️
pandas/core/indexes/period.py 92.28% <100%> (-0.09%) ⬇️
pandas/plotting/_core.py 83.76% <0%> (ø) ⬆️
... and 1 more

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 f67aa13...7f9aa23. Read the comment docs.

@gfyoung gfyoung added Testing pandas testing functions or related to the test suite Docs Clean labels Jan 2, 2019
Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

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

Truth be told, as someone who hasn't looked too closely at #24024, it's hard to understand what you mean by "correct" regarding these changes. By itself, it would have been tricky to understand the motivation.

That being said, as you are pulling this out of an existing PR, I'll trust that these will mesh with what you're ultimately aiming to do there.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

small comments. ping on green.

return self._data.freq

@freq.setter
def freq(self, value):
value = Period._maybe_convert_freq(value)
# Note: When this deprecation is enforced, PeriodIndex.freq can
Copy link
Contributor

Choose a reason for hiding this comment

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

make this TODO

@@ -3245,7 +3245,8 @@ def test_setitem(self):
b1 = df._data.blocks[1]
b2 = df._data.blocks[2]
assert b1.values.equals(b2.values)
assert id(b1.values.values.base) != id(b2.values.values.base)
if b1.values.values.base is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment here on what you are checking

Copy link
Member Author

Choose a reason for hiding this comment

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

should be covered by the comment 2 lines up

if not is_period_dtype(self):
return type(self)(res_values, freq='infer')
return self._from_sequence(res_values)
kwargs['freq'] = 'infer'
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer the original way of calling this, e.g.
self._from_sequence(res_values, freq='infer')

@TomAugspurger
Copy link
Contributor

Again, lodging a request that we stop breaking pieces off.

@jbrockmendel
Copy link
Member Author

Again, lodging a request that we stop breaking pieces off.

Aside from a diff-reduction PR made on your branch moments before this request came in: done.

@jreback
Copy link
Contributor

jreback commented Jan 2, 2019

@TomAugspurger close this an proceed with #24024 ? ok by me

@jbrockmendel
Copy link
Member Author

This is pretty benign and cuts 10% off of 24024

@jbrockmendel
Copy link
Member Author

plus a pretty test

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jan 2, 2019 via email

@jbrockmendel
Copy link
Member Author

ping

@jreback jreback added this to the 0.24.0 milestone Jan 2, 2019
@jreback jreback merged commit 4395a8c into pandas-dev:master Jan 2, 2019
@jreback
Copy link
Contributor

jreback commented Jan 2, 2019

ok, over to you @TomAugspurger for #24024

@jorisvandenbossche
Copy link
Member

@jreback why did you merge this? I understand it as @TomAugspurger explicitly asked for stopping breaking off pieces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Docs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants