ae-sys-core 0.3.27__tar.gz → 0.3.28__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.
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/LICENSE.md +1 -1
- {ae_sys_core-0.3.27/ae_sys_core.egg-info → ae_sys_core-0.3.28}/PKG-INFO +6 -7
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/README.md +5 -5
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae/sys_core.py +6 -8
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28/ae_sys_core.egg-info}/PKG-INFO +6 -7
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae_sys_core.egg-info/requires.txt +0 -1
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/pyproject.toml +4 -1
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/setup.py +7 -9
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/tests/test_sys_core.py +8 -5
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae_sys_core.egg-info/SOURCES.txt +0 -0
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae_sys_core.egg-info/dependency_links.txt +0 -0
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae_sys_core.egg-info/top_level.txt +0 -0
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/ae_sys_core.egg-info/zip-safe +0 -0
- {ae_sys_core-0.3.27 → ae_sys_core-0.3.28}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_sys_core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.28
|
|
4
4
|
Summary: ae namespace module portion sys_core: dynamic system configuration, initialization and connection
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_sys_core
|
|
6
6
|
Author: AndiEcker
|
|
@@ -22,7 +22,6 @@ Classifier: Typing :: Typed
|
|
|
22
22
|
Requires-Python: >=3.12
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE.md
|
|
25
|
-
Requires-Dist: ae_base
|
|
26
25
|
Requires-Dist: ae_core
|
|
27
26
|
Requires-Dist: ae_console
|
|
28
27
|
Provides-Extra: dev
|
|
@@ -61,15 +60,15 @@ Dynamic: requires-dist
|
|
|
61
60
|
Dynamic: requires-python
|
|
62
61
|
Dynamic: summary
|
|
63
62
|
|
|
64
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
65
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
66
|
-
# sys_core 0.3.
|
|
63
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.110 -->
|
|
64
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.33 -->
|
|
65
|
+
# sys_core 0.3.28
|
|
67
66
|
|
|
68
67
|
[](
|
|
69
68
|
https://gitlab.com/ae-group/ae_sys_core)
|
|
70
69
|
[](
|
|
71
|
+
https://gitlab.com/ae-group/ae_sys_core/-/tree/release0.3.28)
|
|
73
72
|
[](
|
|
74
73
|
https://pypi.org/project/ae-sys-core/#history)
|
|
75
74
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
2
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
3
|
-
# sys_core 0.3.
|
|
1
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.110 -->
|
|
2
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.33 -->
|
|
3
|
+
# sys_core 0.3.28
|
|
4
4
|
|
|
5
5
|
[](
|
|
6
6
|
https://gitlab.com/ae-group/ae_sys_core)
|
|
7
7
|
[](
|
|
9
|
+
https://gitlab.com/ae-group/ae_sys_core/-/tree/release0.3.28)
|
|
10
10
|
[](
|
|
11
11
|
https://pypi.org/project/ae-sys-core/#history)
|
|
12
12
|
|
|
@@ -3,7 +3,7 @@ dynamic system configuration, initialization and connection
|
|
|
3
3
|
===========================================================
|
|
4
4
|
|
|
5
5
|
this module allows the dynamic (data-driven) configuration and connection of your application to all their needed
|
|
6
|
-
external systems (like servers, databases, cloud storages
|
|
6
|
+
external systems (like servers, databases, cloud storages).
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
system classes
|
|
@@ -14,7 +14,7 @@ the :class:`SystemBase` class represents a single system. the creation of instan
|
|
|
14
14
|
|
|
15
15
|
each instance of :class:`SystemBase` is using a system-specific connector class to establish an internal connection to
|
|
16
16
|
the represented system. for the implementation of a connector class, simply inherit from the abstract base class
|
|
17
|
-
:class:`
|
|
17
|
+
:class:`SystemConnectorBase` - also provided by this module.
|
|
18
18
|
|
|
19
19
|
by creating an instance of the class :class:`UsedSystems` you get a dictionary-like object with all the properties for
|
|
20
20
|
each configured system. the items of this dict are instances of the class :class:`SystemBase`.
|
|
@@ -67,7 +67,7 @@ from ae.core import DEBUG_LEVEL_DISABLED, DEBUG_LEVEL_VERBOSE, HIDDEN_CREDENTIAL
|
|
|
67
67
|
from ae.console import ConsoleApp # type: ignore # mypy doesn't find namespace pkg
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
__version__ = '0.3.
|
|
70
|
+
__version__ = '0.3.28'
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
SYS_SECTION_NAME = 'aeSystems' #: section name for system config variables
|
|
@@ -77,9 +77,9 @@ def config_value(var_name: str, console_app: ConsoleApp) -> Any:
|
|
|
77
77
|
""" determine system configuration setting value from application config options/variables.
|
|
78
78
|
|
|
79
79
|
:param var_name: config variable name. variable value gets searched in the application instance
|
|
80
|
-
environment, first in
|
|
80
|
+
environment, first in :ref:`application config options <config-options>`,
|
|
81
81
|
then in the :ref:`application config variables <config-variables>` (first within
|
|
82
|
-
the section
|
|
82
|
+
the section 'aeOptions') and then within SYS_SECTION_NAME/aeSystems.
|
|
83
83
|
:param console_app: ConsoleApp instance of the application providing these config options/variables.
|
|
84
84
|
:return: config variable value if found else None.
|
|
85
85
|
"""
|
|
@@ -100,7 +100,7 @@ class SystemBase:
|
|
|
100
100
|
|
|
101
101
|
:param sys_id: unique str to identify a system (also used as prefix/suffix).
|
|
102
102
|
:param console_app: ConsoleApp instance of the application using these systems.
|
|
103
|
-
:param credentials: dict to access system, containing e.g. username, password, token, dsn
|
|
103
|
+
:param credentials: dict to access system, containing e.g. username, password, token, dsn.
|
|
104
104
|
:param features: optional list with special features for this system (see SDF_* constants).
|
|
105
105
|
:param rec_types: optional dict of available record types for this system.
|
|
106
106
|
"""
|
|
@@ -128,7 +128,6 @@ class SystemBase:
|
|
|
128
128
|
cre = self.credentials
|
|
129
129
|
ret += "&" + repr(cre if self.console_app.debug_level >= DEBUG_LEVEL_VERBOSE else
|
|
130
130
|
{k: v for k, v in cre.items() if k.lower() not in HIDDEN_CREDENTIALS})
|
|
131
|
-
# noinspection PyStringConversionWithoutDunderMethod
|
|
132
131
|
ret += "_" + repr(self.features)
|
|
133
132
|
ret += "@" + repr(self.console_app.app_name)
|
|
134
133
|
return ret
|
|
@@ -199,7 +198,6 @@ class SystemConnectorBase(ABC):
|
|
|
199
198
|
cre = self.system.credentials
|
|
200
199
|
ret += "&" + repr(cre if self.console_app.debug_level >= DEBUG_LEVEL_VERBOSE else
|
|
201
200
|
{k: v for k, v in cre.items() if k.lower() not in HIDDEN_CREDENTIALS})
|
|
202
|
-
# noinspection PyStringConversionWithoutDunderMethod
|
|
203
201
|
ret += "_" + repr(self.system.features)
|
|
204
202
|
ret += "@" + repr(self.console_app.app_name)
|
|
205
203
|
return ret
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_sys_core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.28
|
|
4
4
|
Summary: ae namespace module portion sys_core: dynamic system configuration, initialization and connection
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_sys_core
|
|
6
6
|
Author: AndiEcker
|
|
@@ -22,7 +22,6 @@ Classifier: Typing :: Typed
|
|
|
22
22
|
Requires-Python: >=3.12
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE.md
|
|
25
|
-
Requires-Dist: ae_base
|
|
26
25
|
Requires-Dist: ae_core
|
|
27
26
|
Requires-Dist: ae_console
|
|
28
27
|
Provides-Extra: dev
|
|
@@ -61,15 +60,15 @@ Dynamic: requires-dist
|
|
|
61
60
|
Dynamic: requires-python
|
|
62
61
|
Dynamic: summary
|
|
63
62
|
|
|
64
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
65
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
66
|
-
# sys_core 0.3.
|
|
63
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.110 -->
|
|
64
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.33 -->
|
|
65
|
+
# sys_core 0.3.28
|
|
67
66
|
|
|
68
67
|
[](
|
|
69
68
|
https://gitlab.com/ae-group/ae_sys_core)
|
|
70
69
|
[](
|
|
71
|
+
https://gitlab.com/ae-group/ae_sys_core/-/tree/release0.3.28)
|
|
73
72
|
[](
|
|
74
73
|
https://pypi.org/project/ae-sys-core/#history)
|
|
75
74
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.
|
|
1
|
+
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.109
|
|
2
2
|
[build-system]
|
|
3
3
|
requires = ["setuptools>=42", "wheel"]
|
|
4
4
|
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[tool.coverage.run]
|
|
7
|
+
omit = ["**/*.kv"] # ignore Kivy's .kv files in pytest unit tests with coverage
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.
|
|
1
|
+
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.109
|
|
2
2
|
""" setup of ae namespace module portion sys_core: dynamic system configuration, initialization and connection. """
|
|
3
|
-
import sys
|
|
4
|
-
# noinspection PyUnresolvedReferences
|
|
5
3
|
import pathlib
|
|
6
|
-
|
|
4
|
+
import sys
|
|
5
|
+
from typing import Any
|
|
7
6
|
import setuptools
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
print("SetUp " + __name__ + ": " + sys.executable + str(sys.argv) + f" {sys.path=}")
|
|
11
10
|
|
|
12
|
-
setup_kwargs = {
|
|
11
|
+
setup_kwargs: dict[str, Any] = {
|
|
13
12
|
'author': 'AndiEcker',
|
|
14
13
|
'author_email': 'aecker2@gmail.com',
|
|
15
14
|
'classifiers': [
|
|
@@ -49,7 +48,6 @@ setup_kwargs = {
|
|
|
49
48
|
],
|
|
50
49
|
},
|
|
51
50
|
'install_requires': [
|
|
52
|
-
'ae_base',
|
|
53
51
|
'ae_core',
|
|
54
52
|
'ae_console',
|
|
55
53
|
],
|
|
@@ -77,10 +75,10 @@ setup_kwargs = {
|
|
|
77
75
|
},
|
|
78
76
|
'python_requires': '>=3.12',
|
|
79
77
|
'url': 'https://gitlab.com/ae-group/ae_sys_core',
|
|
80
|
-
'version': '0.3.
|
|
78
|
+
'version': '0.3.28',
|
|
81
79
|
'zip_safe': True,
|
|
82
80
|
}
|
|
83
81
|
|
|
84
|
-
if __name__ ==
|
|
82
|
+
if __name__ == '__main__':
|
|
85
83
|
setuptools.setup(**setup_kwargs)
|
|
86
|
-
|
|
84
|
+
...
|
|
@@ -3,7 +3,6 @@ import pytest
|
|
|
3
3
|
|
|
4
4
|
from configparser import ConfigParser
|
|
5
5
|
|
|
6
|
-
from ae.base import CFG_EXT
|
|
7
6
|
from ae.core import DEBUG_LEVEL_DISABLED, DEBUG_LEVEL_ENABLED, DEBUG_LEVEL_VERBOSE
|
|
8
7
|
from ae.console import ConsoleApp
|
|
9
8
|
|
|
@@ -36,7 +35,7 @@ SYS_DICTS = {SS: {'connector_module': 'sys_core_test_mocks', 'connector_class':
|
|
|
36
35
|
@pytest.fixture
|
|
37
36
|
def console_app_env(restore_app_env):
|
|
38
37
|
""" ConsoleApp with automatic option, sys.argv reset and app unregister. """
|
|
39
|
-
yield ConsoleApp('Console App Environment for ae.sys_core tests', additional_cfg_files=("tests/test" +
|
|
38
|
+
yield ConsoleApp('Console App Environment for ae.sys_core tests', additional_cfg_files=("tests/test" + '.cfg', ))
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
class TestConfig:
|
|
@@ -92,7 +91,9 @@ class TestSystemBase:
|
|
|
92
91
|
|
|
93
92
|
console_app_env.debug_level = DEBUG_LEVEL_DISABLED
|
|
94
93
|
assert SS in repr(s)
|
|
94
|
+
assert usr
|
|
95
95
|
assert usr not in repr(s)
|
|
96
|
+
assert pwd
|
|
96
97
|
assert pwd not in repr(s)
|
|
97
98
|
assert FEATURE1 not in repr(s)
|
|
98
99
|
assert console_app_env.app_name not in repr(s)
|
|
@@ -101,6 +102,7 @@ class TestSystemBase:
|
|
|
101
102
|
assert SS in repr(s)
|
|
102
103
|
assert usr
|
|
103
104
|
assert usr in repr(s)
|
|
105
|
+
assert pwd
|
|
104
106
|
assert pwd not in repr(s)
|
|
105
107
|
assert FEATURE1 in repr(s)
|
|
106
108
|
assert console_app_env.app_name in repr(s)
|
|
@@ -113,7 +115,6 @@ class TestSystemBase:
|
|
|
113
115
|
assert usr
|
|
114
116
|
assert usr in repr(s)
|
|
115
117
|
assert FEATURE1 in repr(s)
|
|
116
|
-
# noinspection PyStringConversionWithoutDunderMethod
|
|
117
118
|
assert repr(s.features) in repr(s)
|
|
118
119
|
assert console_app_env.app_name in repr(s)
|
|
119
120
|
|
|
@@ -190,7 +191,7 @@ class SystemConn(SystemConnectorBase):
|
|
|
190
191
|
return self.last_err_msg
|
|
191
192
|
|
|
192
193
|
|
|
193
|
-
class
|
|
194
|
+
class TestSystemConnectorBase:
|
|
194
195
|
def test_init(self, console_app_env):
|
|
195
196
|
empty_dict = {}
|
|
196
197
|
s = SystemBase(SX, console_app_env, empty_dict)
|
|
@@ -214,7 +215,9 @@ class TestSystemConnectionBase:
|
|
|
214
215
|
console_app_env.debug_level = DEBUG_LEVEL_DISABLED
|
|
215
216
|
|
|
216
217
|
assert SS in repr(sc)
|
|
218
|
+
assert usr
|
|
217
219
|
assert usr not in repr(sc)
|
|
220
|
+
assert pwd
|
|
218
221
|
assert pwd not in repr(sc)
|
|
219
222
|
assert FEATURE1 not in repr(sc)
|
|
220
223
|
assert console_app_env.app_name not in repr(sc)
|
|
@@ -234,7 +237,6 @@ class TestSystemConnectionBase:
|
|
|
234
237
|
assert usr
|
|
235
238
|
assert usr in repr(sc)
|
|
236
239
|
assert FEATURE1 in repr(sc)
|
|
237
|
-
# noinspection PyStringConversionWithoutDunderMethod
|
|
238
240
|
assert repr(s.features) in repr(sc)
|
|
239
241
|
assert console_app_env.app_name in repr(sc)
|
|
240
242
|
|
|
@@ -283,6 +285,7 @@ class TestUsedSystems:
|
|
|
283
285
|
|
|
284
286
|
def test_init_missing_cred(self, console_app_env):
|
|
285
287
|
us = UsedSystems(console_app_env)
|
|
288
|
+
# noinspection unsupported-operator
|
|
286
289
|
us.available_systems[SS]['credential_keys'] += ('MissingCredentialKey', )
|
|
287
290
|
us.clear()
|
|
288
291
|
us._load_merge_cred_feat({})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|