Closed andrewgsavage closed 5 years ago
My first suggestion would be. 1.- Remove pandas support from the main pint repo 2.- Put an import of your pint repo within try/except (pint should work with or without your package).
I will see the implemententation and come back to you.
Regarding the tests, I think pintpandas should be tested only in the pintpandas repo
Should we push each of those versions to this repo in that order to maintain the history/review changes?
If you want. I'd be tempted to just do a clean 'new start' with your duck type. I think the messiness of our previous implementations can just sit in repos and doesn't necessarily need to be here (or have I misunderstood your comment?).
I saw a nice example of a duck typed extension array and thought it would be applicable to pint. A PeriodArray stores it's frequency in its PeriodDtype,
So I've made a branch where PintArray stores it's unit in PintType, which works nicely:
Previously the quantity containing a 1d array was stored in PintArray._data . Now that the unit is in the EAtype, ._data can store the magnitudes like most other EAs do, making the implementation more relatable. I'd prefer to use this duck typed version in the future.
That leaves three versions which it'd be good to have history for (although that could just be in my repo?)
Should we push each of those versions to this repo in that order to maintain the history/review changes?