dragon-ml-toolbox 10.11.1__tar.gz → 10.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dragon_ml_toolbox-10.11.1/dragon_ml_toolbox.egg-info → dragon_ml_toolbox-10.11.2}/PKG-INFO +1 -1
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2/dragon_ml_toolbox.egg-info}/PKG-INFO +1 -1
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/path_manager.py +18 -11
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/pyproject.toml +1 -1
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/LICENSE +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/LICENSE-THIRD-PARTY.md +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/README.md +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/SOURCES.txt +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/dependency_links.txt +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/requires.txt +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/top_level.txt +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ETL_cleaning.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ETL_engineering.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/GUI_tools.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/MICE_imputation.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_callbacks.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_datasetmaster.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_evaluation.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_evaluation_multi.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_inference.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_models.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_optimization.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_scaler.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ML_trainer.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/PSO_optimization.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/RNN_forecast.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/SQL.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/VIF_factor.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/__init__.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/_logger.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/_script_info.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/custom_logger.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/data_exploration.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ensemble_evaluation.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ensemble_inference.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/ensemble_learning.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/handle_excel.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/keys.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/optimization_tools.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/ml_tools/utilities.py +0 -0
- {dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/setup.cfg +0 -0
|
@@ -248,26 +248,33 @@ class PathManager:
|
|
|
248
248
|
_LOGGER.error(f"'{type(self).__name__}' object has no attribute or path key '{sanitized_name}'")
|
|
249
249
|
raise AttributeError()
|
|
250
250
|
|
|
251
|
-
def __setattr__(self, name: str, value: Union[str, Path]):
|
|
251
|
+
def __setattr__(self, name: str, value: Union[str, Path, bool, dict, str, int, tuple]):
|
|
252
252
|
"""Allows attribute-style setting of paths, e.g., PM.data = 'path/to/data'."""
|
|
253
|
-
# Check for internal attributes
|
|
253
|
+
# Check for internal attributes, which are set directly on the object.
|
|
254
254
|
if name.startswith('_'):
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
255
|
+
# This check prevents setting new private attributes after __init__ is done.
|
|
256
|
+
is_initialized = self.__dict__.get('_initialized', False)
|
|
257
|
+
if is_initialized:
|
|
258
|
+
_LOGGER.error(f"Cannot set private attribute '{name}' after initialization.")
|
|
259
|
+
raise AttributeError()
|
|
260
|
+
super().__setattr__(name, value)
|
|
261
261
|
return
|
|
262
262
|
|
|
263
|
-
#
|
|
263
|
+
# Sanitize the key for the public path.
|
|
264
264
|
sanitized_name = self._sanitize_key(name)
|
|
265
265
|
self._check_underscore_key(sanitized_name)
|
|
266
|
-
|
|
266
|
+
|
|
267
|
+
# Prevent overwriting existing methods (e.g., PM.status = 'foo').
|
|
268
|
+
# This check looks at the class, not the instance therefore won't trigger __getattr__.
|
|
269
|
+
if hasattr(self.__class__, sanitized_name):
|
|
267
270
|
_LOGGER.error(f"Cannot overwrite existing attribute or method '{sanitized_name}' ({name}).")
|
|
268
271
|
raise AttributeError()
|
|
272
|
+
|
|
273
|
+
if not isinstance(value, (str, Path)):
|
|
274
|
+
_LOGGER.error(f"Cannot assign type '{type(value).__name__}' to a path. Must be str or Path.")
|
|
275
|
+
raise TypeError
|
|
269
276
|
|
|
270
|
-
# If all checks pass, treat it as a public path.
|
|
277
|
+
# If all checks pass, treat it as a public path and store it in the _paths dictionary.
|
|
271
278
|
self._paths[sanitized_name] = Path(value)
|
|
272
279
|
|
|
273
280
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/requires.txt
RENAMED
|
File without changes
|
{dragon_ml_toolbox-10.11.1 → dragon_ml_toolbox-10.11.2}/dragon_ml_toolbox.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|