ae-base 0.3.63__tar.gz → 0.3.65__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_base-0.3.63 → ae_base-0.3.65}/LICENSE.md +1 -1
- {ae_base-0.3.63/ae_base.egg-info → ae_base-0.3.65}/PKG-INFO +7 -7
- {ae_base-0.3.63 → ae_base-0.3.65}/README.md +3 -3
- {ae_base-0.3.63 → ae_base-0.3.65}/ae/base.py +29 -15
- {ae_base-0.3.63 → ae_base-0.3.65/ae_base.egg-info}/PKG-INFO +7 -7
- {ae_base-0.3.63 → ae_base-0.3.65}/ae_base.egg-info/requires.txt +1 -1
- ae_base-0.3.65/setup.py +119 -0
- {ae_base-0.3.63 → ae_base-0.3.65}/tests/test_base.py +31 -5
- ae_base-0.3.63/setup.py +0 -33
- {ae_base-0.3.63 → ae_base-0.3.65}/ae_base.egg-info/SOURCES.txt +0 -0
- {ae_base-0.3.63 → ae_base-0.3.65}/ae_base.egg-info/dependency_links.txt +0 -0
- {ae_base-0.3.63 → ae_base-0.3.65}/ae_base.egg-info/top_level.txt +0 -0
- {ae_base-0.3.63 → ae_base-0.3.65}/ae_base.egg-info/zip-safe +0 -0
- {ae_base-0.3.63 → ae_base-0.3.65}/setup.cfg +0 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.65
|
|
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
|
|
7
7
|
Author-email: aecker2@gmail.com
|
|
8
|
-
License:
|
|
8
|
+
License: GPL-3.0-or-later
|
|
9
9
|
Project-URL: Bug Tracker, https://gitlab.com/ae-group/ae_base/-/issues
|
|
10
10
|
Project-URL: Documentation, https://ae.readthedocs.io/en/latest/_autosummary/ae.base.html
|
|
11
11
|
Project-URL: Repository, https://gitlab.com/ae-group/ae_base
|
|
12
12
|
Project-URL: Source, https://ae.readthedocs.io/en/latest/_modules/ae/base.html
|
|
13
13
|
Keywords: configuration,development,environment,productivity
|
|
14
14
|
Classifier: Development Status :: 3 - Alpha
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
15
|
Classifier: Natural Language :: English
|
|
17
16
|
Classifier: Operating System :: OS Independent
|
|
18
17
|
Classifier: Programming Language :: Python
|
|
19
18
|
Classifier: Programming Language :: Python :: 3
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE.md
|
|
25
25
|
Provides-Extra: dev
|
|
26
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: aedev_project_tpls; extra == "dev"
|
|
27
27
|
Requires-Dist: ae_ae; extra == "dev"
|
|
28
28
|
Requires-Dist: anybadge; extra == "dev"
|
|
29
29
|
Requires-Dist: coverage-badge; extra == "dev"
|
|
@@ -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.
|
|
72
|
+
# base 0.3.65
|
|
73
73
|
|
|
74
74
|
[](
|
|
75
75
|
https://gitlab.com/ae-group/ae_base)
|
|
76
76
|
[](
|
|
78
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.64)
|
|
79
79
|
[](
|
|
80
80
|
https://pypi.org/project/ae-base/#history)
|
|
81
81
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.96 -->
|
|
2
2
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
|
|
3
|
-
# base 0.3.
|
|
3
|
+
# base 0.3.65
|
|
4
4
|
|
|
5
5
|
[](
|
|
6
6
|
https://gitlab.com/ae-group/ae_base)
|
|
7
7
|
[](
|
|
9
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.64)
|
|
10
10
|
[](
|
|
11
11
|
https://pypi.org/project/ae-base/#history)
|
|
12
12
|
|
|
@@ -32,6 +32,10 @@ sortable and compact string from a timestamp.
|
|
|
32
32
|
base helper functions
|
|
33
33
|
---------------------
|
|
34
34
|
|
|
35
|
+
the function :func:`evaluate_literal` can be used as an replacement of :func:`ast.literal_eval` to retrieve
|
|
36
|
+
basic data structure values from config, ini and .env files, while also accepting unquoted strings as a `str` type
|
|
37
|
+
instance.
|
|
38
|
+
|
|
35
39
|
most programming languages providing a function to determine the sign of a number. the :func:`sign` functino,
|
|
36
40
|
provided by this module/portion is filling this gap in Python.
|
|
37
41
|
|
|
@@ -148,6 +152,7 @@ os.path shortcuts
|
|
|
148
152
|
the following data items are pointers to shortcut at runtime the lookup to their related functions in the
|
|
149
153
|
Python module :mod:`os.path`:
|
|
150
154
|
"""
|
|
155
|
+
# pylint: disable=too-many-lines
|
|
151
156
|
import datetime
|
|
152
157
|
import getpass
|
|
153
158
|
import importlib.abc
|
|
@@ -171,7 +176,7 @@ from types import ModuleType
|
|
|
171
176
|
from typing import Any, Callable, Generator, Iterable, MutableMapping, Optional, Union, cast
|
|
172
177
|
|
|
173
178
|
|
|
174
|
-
__version__ = '0.3.
|
|
179
|
+
__version__ = '0.3.65'
|
|
175
180
|
|
|
176
181
|
|
|
177
182
|
os_path_abspath = os.path.abspath
|
|
@@ -494,6 +499,20 @@ def env_str(name: str, convert_name: bool = False) -> Optional[str]:
|
|
|
494
499
|
return os.environ.get(name)
|
|
495
500
|
|
|
496
501
|
|
|
502
|
+
def evaluate_literal(literal_string: str) -> Any:
|
|
503
|
+
""" evaluates a Python expression while accepting unquoted strings as str type.
|
|
504
|
+
|
|
505
|
+
:param literal_string: any literal of the base types (like dict, list, set, tuple) which are recognized
|
|
506
|
+
by :func:`ast.literal_eval`.
|
|
507
|
+
:return: an instance of the data type or the specified string, even if it is not quoted with
|
|
508
|
+
high comma characters.
|
|
509
|
+
"""
|
|
510
|
+
try:
|
|
511
|
+
return literal_eval(literal_string)
|
|
512
|
+
except (IndentationError, SyntaxError, TypeError, ValueError):
|
|
513
|
+
return literal_string
|
|
514
|
+
|
|
515
|
+
|
|
497
516
|
def force_encoding(text: Union[str, bytes], encoding: str = DEF_ENCODING, errors: str = DEF_ENCODE_ERRORS) -> str:
|
|
498
517
|
""" force/ensure the encoding of text (str or bytes) without any UnicodeDecodeError/UnicodeEncodeError.
|
|
499
518
|
|
|
@@ -1249,30 +1268,25 @@ def write_file(file_path: str, content: Union[str, bytes],
|
|
|
1249
1268
|
class ErrorMsgMixin: # pylint: disable=too-few-public-methods
|
|
1250
1269
|
""" mixin class providing sophisticated error message handling. """
|
|
1251
1270
|
_err_msg: str = ""
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
po = print
|
|
1255
|
-
dpo = print
|
|
1256
|
-
vpo = print
|
|
1271
|
+
main_app = None
|
|
1272
|
+
po = dpo = vpo = print
|
|
1257
1273
|
|
|
1258
1274
|
def __init__(self):
|
|
1259
1275
|
try:
|
|
1260
1276
|
from ae.core import main_app_instance # type: ignore # pylint: disable=import-outside-toplevel
|
|
1261
1277
|
|
|
1262
|
-
self.
|
|
1263
|
-
assert
|
|
1278
|
+
self.main_app = main_app = main_app_instance()
|
|
1279
|
+
assert main_app is not None, f"{self.__class__.__name__}.__init__() called too early; main app instance not"
|
|
1264
1280
|
|
|
1265
|
-
self.po =
|
|
1266
|
-
self.dpo =
|
|
1267
|
-
self.vpo =
|
|
1281
|
+
self.po = main_app.po
|
|
1282
|
+
self.dpo = main_app.dpo
|
|
1283
|
+
self.vpo = main_app.vpo
|
|
1268
1284
|
|
|
1269
1285
|
except (ImportError, AssertionError, Exception) as exc: # pylint: disable=broad-except
|
|
1270
1286
|
print(f"{self.__class__.__name__}.__init__() raised {exc}; using print() instead of main app error loggers")
|
|
1271
1287
|
|
|
1272
|
-
# self.
|
|
1273
|
-
# self.po = print
|
|
1274
|
-
# self.dpo = print
|
|
1275
|
-
# self.vpo = print
|
|
1288
|
+
# self.main_app = None
|
|
1289
|
+
# self.po = self.dpo = self.vpo = print
|
|
1276
1290
|
|
|
1277
1291
|
@property
|
|
1278
1292
|
def error_message(self) -> str:
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.65
|
|
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
|
|
7
7
|
Author-email: aecker2@gmail.com
|
|
8
|
-
License:
|
|
8
|
+
License: GPL-3.0-or-later
|
|
9
9
|
Project-URL: Bug Tracker, https://gitlab.com/ae-group/ae_base/-/issues
|
|
10
10
|
Project-URL: Documentation, https://ae.readthedocs.io/en/latest/_autosummary/ae.base.html
|
|
11
11
|
Project-URL: Repository, https://gitlab.com/ae-group/ae_base
|
|
12
12
|
Project-URL: Source, https://ae.readthedocs.io/en/latest/_modules/ae/base.html
|
|
13
13
|
Keywords: configuration,development,environment,productivity
|
|
14
14
|
Classifier: Development Status :: 3 - Alpha
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
15
|
Classifier: Natural Language :: English
|
|
17
16
|
Classifier: Operating System :: OS Independent
|
|
18
17
|
Classifier: Programming Language :: Python
|
|
19
18
|
Classifier: Programming Language :: Python :: 3
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE.md
|
|
25
25
|
Provides-Extra: dev
|
|
26
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: aedev_project_tpls; extra == "dev"
|
|
27
27
|
Requires-Dist: ae_ae; extra == "dev"
|
|
28
28
|
Requires-Dist: anybadge; extra == "dev"
|
|
29
29
|
Requires-Dist: coverage-badge; extra == "dev"
|
|
@@ -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.
|
|
72
|
+
# base 0.3.65
|
|
73
73
|
|
|
74
74
|
[](
|
|
75
75
|
https://gitlab.com/ae-group/ae_base)
|
|
76
76
|
[](
|
|
78
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.64)
|
|
79
79
|
[](
|
|
80
80
|
https://pypi.org/project/ae-base/#history)
|
|
81
81
|
|
ae_base-0.3.65/setup.py
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls V0.3.45
|
|
2
|
+
""" setup of ae namespace module portion base: basic constants, helper functions and context manager. """
|
|
3
|
+
# noinspection PyUnresolvedReferences
|
|
4
|
+
import sys
|
|
5
|
+
print(f"SetUp {__name__=} {sys.executable=} {sys.argv=} {sys.path=}")
|
|
6
|
+
|
|
7
|
+
# noinspection PyUnresolvedReferences
|
|
8
|
+
import setuptools
|
|
9
|
+
|
|
10
|
+
setup_kwargs = {
|
|
11
|
+
'author': 'AndiEcker',
|
|
12
|
+
'author_email': 'aecker2@gmail.com',
|
|
13
|
+
'classifiers': [ 'Development Status :: 3 - Alpha', 'Natural Language :: English', 'Operating System :: OS Independent',
|
|
14
|
+
'Programming Language :: Python', 'Programming Language :: Python :: 3',
|
|
15
|
+
'Programming Language :: Python :: 3.9', 'Topic :: Software Development :: Libraries :: Python Modules',
|
|
16
|
+
'Typing :: Typed'],
|
|
17
|
+
'description': 'ae namespace module portion base: basic constants, helper functions and context manager',
|
|
18
|
+
'extras_require': { 'dev': [ 'aedev_project_tpls', 'ae_ae', 'anybadge', 'coverage-badge', 'aedev_git_repo_manager', 'flake8',
|
|
19
|
+
'mypy', 'pylint', 'pytest', 'pytest-cov', 'pytest-django', 'typing', 'types-setuptools', 'wheel',
|
|
20
|
+
'twine'],
|
|
21
|
+
'docs': [],
|
|
22
|
+
'tests': [ 'anybadge', 'coverage-badge', 'aedev_git_repo_manager', 'flake8', 'mypy', 'pylint', 'pytest',
|
|
23
|
+
'pytest-cov', 'pytest-django', 'typing', 'types-setuptools', 'wheel', 'twine']},
|
|
24
|
+
'install_requires': [],
|
|
25
|
+
'keywords': ['configuration', 'development', 'environment', 'productivity'],
|
|
26
|
+
'license': 'GPL-3.0-or-later',
|
|
27
|
+
'long_description': ('<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.96 -->\n'
|
|
28
|
+
'<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->\n'
|
|
29
|
+
'# base 0.3.65\n'
|
|
30
|
+
'\n'
|
|
31
|
+
'[](\n'
|
|
32
|
+
' https://gitlab.com/ae-group/ae_base)\n'
|
|
33
|
+
'[](\n'
|
|
35
|
+
' https://gitlab.com/ae-group/ae_base/-/tree/release0.3.64)\n'
|
|
36
|
+
'[](\n'
|
|
37
|
+
' https://pypi.org/project/ae-base/#history)\n'
|
|
38
|
+
'\n'
|
|
39
|
+
'>ae namespace module portion base: basic constants, helper functions and context manager.\n'
|
|
40
|
+
'\n'
|
|
41
|
+
'[](\n'
|
|
42
|
+
' https://ae-group.gitlab.io/ae_base/coverage/index.html)\n'
|
|
43
|
+
'[](\n'
|
|
44
|
+
' https://ae-group.gitlab.io/ae_base/lineprecision.txt)\n'
|
|
45
|
+
'[](\n'
|
|
46
|
+
' https://ae-group.gitlab.io/ae_base/pylint.log)\n'
|
|
47
|
+
'\n'
|
|
48
|
+
'[](\n'
|
|
49
|
+
' https://gitlab.com/ae-group/ae_base/)\n'
|
|
50
|
+
'[](\n'
|
|
51
|
+
' https://gitlab.com/ae-group/ae_base/)\n'
|
|
52
|
+
'[](\n'
|
|
53
|
+
' https://gitlab.com/ae-group/ae_base/)\n'
|
|
54
|
+
'[](\n'
|
|
55
|
+
' https://pypi.org/project/ae-base/)\n'
|
|
56
|
+
'[](\n'
|
|
57
|
+
' https://gitlab.com/ae-group/ae_base/-/blob/develop/LICENSE.md)\n'
|
|
58
|
+
'[](\n'
|
|
59
|
+
' https://libraries.io/pypi/ae-base)\n'
|
|
60
|
+
'[](\n'
|
|
61
|
+
' https://pypi.org/project/ae-base/#files)\n'
|
|
62
|
+
'\n'
|
|
63
|
+
'\n'
|
|
64
|
+
'## installation\n'
|
|
65
|
+
'\n'
|
|
66
|
+
'\n'
|
|
67
|
+
'execute the following command to install the\n'
|
|
68
|
+
'ae.base module\n'
|
|
69
|
+
'in the currently active virtual environment:\n'
|
|
70
|
+
' \n'
|
|
71
|
+
'```shell script\n'
|
|
72
|
+
'pip install ae-base\n'
|
|
73
|
+
'```\n'
|
|
74
|
+
'\n'
|
|
75
|
+
'if you want to contribute to this portion then first fork\n'
|
|
76
|
+
'[the ae_base repository at GitLab](\n'
|
|
77
|
+
'https://gitlab.com/ae-group/ae_base "ae.base code repository").\n'
|
|
78
|
+
'after that pull it to your machine and finally execute the\n'
|
|
79
|
+
'following command in the root folder of this repository\n'
|
|
80
|
+
'(ae_base):\n'
|
|
81
|
+
'\n'
|
|
82
|
+
'```shell script\n'
|
|
83
|
+
'pip install -e .[dev]\n'
|
|
84
|
+
'```\n'
|
|
85
|
+
'\n'
|
|
86
|
+
'the last command will install this module portion, along with the tools you need\n'
|
|
87
|
+
'to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the\n'
|
|
88
|
+
'documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`\n'
|
|
89
|
+
'respectively.\n'
|
|
90
|
+
'\n'
|
|
91
|
+
'more detailed explanations on how to contribute to this project\n'
|
|
92
|
+
'[are available here](\n'
|
|
93
|
+
'https://gitlab.com/ae-group/ae_base/-/blob/develop/CONTRIBUTING.rst)\n'
|
|
94
|
+
'\n'
|
|
95
|
+
'\n'
|
|
96
|
+
'## namespace portion documentation\n'
|
|
97
|
+
'\n'
|
|
98
|
+
'information on the features and usage of this portion are available at\n'
|
|
99
|
+
'[ReadTheDocs](\n'
|
|
100
|
+
'https://ae.readthedocs.io/en/latest/_autosummary/ae.base.html\n'
|
|
101
|
+
'"ae_base documentation").\n'),
|
|
102
|
+
'long_description_content_type': 'text/markdown',
|
|
103
|
+
'name': 'ae_base',
|
|
104
|
+
'package_data': {'': []},
|
|
105
|
+
'packages': ['ae'],
|
|
106
|
+
'project_urls': { 'Bug Tracker': 'https://gitlab.com/ae-group/ae_base/-/issues',
|
|
107
|
+
'Documentation': 'https://ae.readthedocs.io/en/latest/_autosummary/ae.base.html',
|
|
108
|
+
'Repository': 'https://gitlab.com/ae-group/ae_base',
|
|
109
|
+
'Source': 'https://ae.readthedocs.io/en/latest/_modules/ae/base.html'},
|
|
110
|
+
'python_requires': '>=3.9',
|
|
111
|
+
'setup_requires': [],
|
|
112
|
+
'url': 'https://gitlab.com/ae-group/ae_base',
|
|
113
|
+
'version': '0.3.65',
|
|
114
|
+
'zip_safe': True,
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if __name__ == "__main__":
|
|
118
|
+
setuptools.setup(**setup_kwargs)
|
|
119
|
+
pass
|
|
@@ -20,7 +20,7 @@ from ae.base import (
|
|
|
20
20
|
ASCII_TO_UNICODE, BUILD_CONFIG_FILE, DOTENV_FILE_NAME, PY_EXT, PY_INIT, PY_MAIN, TESTS_FOLDER, UNICODE_TO_ASCII,
|
|
21
21
|
UNSET, URI_SEP_CHAR,
|
|
22
22
|
app_name_guess, ascii_str, build_config_variable_values, camel_to_snake,
|
|
23
|
-
dedefuse, deep_dict_update, defuse, dummy_function, duplicates, env_str,
|
|
23
|
+
dedefuse, deep_dict_update, defuse, dummy_function, duplicates, env_str, evaluate_literal,
|
|
24
24
|
force_encoding, format_given, full_stack_trace, import_module, instantiate_config_parser, in_wd,
|
|
25
25
|
load_env_var_defaults, load_dotenvs, main_file_paths_parts, mask_secrets, module_attr,
|
|
26
26
|
module_file_path, module_name, norm_line_sep, norm_name, norm_path, now_str,
|
|
@@ -77,17 +77,17 @@ class TestErrorMsgMixin:
|
|
|
77
77
|
def test_instantiation(self):
|
|
78
78
|
ins = ErrorMsgMixin()
|
|
79
79
|
assert ins
|
|
80
|
-
assert ins.
|
|
80
|
+
assert ins.main_app is None # in test env is no console/gui app available
|
|
81
81
|
assert ins.po is ins.dpo is ins.vpo is print
|
|
82
82
|
|
|
83
83
|
with patch('ae.core.main_app_instance', lambda: None):
|
|
84
84
|
ins = ErrorMsgMixin()
|
|
85
85
|
assert ins
|
|
86
|
-
assert ins.
|
|
86
|
+
assert ins.main_app is None
|
|
87
87
|
assert ins.po is ins.dpo is ins.vpo is print
|
|
88
88
|
|
|
89
89
|
class _AppMock(ErrorMsgMixin):
|
|
90
|
-
|
|
90
|
+
main_app = None
|
|
91
91
|
|
|
92
92
|
@staticmethod
|
|
93
93
|
def po():
|
|
@@ -108,7 +108,7 @@ class TestErrorMsgMixin:
|
|
|
108
108
|
|
|
109
109
|
with patch('ae.core.main_app_instance', lambda: app_ins):
|
|
110
110
|
ins = ErrorMsgMixin()
|
|
111
|
-
assert ins.
|
|
111
|
+
assert ins.main_app is app_ins
|
|
112
112
|
assert ins.po is not print
|
|
113
113
|
assert ins.po() == "po"
|
|
114
114
|
assert ins.dpo is not print
|
|
@@ -361,6 +361,32 @@ class TestBaseHelpers:
|
|
|
361
361
|
os.environ['NON_ALPHA_NUM_CHARS_69'] = vv
|
|
362
362
|
assert env_str(ev, convert_name=True) == vv
|
|
363
363
|
|
|
364
|
+
def test_evaluate_literal(self):
|
|
365
|
+
tst_str = "unquoted string"
|
|
366
|
+
|
|
367
|
+
assert evaluate_literal(tst_str) == tst_str # actually: evaluate_literal(tst_str) is tst_str
|
|
368
|
+
|
|
369
|
+
assert evaluate_literal("'" + tst_str + "'") == tst_str
|
|
370
|
+
|
|
371
|
+
tst_dict = dict(a=1, b=[dict(b3=3), (1, 2, 3), set()])
|
|
372
|
+
|
|
373
|
+
assert evaluate_literal(repr(tst_dict)) == tst_dict
|
|
374
|
+
|
|
375
|
+
def test_evaluate_literal_errors(self):
|
|
376
|
+
assert evaluate_literal("") == ""
|
|
377
|
+
|
|
378
|
+
# noinspection PyTypeChecker
|
|
379
|
+
assert evaluate_literal(None) is None # raising ValueError: malformed node or string: None
|
|
380
|
+
|
|
381
|
+
tst = dict(a=1, b=[dict(b3=3), (1, "22", 333), set()])
|
|
382
|
+
|
|
383
|
+
assert evaluate_literal(" " + repr(tst) + " ") == " " + repr(tst) + " " # raising IndentationError
|
|
384
|
+
|
|
385
|
+
assert evaluate_literal(repr(tst) + " ") == tst # trailing white space chars are ok
|
|
386
|
+
|
|
387
|
+
# noinspection PyTypeChecker
|
|
388
|
+
assert evaluate_literal(tst) is tst
|
|
389
|
+
|
|
364
390
|
def test_force_encoding_bytes(self):
|
|
365
391
|
s = 'äöü'
|
|
366
392
|
|
ae_base-0.3.63/setup.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_project V0.3.36
|
|
2
|
-
""" setup of ae namespace module portion base: basic constants, helper functions and context manager. """
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# noinspection PyUnresolvedReferences
|
|
7
|
-
import setuptools
|
|
8
|
-
|
|
9
|
-
setup_kwargs = {
|
|
10
|
-
'author': 'AndiEcker',
|
|
11
|
-
'author_email': 'aecker2@gmail.com',
|
|
12
|
-
'classifiers': ['Development Status :: 3 - Alpha', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.9', 'Topic :: Software Development :: Libraries :: Python Modules'],
|
|
13
|
-
'description': 'ae namespace module portion base: basic constants, helper functions and context manager',
|
|
14
|
-
'extras_require': {'dev': ['aedev_tpl_project', 'ae_ae', 'anybadge', 'coverage-badge', 'aedev_git_repo_manager', 'flake8', 'mypy', 'pylint', 'pytest', 'pytest-cov', 'pytest-django', 'typing', 'types-setuptools', 'wheel', 'twine'], 'docs': [], 'tests': ['anybadge', 'coverage-badge', 'aedev_git_repo_manager', 'flake8', 'mypy', 'pylint', 'pytest', 'pytest-cov', 'pytest-django', 'typing', 'types-setuptools', 'wheel', 'twine']},
|
|
15
|
-
'install_requires': [],
|
|
16
|
-
'keywords': ['configuration', 'development', 'environment', 'productivity'],
|
|
17
|
-
'license': 'OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
|
|
18
|
-
'long_description': '<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.96 -->\n<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->\n# base 0.3.63\n\n[](\n https://gitlab.com/ae-group/ae_base)\n[](\n https://gitlab.com/ae-group/ae_base/-/tree/release0.3.61)\n[](\n https://pypi.org/project/ae-base/#history)\n\n>ae namespace module portion base: basic constants, helper functions and context manager.\n\n[](\n https://ae-group.gitlab.io/ae_base/coverage/index.html)\n[](\n https://ae-group.gitlab.io/ae_base/lineprecision.txt)\n[](\n https://ae-group.gitlab.io/ae_base/pylint.log)\n\n[](\n https://gitlab.com/ae-group/ae_base/)\n[](\n https://gitlab.com/ae-group/ae_base/)\n[](\n https://gitlab.com/ae-group/ae_base/)\n[](\n https://pypi.org/project/ae-base/)\n[](\n https://gitlab.com/ae-group/ae_base/-/blob/develop/LICENSE.md)\n[](\n https://libraries.io/pypi/ae-base)\n[](\n https://pypi.org/project/ae-base/#files)\n\n\n## installation\n\n\nexecute the following command to install the\nae.base module\nin the currently active virtual environment:\n \n```shell script\npip install ae-base\n```\n\nif you want to contribute to this portion then first fork\n[the ae_base repository at GitLab](\nhttps://gitlab.com/ae-group/ae_base "ae.base code repository").\nafter that pull it to your machine and finally execute the\nfollowing command in the root folder of this repository\n(ae_base):\n\n```shell script\npip install -e .[dev]\n```\n\nthe last command will install this module portion, along with the tools you need\nto develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the\ndocumentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`\nrespectively.\n\nmore detailed explanations on how to contribute to this project\n[are available here](\nhttps://gitlab.com/ae-group/ae_base/-/blob/develop/CONTRIBUTING.rst)\n\n\n## namespace portion documentation\n\ninformation on the features and usage of this portion are available at\n[ReadTheDocs](\nhttps://ae.readthedocs.io/en/latest/_autosummary/ae.base.html\n"ae_base documentation").\n',
|
|
19
|
-
'long_description_content_type': 'text/markdown',
|
|
20
|
-
'name': 'ae_base',
|
|
21
|
-
'package_data': {'': []},
|
|
22
|
-
'packages': ['ae'],
|
|
23
|
-
'project_urls': {'Bug Tracker': 'https://gitlab.com/ae-group/ae_base/-/issues', 'Documentation': 'https://ae.readthedocs.io/en/latest/_autosummary/ae.base.html', 'Repository': 'https://gitlab.com/ae-group/ae_base', 'Source': 'https://ae.readthedocs.io/en/latest/_modules/ae/base.html'},
|
|
24
|
-
'python_requires': '>=3.9',
|
|
25
|
-
'setup_requires': ['aedev_setup_project'],
|
|
26
|
-
'url': 'https://gitlab.com/ae-group/ae_base',
|
|
27
|
-
'version': '0.3.63',
|
|
28
|
-
'zip_safe': True,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if __name__ == "__main__":
|
|
32
|
-
setuptools.setup(**setup_kwargs)
|
|
33
|
-
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|