Skip to content

CLN: cleanup libs cimports, remove is_timestamp #18663

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 12 commits into from
Dec 8, 2017

Conversation

jbrockmendel
Copy link
Member

  • cleanup imports in _libs.parsers, including some unused
  • a couple of functions from util are used exactly once and only in parsers. Get those directly from numpy_helper instead of from util
  • remove unused util.is_contiguous
  • remove a bunch of distutils shebang-like declarations that are unnecessary and are a pain for when we do want to run tests with coverage enabled.
  • remove tslib.is_timestamp (will be helpful for eventual goal of "fixing" Timestamp classmethods)
  • remove some leftover constants from tslib, update imports appropriately

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.

looks fine. some comments to add to the list (or you can fix here). ping on green.

@@ -22,8 +22,7 @@
from pandas.core.base import SpecificationError, AbstractMethodError
from pandas.errors import UnsupportedFunctionCall
from pandas.core.groupby import DataError
from pandas._libs.tslibs.resolution import DAYS
from pandas.tseries.frequencies import MONTHS
from pandas._libs.tslibs.resolution import DAYS, _MONTHS as MONTHS
Copy link
Contributor

Choose a reason for hiding this comment

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

should fix this this naming mistmacth in resolution (add to list)

@@ -26,7 +26,7 @@
from pandas._libs.tslibs.resolution import (Resolution,
_FrequencyInferer,
_TimedeltaFrequencyInferer)
from pandas._libs.tslibs.parsing import _get_rule_month
from pandas._libs.tslibs.parsing import _get_rule_month, _MONTH_NUMBERS
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, you can de-privatize these constants

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the game plan is to consolidate the several versions of these in ccalendar once it is merged.

@jreback jreback added Clean Datetime Datetime data dtype labels Dec 7, 2017
@jorisvandenbossche jorisvandenbossche changed the title cleanup cimports, remove is_timestamp CLN: cleanup libs cimports, remove is_timestamp Dec 7, 2017
@jreback
Copy link
Contributor

jreback commented Dec 7, 2017

rebase and something failing

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.

rebase (and you can now use ccalendar)

@@ -96,6 +81,11 @@ try:
except NameError:
basestring = str

cdef extern from "src/numpy_helper.h":
object sarr_from_data(cnp.dtype, int length, void* data)
void transfer_object_column(char *dst, char *src, size_t stride,
Copy link
Contributor

Choose a reason for hiding this comment

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

@chris-b1, @gfyoung don't we have an issue to remove support for structured arrays entirely? is that already deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

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

if not let's create one (and deprecate in 0.22)

@jreback jreback added the IO CSV read_csv, to_csv label Dec 7, 2017
@jbrockmendel
Copy link
Member Author

Huh the appveyor error is at build-time complaining "unresolved external symbol strcasecmp". But that particular cimport isn't changed.

@codecov
Copy link

codecov bot commented Dec 7, 2017

Codecov Report

Merging #18663 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18663      +/-   ##
==========================================
- Coverage   91.59%   91.55%   -0.04%     
==========================================
  Files         153      153              
  Lines       51257    51254       -3     
==========================================
- Hits        46949    46927      -22     
- Misses       4308     4327      +19
Flag Coverage Δ
#multiple 89.42% <100%> (-0.03%) ⬇️
#single 40.68% <33.33%> (-0.12%) ⬇️
Impacted Files Coverage Δ
pandas/tseries/frequencies.py 94.02% <100%> (-0.08%) ⬇️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 64.78% <0%> (-1.74%) ⬇️
pandas/core/frame.py 97.81% <0%> (-0.1%) ⬇️
pandas/util/testing.py 82.01% <0%> (+0.19%) ⬆️

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 9629fef...274dafb. Read the comment docs.

@jreback jreback added this to the 0.22.0 milestone Dec 8, 2017
@jreback jreback merged commit 9ec7212 into pandas-dev:master Dec 8, 2017
@jreback
Copy link
Contributor

jreback commented Dec 8, 2017

thanks!

@jbrockmendel jbrockmendel deleted the tslib-cleanup branch December 8, 2017 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Datetime Datetime data dtype IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants