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

REF: make pytables get_atom_data non-stateful #30074

Merged

Conversation

jbrockmendel
Copy link
Member

cc @WillAyd how do we annotate "this returns a subclass of Col"? Here i've used Type["Col"] but afaik that doesnt include subclasses

@jbrockmendel jbrockmendel added the IO HDF5 read_hdf, HDFStore label Dec 5, 2019
@WillAyd
Copy link
Member

WillAyd commented Dec 5, 2019 via email

@jbrockmendel
Copy link
Member Author

didnt see an error, was just curious

@WillAyd
Copy link
Member

WillAyd commented Dec 5, 2019 via email

@jbrockmendel
Copy link
Member Author

updated to remove a comment explained the answer to.

also made unrelated changes to one comment typo and to re-raise on AssertionError

self.dtype = codes.dtype.name
if values.ndim > 1:
raise NotImplementedError("only support 1-d categoricals")

assert self.dtype.startswith("int"), self.dtype

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I follow the motivation for this. Seems out of scope.

Copy link
Member Author

Choose a reason for hiding this comment

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

making sure that i understand correctly that the codes is always signed-integer

@jreback jreback added this to the 1.0 milestone Dec 5, 2019
@@ -1092,6 +1092,8 @@ def remove(self, key: str, where=None, start=None, stop=None):
except KeyError:
# the key is not a valid store, re-raising KeyError
raise
except AssertionError:
Copy link
Contributor

Choose a reason for hiding this comment

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

what are these from?

Copy link
Member Author

Choose a reason for hiding this comment

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

these are unrelated to most of the PR, but related to the couple-weeks-ago push to get rid of except Exception. In cases where we can't (yet) get rid of except Exception, at least re-raising assertion errors is useful to debugginig

Copy link
Member Author

Choose a reason for hiding this comment

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

if this is a sticking point im happy to revert and do this elsewhere

Copy link
Contributor

Choose a reason for hiding this comment

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

no its fine, if possible can you add a comment indicating where its raised from

@jreback
Copy link
Contributor

jreback commented Dec 5, 2019

pls rebase

@jbrockmendel jbrockmendel added the Refactor Internal refactoring of code label Dec 5, 2019
@jbrockmendel
Copy link
Member Author

rebased+green

@jbrockmendel
Copy link
Member Author

gentle ping, this is a blocker for the payoff ive been promising

@jreback jreback merged commit 3fc4417 into pandas-dev:master Dec 6, 2019
@jbrockmendel jbrockmendel deleted the cln-pytables-get_atom_coltype branch December 6, 2019 00:47
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HDF5 read_hdf, HDFStore Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants