-
Notifications
You must be signed in to change notification settings - Fork 12
Hide internal methods for df management from the API and make them stateless #145
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jngrad
previously approved these changes
Nov 10, 2025
Member
jngrad
left a comment
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!
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
jngrad
approved these changes
Nov 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #117
Changed
storage/df_management. These methods also have been refactored to be stateless methods, i.e. making it impossible for them to change behavior during the pyMBE object lifetime or for the user to change the pyMBE dataframe unless explicitely calling them. This includes the methods:add_bond_in_df,add_value_to_df,assign_molecule_id,check_if_df_cell_has_a_value,check_if_name_is_defined_in_df,check_if_multiple_pmb_types_for_name,clean_df_row,clean_ids_in_df_row,copy_df_entry,create_variable_with_units,convert_columns_to_original_format,convert_str_to_bond_object,delete_entries_in_df,find_bond_key,setup_df.define_particle_entry_in_dfis now a private method in pyMBE, as it is a convenience method for internal use.NumpyEncoderis now a private class in the private modulestorage/df_managementbecause it is only internally used in pyMBE for serialization/deserialization.@jngrad this PR implies changes in many lines since I moved a lot of functions to the new module dedicated to the management of the pyMBE dataframe, but otherwise I have not changed the behaviour of pyMBE.