ae-base 0.3.57__py3-none-any.whl → 0.3.60__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.
ae/base.py CHANGED
@@ -171,7 +171,7 @@ from types import ModuleType
171
171
  from typing import Any, Callable, Generator, Iterable, MutableMapping, Optional, Union, cast
172
172
 
173
173
 
174
- __version__ = '0.3.57'
174
+ __version__ = '0.3.60'
175
175
 
176
176
 
177
177
  os_path_abspath = os.path.abspath
@@ -334,21 +334,21 @@ def camel_to_snake(name: str) -> str:
334
334
  return "".join(str_parts)
335
335
 
336
336
 
337
- def deep_dict_update(data: dict, update: dict):
337
+ def deep_dict_update(data: dict, update: dict, overwrite: bool = True):
338
338
  """ update the optionally nested data dict in-place with the items and subitems from the update dict.
339
339
 
340
340
  :param data: dict to be updated/extended. non-existing keys of dict-subitems will be added.
341
341
  :param update: dict with the [sub-]items to update in the :paramref:`~deep_dict_update.data` dict.
342
+ :param overwrite: pass False to not overwrite an already existing value.
342
343
 
343
- .. hint:: the module/portion :mod:`ae.deep` is providing more deep update helper functions.
344
-
344
+ .. hint:: see the module/portion :mod:`ae.deep` for more deep update helper functions.
345
345
  """
346
346
  for upd_key, upd_val in update.items():
347
347
  if isinstance(upd_val, dict):
348
348
  if upd_key not in data:
349
349
  data[upd_key] = {}
350
- deep_dict_update(data[upd_key], upd_val)
351
- else:
350
+ deep_dict_update(data[upd_key], upd_val, overwrite=overwrite)
351
+ elif overwrite or upd_key not in data:
352
352
  data[upd_key] = upd_val
353
353
 
354
354
 
@@ -652,7 +652,8 @@ def load_env_var_defaults(start_dir: str, env_vars: MutableMapping[str, str]):
652
652
  found ``.env`` file. pass Python's :data:`os.environ` to amend this mapping directly
653
653
  with all the already not declared environment variables.
654
654
  """
655
- file_path = os_path_abspath(os_path_join(start_dir, DOTENV_FILE_NAME))
655
+ start_dir = norm_path(start_dir)
656
+ file_path = os_path_join(start_dir, DOTENV_FILE_NAME)
656
657
  if not os_path_isfile(file_path):
657
658
  file_path = os_path_join(os_path_dirname(start_dir), DOTENV_FILE_NAME)
658
659
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ae_base
3
- Version: 0.3.57
3
+ Version: 0.3.60
4
4
  Summary: ae namespace module portion base: basic constants, helper functions and context manager
5
5
  Home-page: https://gitlab.com/ae-group/ae_base
6
6
  Author: AndiEcker
@@ -69,13 +69,13 @@ Dynamic: summary
69
69
 
70
70
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.96 -->
71
71
  <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
72
- # base 0.3.57
72
+ # base 0.3.60
73
73
 
74
74
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_base/develop?logo=python)](
75
75
  https://gitlab.com/ae-group/ae_base)
76
76
  [![LatestPyPIrelease](
77
- https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.56?logo=python)](
78
- https://gitlab.com/ae-group/ae_base/-/tree/release0.3.56)
77
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_base/release0.3.59?logo=python)](
78
+ https://gitlab.com/ae-group/ae_base/-/tree/release0.3.59)
79
79
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_base)](
80
80
  https://pypi.org/project/ae-base/#history)
81
81
 
@@ -0,0 +1,7 @@
1
+ ae/base.py,sha256=ntLmxDmy33N6G__SgvrfopMzsfDuGOWZb3nP-lnJ4Mk,67533
2
+ ae_base-0.3.60.dist-info/licenses/LICENSE.md,sha256=vn9XT8MDUxNAWsP60HLwHJp8ZLOI0OJBRe-1N2xXh08,35002
3
+ ae_base-0.3.60.dist-info/METADATA,sha256=lwP8j7UO5bTPl6d9j1HNN018CMIN8GcKNpBUBahLgI8,5724
4
+ ae_base-0.3.60.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ ae_base-0.3.60.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
6
+ ae_base-0.3.60.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
+ ae_base-0.3.60.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_project V0.3.35 -->
1
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_project V0.3.36 -->
2
2
  ### GNU GENERAL PUBLIC LICENSE
3
3
 
4
4
  Version 3, 29 June 2007
@@ -1,7 +0,0 @@
1
- ae/base.py,sha256=qeqUQx1aByTZ4TphLHMqHFb-DQ3mjjjAQHk07_7J4Ts,67354
2
- ae_base-0.3.57.dist-info/licenses/LICENSE.md,sha256=k61Ar-RjA09gAZejD19C5g-mItE0OuhIC4zU0gbYpXE,35002
3
- ae_base-0.3.57.dist-info/METADATA,sha256=CNz-UlnyEAwK4y139Wo1hJWqdzEhH28n1J_jULM4nmc,5724
4
- ae_base-0.3.57.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
- ae_base-0.3.57.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
6
- ae_base-0.3.57.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
- ae_base-0.3.57.dist-info/RECORD,,