-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Fix/deprecate 'from_pandas' interface #1236
Conversation
@bryanwweber ... I'm responding outside of the feedback, as I believe there are some larger issues. Fwiw,
While this is correct, I believe that having a dedicated function has the potential to create more confusion than actual benefit. Users will need to know some details about how these objects work, and it's not too much to ask to just write two extra lines in Python. Fwiw, CSV support is something that would be used in 95% of the cases, as I don't expect pandas to play a major role.
I think that what is done here should ultimately be handled by PS:
This is of course correct, but it's not used. There are comments about this in 1D Flame Development Ideas (or at least there were at some time); imho this is really just a tangential issue here. |
Then I think we should just raise a |
4155f3f
to
3df1d23
Compare
FlameBase.from_pandas is a vestigial method that is left over from an earlier HDF interface that built on pandas and was replaced by the current implementation between 2.4 and 2.5.1 (PR Cantera#840); the original HDF implementation was never released. There is some merit to allowing import, but further discussion is postponed until after the release of Cantera 2.6 (see Cantera#1236).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the correct approach for now. Only one suggestion I have: should the docstring lead with a notification that this feature is currently deprecated/disabled? Seems like that would be most pertinent, before somebody decides to read/parse the rest of the docstring.
FlameBase.from_pandas is a vestigial method that is left over from an earlier HDF interface that built on pandas and was replaced by the current implementation between 2.4 and 2.5.1 (PR Cantera#840); the original HDF implementation was never released. There is some merit to allowing import, but further discussion is postponed until after the release of Cantera 2.6 (see Cantera#1236).
@decaluwe ... fair point - docstring is updated per your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ischoegl - LGTM.
pandas dataframes do not include information on boundaries and thus cannot
be used to recreate all information required to restore a simulation object.
Changes proposed in this pull request
from_pandas
keyword argumentsfrom_pandas
as it does not allow for a complete restoration of the objectNote that this API was used for a previous implementation of a pandas-based HDF export/import route, which has since been refactored.
If applicable, fill in the issue number this pull request is fixing
Closes #1235
Checklist
scons build
&scons test
) and unit tests address code coverage