naeural-client 2.7.24__py3-none-any.whl → 2.7.26__py3-none-any.whl
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.
- naeural_client/_ver.py +1 -1
- naeural_client/logging/base_logger.py +23 -15
- naeural_client/utils/config.py +6 -3
- {naeural_client-2.7.24.dist-info → naeural_client-2.7.26.dist-info}/METADATA +1 -1
- {naeural_client-2.7.24.dist-info → naeural_client-2.7.26.dist-info}/RECORD +8 -8
- {naeural_client-2.7.24.dist-info → naeural_client-2.7.26.dist-info}/WHEEL +0 -0
- {naeural_client-2.7.24.dist-info → naeural_client-2.7.26.dist-info}/entry_points.txt +0 -0
- {naeural_client-2.7.24.dist-info → naeural_client-2.7.26.dist-info}/licenses/LICENSE +0 -0
naeural_client/_ver.py
CHANGED
@@ -1098,24 +1098,32 @@ class BaseLogger(object):
|
|
1098
1098
|
def reload_config(self):
|
1099
1099
|
self._configure_data_and_dirs(self.config_file, self.config_file_encoding)
|
1100
1100
|
return
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1101
|
+
|
1102
|
+
@staticmethod
|
1103
|
+
def maybe_migrate_user_folder(verbose=False):
|
1104
|
+
current_user_folder = BaseLogger.get_user_folder()
|
1105
|
+
if current_user_folder.is_dir():
|
1106
|
+
if verbose:
|
1107
|
+
BaseLogger.print_color(f"{str(current_user_folder)} already exists. Skipping migration.")
|
1104
1108
|
return
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
#endif
|
1109
|
+
if verbose:
|
1110
|
+
BaseLogger.print_color(f'User folder {str(current_user_folder)} does not exist. Checking for previous versions...')
|
1111
|
+
for old_sdk_home in SDK_HOME_PREV:
|
1112
|
+
old_user_folder = current_user_folder.parent / old_sdk_home
|
1113
|
+
if old_user_folder.is_dir():
|
1114
|
+
if verbose:
|
1115
|
+
BaseLogger.print_color(f"Found previous user folder '{old_user_folder}'. Renaming to '{current_user_folder}'...")
|
1116
|
+
old_user_folder.rename(current_user_folder)
|
1117
|
+
return
|
1118
|
+
if verbose:
|
1119
|
+
BaseLogger.print_color("No previous user folders found.")
|
1117
1120
|
return
|
1118
1121
|
|
1122
|
+
def _maybe_migrate_folder(self):
|
1123
|
+
user_base_folder = BaseLogger.get_user_folder(as_str=True, include_sdk_home=True)
|
1124
|
+
if user_base_folder in self._base_folder:
|
1125
|
+
BaseLogger.maybe_migrate_user_folder(verbose=True)
|
1126
|
+
return
|
1119
1127
|
|
1120
1128
|
def _configure_data_and_dirs(self, config_file, config_file_encoding=None):
|
1121
1129
|
self._maybe_migrate_folder()
|
naeural_client/utils/config.py
CHANGED
@@ -327,7 +327,10 @@ def maybe_init_config():
|
|
327
327
|
"""
|
328
328
|
config_file = get_user_config_file()
|
329
329
|
if not config_file.exists():
|
330
|
-
|
331
|
-
|
332
|
-
|
330
|
+
BaseLogger.maybe_migrate_user_folder(verbose=True)
|
331
|
+
if not config_file.exists():
|
332
|
+
log_with_color(f"No configuration file found at {config_file}. Initializing configuration...", color="y")
|
333
|
+
reset_config(keep_existing=True)
|
334
|
+
return False
|
335
|
+
# config_file still does not exist even after attempting the migration.
|
333
336
|
return load_user_defined_config()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.26
|
4
4
|
Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
|
5
5
|
Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
|
6
6
|
Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
|
@@ -1,5 +1,5 @@
|
|
1
1
|
naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
|
2
|
-
naeural_client/_ver.py,sha256=
|
2
|
+
naeural_client/_ver.py,sha256=4aJFznz6iNPoG438iPfI7U7QS5QQHePWmnhay4adMFM,331
|
3
3
|
naeural_client/base_decentra_object.py,sha256=C4iwZTkhKNBS4VHlJs5DfElRYLo4Q9l1V1DNVSk1fyQ,4412
|
4
4
|
naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
|
5
5
|
naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
|
@@ -60,7 +60,7 @@ naeural_client/io_formatter/default/a_dummy.py,sha256=qr9eUizQ-NN5jdXVzkaZKMaf9K
|
|
60
60
|
naeural_client/io_formatter/default/aixp1.py,sha256=MX0TeUR4APA-qN3vUC6uzcz8Pssz5lgrQWo7td5Ri1A,3052
|
61
61
|
naeural_client/io_formatter/default/default.py,sha256=gEy78cP2D5s0y8vQh4aHuxqz7D10gGfuiKF311QhrpE,494
|
62
62
|
naeural_client/logging/__init__.py,sha256=b79X45VC6c37u32flKB2GAK9f-RR0ocwP0JDCy0t7QQ,33
|
63
|
-
naeural_client/logging/base_logger.py,sha256=
|
63
|
+
naeural_client/logging/base_logger.py,sha256=YxTqqjWpA6GCG_HoKbibSxkMGhVfIxfSPANUDrszzp0,69292
|
64
64
|
naeural_client/logging/small_logger.py,sha256=m12hCb_H4XifJYYfgCAOUDkcXm-h4pSODnFf277OFVI,2937
|
65
65
|
naeural_client/logging/logger_mixins/__init__.py,sha256=yQO7umlRvz63FeWpi-F9GRmC_MOHcNW6R6pwvZZBy3A,600
|
66
66
|
naeural_client/logging/logger_mixins/class_instance_mixin.py,sha256=xUXE2VZgmrlrSrvw0f6GF1jlTnVLeVkIiG0bhlBfq3o,2741
|
@@ -82,11 +82,11 @@ naeural_client/logging/tzlocal/win32.py,sha256=zBoj0vFVrGhnCm_f7xmYzGym4-fV-4Ij2
|
|
82
82
|
naeural_client/logging/tzlocal/windows_tz.py,sha256=Sv9okktjZJfRGGUOOppsvQuX_eXyXUxkSKCAFmWT9Hw,34203
|
83
83
|
naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uwpmI,77
|
84
84
|
naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
|
85
|
-
naeural_client/utils/config.py,sha256=
|
85
|
+
naeural_client/utils/config.py,sha256=IG7-rRYBWCqCiI2kDesFmY8gld0Ku9xWgzNPE1rwVcA,10352
|
86
86
|
naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
87
87
|
naeural_client/utils/oracle_sync/oracle_tester.py,sha256=GmZwu2JM9_UB2K-4rKB3o0RgWLqM-7Im6HwBnQLXmHI,25312
|
88
|
-
naeural_client-2.7.
|
89
|
-
naeural_client-2.7.
|
90
|
-
naeural_client-2.7.
|
91
|
-
naeural_client-2.7.
|
92
|
-
naeural_client-2.7.
|
88
|
+
naeural_client-2.7.26.dist-info/METADATA,sha256=OXbhHwmcarRtknEk377dMK7-22QOBTWLRxiEQWm2-Dg,12354
|
89
|
+
naeural_client-2.7.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
90
|
+
naeural_client-2.7.26.dist-info/entry_points.txt,sha256=CTua17GUrRa4aXeafezGC9TiWKGKQzwTjQmB2jyj22g,91
|
91
|
+
naeural_client-2.7.26.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
92
|
+
naeural_client-2.7.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|