You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hide internal methods for df management from the API and make them stateless (#145)
* create a private class for methods to manage the df
* move more methods to the new private class
* remove unnesary out variable
* move add_value_to_df to storage
* make clean_ids_in_df_row private in storage
* make add_bond and related methods privated and migrate them to storage
* shorten calls to df_management
* make private the last internal utility functions
* update changelog and add missing changes
* fix issues in calls in tests
* fix broken code in test
* fix wrong argument name
* fix PR number in changelog
* Update CHANGELOG.md
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
* Update pyMBE/storage/df_management.py
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
* Update pyMBE/storage/df_management.py
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
* Update pyMBE/storage/df_management.py
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
* Update pyMBE/storage/df_management.py
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
---------
Co-authored-by: Pablo <pablb.ntnu.no>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [Unreleased]
9
+
10
+
### Changed
11
+
- Methods that interact directly with the pyMBE dataframe are now private and stored in a dedicated module in `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`. (#145)
12
+
-`define_particle_entry_in_df` is now a private method in pyMBE, as it is a convenience method for internal use. (#145)
13
+
- The custom `NumpyEncoder` is now a private class in the private module `storage/df_management` because it is only internally used in pyMBE for serialization/deserialization. (#145)
0 commit comments