ae-shell 0.3.13__tar.gz → 0.3.15__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.
@@ -1,4 +1,4 @@
1
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.77 -->
1
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.79 -->
2
2
  ### GNU GENERAL PUBLIC LICENSE
3
3
 
4
4
  Version 3, 29 June 2007
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ae_shell
3
- Version: 0.3.13
3
+ Version: 0.3.15
4
4
  Summary: ae namespace module portion shell: shell execution and environment helpers
5
5
  Home-page: https://gitlab.com/ae-group/ae_shell
6
6
  Author: AndiEcker
@@ -23,6 +23,7 @@ Requires-Python: >=3.12
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.md
25
25
  Requires-Dist: ae_base
26
+ Requires-Dist: ae_system
26
27
  Requires-Dist: ae_core
27
28
  Requires-Dist: ae_console
28
29
  Provides-Extra: dev
@@ -61,15 +62,15 @@ Dynamic: requires-dist
61
62
  Dynamic: requires-python
62
63
  Dynamic: summary
63
64
 
64
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.103 -->
65
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
66
- # shell 0.3.13
65
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.104 -->
66
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.31 -->
67
+ # shell 0.3.15
67
68
 
68
69
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/develop?logo=python)](
69
70
  https://gitlab.com/ae-group/ae_shell)
70
71
  [![LatestPyPIrelease](
71
- https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.13?logo=python)](
72
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.13)
72
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.15?logo=python)](
73
+ https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.15)
73
74
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_shell)](
74
75
  https://pypi.org/project/ae-shell/#history)
75
76
 
@@ -98,8 +99,8 @@ Dynamic: summary
98
99
  https://pypi.org/project/ae-shell/#files)
99
100
 
100
101
 
101
- ## installation
102
102
 
103
+ ## installation
103
104
 
104
105
  execute the following command to install the
105
106
  ae.shell module
@@ -120,10 +121,14 @@ following command in the root folder of this repository
120
121
  pip install --editable .[dev]
121
122
  ```
122
123
 
123
- the last command will install this module portion, along with the tools you need
124
- to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the
125
- documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`
126
- respectively.
124
+ this command installs this module portion project
125
+ along with the necessary tools to modify the source code,
126
+ run unit tests, and build documentation. to install only
127
+ the dependencies required for a specific task, replace
128
+ `dev` with one of the following:
129
+
130
+ * `tests`: for contributing to the unit test suite
131
+ * `docs`: for maintaining and building documentation
127
132
 
128
133
  more detailed explanations on how to contribute to this project
129
134
  [are available here](
@@ -132,7 +137,9 @@ https://gitlab.com/ae-group/ae_shell/-/blob/develop/CONTRIBUTING.rst)
132
137
 
133
138
  ## namespace portion documentation
134
139
 
135
- information on the features and usage of this portion are available at
140
+ the documentation of the source code of this portion is available at
136
141
  [ReadTheDocs](
137
142
  https://ae.readthedocs.io/en/latest/_autosummary/ae.shell.html
138
143
  "ae_shell documentation").
144
+
145
+
@@ -1,12 +1,12 @@
1
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.103 -->
2
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
3
- # shell 0.3.13
1
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.104 -->
2
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.31 -->
3
+ # shell 0.3.15
4
4
 
5
5
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/develop?logo=python)](
6
6
  https://gitlab.com/ae-group/ae_shell)
7
7
  [![LatestPyPIrelease](
8
- https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.13?logo=python)](
9
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.13)
8
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.15?logo=python)](
9
+ https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.15)
10
10
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_shell)](
11
11
  https://pypi.org/project/ae-shell/#history)
12
12
 
@@ -35,8 +35,8 @@
35
35
  https://pypi.org/project/ae-shell/#files)
36
36
 
37
37
 
38
- ## installation
39
38
 
39
+ ## installation
40
40
 
41
41
  execute the following command to install the
42
42
  ae.shell module
@@ -57,10 +57,14 @@ following command in the root folder of this repository
57
57
  pip install --editable .[dev]
58
58
  ```
59
59
 
60
- the last command will install this module portion, along with the tools you need
61
- to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the
62
- documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`
63
- respectively.
60
+ this command installs this module portion project
61
+ along with the necessary tools to modify the source code,
62
+ run unit tests, and build documentation. to install only
63
+ the dependencies required for a specific task, replace
64
+ `dev` with one of the following:
65
+
66
+ * `tests`: for contributing to the unit test suite
67
+ * `docs`: for maintaining and building documentation
64
68
 
65
69
  more detailed explanations on how to contribute to this project
66
70
  [are available here](
@@ -69,7 +73,9 @@ https://gitlab.com/ae-group/ae_shell/-/blob/develop/CONTRIBUTING.rst)
69
73
 
70
74
  ## namespace portion documentation
71
75
 
72
- information on the features and usage of this portion are available at
76
+ the documentation of the source code of this portion is available at
73
77
  [ReadTheDocs](
74
78
  https://ae.readthedocs.io/en/latest/_autosummary/ae.shell.html
75
79
  "ae_shell documentation").
80
+
81
+
@@ -23,22 +23,24 @@ import os
23
23
  import shlex
24
24
  import subprocess
25
25
 
26
+ from collections.abc import Callable, Iterable, Iterator, MutableMapping
26
27
  from contextlib import contextmanager
27
- from typing import Any, Callable, Iterable, Iterator, MutableMapping, Optional, Union, cast, overload
28
+ from typing import Any, cast, overload
28
29
 
29
- from ae.base import UNSET, dummy_function, env_str, load_env_var_defaults, norm_name # type: ignore
30
+ from ae.base import UNSET, dummy_function, env_str, norm_name # type: ignore
31
+ from ae.system import load_env_var_defaults # type: ignore
30
32
  from ae.core import main_app_instance, AppBase # type: ignore
31
33
  from ae.console import MAIN_SECTION_NAME, ConsoleApp # type: ignore
32
34
 
33
35
 
34
- __version__ = '0.3.13'
36
+ __version__ = '0.3.15'
35
37
 
36
38
 
37
39
  STDERR_BEG_MARKER = "vvv STDERR vvv" #: :paramref:`ae.shell.sh_exec.lines_output` begin stderr lines
38
40
  STDERR_END_MARKER = "^^^ STDERR ^^^" #: end stderr lines in :paramref:`ae.shell.sh_exec.lines_output`
39
41
 
40
42
 
41
- def debug_or_verbose(app_obj: Optional[ConsoleApp] = None) -> bool:
43
+ def debug_or_verbose(app_obj: ConsoleApp | None = None) -> bool:
42
44
  """ determine if the current app runs in debug|verbose mode, while preventing early .get_option() call an app init.
43
45
 
44
46
  :param app_obj: optional ConsoleApp instance (def=main_app_instance()).
@@ -85,7 +87,7 @@ def get_domain_user_var(variable_name: str, domain: str = "", user: str = "") ->
85
87
  return value
86
88
 
87
89
 
88
- def hint(command: str, action: Union[Callable, str], message_suffix: str = "") -> str:
90
+ def hint(command: str, action: Callable | str, message_suffix: str = "") -> str:
89
91
  """ return hint string in debug/verbose mode, to be appended onto a shell/console output.
90
92
 
91
93
  :param command: shell command.
@@ -122,7 +124,7 @@ def mask_token(text: str) -> str: ...
122
124
  def mask_token(text: list[str]) -> list[str]: ...
123
125
 
124
126
 
125
- def mask_token(text: Union[str, list[str]]) -> Union[str, list[str]]:
127
+ def mask_token(text: str | list[str]) -> str | list[str]:
126
128
  """ hide most parts of any Codeberg/GitHub/GitHub URL tokens found in the specified text/-lines.
127
129
 
128
130
  :param text: text, specified either as str object or as a list of str objects (lines),
@@ -152,8 +154,8 @@ def mask_token(text: Union[str, list[str]]) -> Union[str, list[str]]:
152
154
 
153
155
  # pylint: disable-next=too-many-arguments,too-many-positional-arguments
154
156
  def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: str = "",
155
- lines_output: Optional[list[str]] = None, app_obj: Optional[AppBase] = None, shell: bool = False,
156
- env_vars: Optional[dict[str, str]] = None) -> int:
157
+ lines_output: list[str] | None = None, app_obj: AppBase | None = None, shell: bool = False,
158
+ env_vars: dict[str, str] | None = None) -> int:
157
159
  """ execute command in the current working directory of the OS console/shell.
158
160
 
159
161
  :param command_line: command line string to execute on the console/shell. could contain command line args
@@ -180,7 +182,7 @@ def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: st
180
182
  debug_out = app_obj.dpo if app_obj else dummy_function if app_obj is UNSET else print
181
183
  debug_out(f" . executing at {os.getcwd()}: {mask_token(args)}")
182
184
 
183
- result: Union[subprocess.CompletedProcess, subprocess.CalledProcessError] # having: stdout/stderr/returncode
185
+ result: subprocess.CompletedProcess | subprocess.CalledProcessError # having: stdout/stderr/returncode
184
186
  try:
185
187
  result = subprocess.run(args,
186
188
  stdout=subprocess.PIPE if ret_out else None,
@@ -210,9 +212,9 @@ def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: st
210
212
 
211
213
  # pylint: disable-next=too-many-arguments,too-many-positional-arguments
212
214
  def sh_exit_if_exec_err(err_code: int, command_line: str,
213
- extra_args: Iterable[str] = (), lines_output: Optional[list[str]] = None,
214
- exit_on_err: bool = True, exit_msg: str = "", app_obj: Optional[ConsoleApp] = None,
215
- shell: bool = False, env_vars: Optional[dict[str, str]] = None) -> int:
215
+ extra_args: Iterable[str] = (), lines_output: list[str] | None = None,
216
+ exit_on_err: bool = True, exit_msg: str = "", app_obj: ConsoleApp | None = None,
217
+ shell: bool = False, env_vars: dict[str, str] | None = None) -> int:
216
218
  """ execute command in the current working directory of the OS console/shell, dump error, and exit app if needed.
217
219
 
218
220
  :param err_code: error code to pass to the console as exit code if :paramref:`.exit_on_err` is True.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ae_shell
3
- Version: 0.3.13
3
+ Version: 0.3.15
4
4
  Summary: ae namespace module portion shell: shell execution and environment helpers
5
5
  Home-page: https://gitlab.com/ae-group/ae_shell
6
6
  Author: AndiEcker
@@ -23,6 +23,7 @@ Requires-Python: >=3.12
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.md
25
25
  Requires-Dist: ae_base
26
+ Requires-Dist: ae_system
26
27
  Requires-Dist: ae_core
27
28
  Requires-Dist: ae_console
28
29
  Provides-Extra: dev
@@ -61,15 +62,15 @@ Dynamic: requires-dist
61
62
  Dynamic: requires-python
62
63
  Dynamic: summary
63
64
 
64
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.103 -->
65
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
66
- # shell 0.3.13
65
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.104 -->
66
+ <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.31 -->
67
+ # shell 0.3.15
67
68
 
68
69
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/develop?logo=python)](
69
70
  https://gitlab.com/ae-group/ae_shell)
70
71
  [![LatestPyPIrelease](
71
- https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.13?logo=python)](
72
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.13)
72
+ https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.15?logo=python)](
73
+ https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.15)
73
74
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_shell)](
74
75
  https://pypi.org/project/ae-shell/#history)
75
76
 
@@ -98,8 +99,8 @@ Dynamic: summary
98
99
  https://pypi.org/project/ae-shell/#files)
99
100
 
100
101
 
101
- ## installation
102
102
 
103
+ ## installation
103
104
 
104
105
  execute the following command to install the
105
106
  ae.shell module
@@ -120,10 +121,14 @@ following command in the root folder of this repository
120
121
  pip install --editable .[dev]
121
122
  ```
122
123
 
123
- the last command will install this module portion, along with the tools you need
124
- to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the
125
- documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`
126
- respectively.
124
+ this command installs this module portion project
125
+ along with the necessary tools to modify the source code,
126
+ run unit tests, and build documentation. to install only
127
+ the dependencies required for a specific task, replace
128
+ `dev` with one of the following:
129
+
130
+ * `tests`: for contributing to the unit test suite
131
+ * `docs`: for maintaining and building documentation
127
132
 
128
133
  more detailed explanations on how to contribute to this project
129
134
  [are available here](
@@ -132,7 +137,9 @@ https://gitlab.com/ae-group/ae_shell/-/blob/develop/CONTRIBUTING.rst)
132
137
 
133
138
  ## namespace portion documentation
134
139
 
135
- information on the features and usage of this portion are available at
140
+ the documentation of the source code of this portion is available at
136
141
  [ReadTheDocs](
137
142
  https://ae.readthedocs.io/en/latest/_autosummary/ae.shell.html
138
143
  "ae_shell documentation").
144
+
145
+
@@ -1,4 +1,5 @@
1
1
  ae_base
2
+ ae_system
2
3
  ae_core
3
4
  ae_console
4
5
 
@@ -1,4 +1,4 @@
1
- # THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.77
1
+ # THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.79
2
2
  [build-system]
3
3
  requires = ["setuptools>=42", "wheel"]
4
4
  build-backend = "setuptools.build_meta"
@@ -1,4 +1,4 @@
1
- # THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.77
1
+ # THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.project_tpls v0.3.79
2
2
  """ setup of ae namespace module portion shell: shell execution and environment helpers. """
3
3
  import sys
4
4
  # noinspection PyUnresolvedReferences
@@ -50,6 +50,7 @@ setup_kwargs = {
50
50
  },
51
51
  'install_requires': [
52
52
  'ae_base',
53
+ 'ae_system',
53
54
  'ae_core',
54
55
  'ae_console',
55
56
  ],
@@ -77,7 +78,7 @@ setup_kwargs = {
77
78
  },
78
79
  'python_requires': '>=3.12',
79
80
  'url': 'https://gitlab.com/ae-group/ae_shell',
80
- 'version': '0.3.13',
81
+ 'version': '0.3.15',
81
82
  'zip_safe': True,
82
83
  }
83
84
 
File without changes
File without changes