ae-shell 0.3.14__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.14
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
@@ -62,15 +62,15 @@ Dynamic: requires-dist
62
62
  Dynamic: requires-python
63
63
  Dynamic: summary
64
64
 
65
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.103 -->
66
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
67
- # shell 0.3.14
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
68
68
 
69
69
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/develop?logo=python)](
70
70
  https://gitlab.com/ae-group/ae_shell)
71
71
  [![LatestPyPIrelease](
72
- https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.14?logo=python)](
73
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.14)
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)
74
74
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_shell)](
75
75
  https://pypi.org/project/ae-shell/#history)
76
76
 
@@ -99,8 +99,8 @@ Dynamic: summary
99
99
  https://pypi.org/project/ae-shell/#files)
100
100
 
101
101
 
102
- ## installation
103
102
 
103
+ ## installation
104
104
 
105
105
  execute the following command to install the
106
106
  ae.shell module
@@ -121,10 +121,14 @@ following command in the root folder of this repository
121
121
  pip install --editable .[dev]
122
122
  ```
123
123
 
124
- the last command will install this module portion, along with the tools you need
125
- to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the
126
- documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`
127
- 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
128
132
 
129
133
  more detailed explanations on how to contribute to this project
130
134
  [are available here](
@@ -133,7 +137,9 @@ https://gitlab.com/ae-group/ae_shell/-/blob/develop/CONTRIBUTING.rst)
133
137
 
134
138
  ## namespace portion documentation
135
139
 
136
- 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
137
141
  [ReadTheDocs](
138
142
  https://ae.readthedocs.io/en/latest/_autosummary/ae.shell.html
139
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.14
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.14?logo=python)](
9
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.14)
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,8 +23,9 @@ 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
30
  from ae.base import UNSET, dummy_function, env_str, norm_name # type: ignore
30
31
  from ae.system import load_env_var_defaults # type: ignore
@@ -32,14 +33,14 @@ from ae.core import main_app_instance, AppBase
32
33
  from ae.console import MAIN_SECTION_NAME, ConsoleApp # type: ignore
33
34
 
34
35
 
35
- __version__ = '0.3.14'
36
+ __version__ = '0.3.15'
36
37
 
37
38
 
38
39
  STDERR_BEG_MARKER = "vvv STDERR vvv" #: :paramref:`ae.shell.sh_exec.lines_output` begin stderr lines
39
40
  STDERR_END_MARKER = "^^^ STDERR ^^^" #: end stderr lines in :paramref:`ae.shell.sh_exec.lines_output`
40
41
 
41
42
 
42
- def debug_or_verbose(app_obj: Optional[ConsoleApp] = None) -> bool:
43
+ def debug_or_verbose(app_obj: ConsoleApp | None = None) -> bool:
43
44
  """ determine if the current app runs in debug|verbose mode, while preventing early .get_option() call an app init.
44
45
 
45
46
  :param app_obj: optional ConsoleApp instance (def=main_app_instance()).
@@ -86,7 +87,7 @@ def get_domain_user_var(variable_name: str, domain: str = "", user: str = "") ->
86
87
  return value
87
88
 
88
89
 
89
- def hint(command: str, action: Union[Callable, str], message_suffix: str = "") -> str:
90
+ def hint(command: str, action: Callable | str, message_suffix: str = "") -> str:
90
91
  """ return hint string in debug/verbose mode, to be appended onto a shell/console output.
91
92
 
92
93
  :param command: shell command.
@@ -123,7 +124,7 @@ def mask_token(text: str) -> str: ...
123
124
  def mask_token(text: list[str]) -> list[str]: ...
124
125
 
125
126
 
126
- def mask_token(text: Union[str, list[str]]) -> Union[str, list[str]]:
127
+ def mask_token(text: str | list[str]) -> str | list[str]:
127
128
  """ hide most parts of any Codeberg/GitHub/GitHub URL tokens found in the specified text/-lines.
128
129
 
129
130
  :param text: text, specified either as str object or as a list of str objects (lines),
@@ -153,8 +154,8 @@ def mask_token(text: Union[str, list[str]]) -> Union[str, list[str]]:
153
154
 
154
155
  # pylint: disable-next=too-many-arguments,too-many-positional-arguments
155
156
  def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: str = "",
156
- lines_output: Optional[list[str]] = None, app_obj: Optional[AppBase] = None, shell: bool = False,
157
- 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:
158
159
  """ execute command in the current working directory of the OS console/shell.
159
160
 
160
161
  :param command_line: command line string to execute on the console/shell. could contain command line args
@@ -181,7 +182,7 @@ def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: st
181
182
  debug_out = app_obj.dpo if app_obj else dummy_function if app_obj is UNSET else print
182
183
  debug_out(f" . executing at {os.getcwd()}: {mask_token(args)}")
183
184
 
184
- result: Union[subprocess.CompletedProcess, subprocess.CalledProcessError] # having: stdout/stderr/returncode
185
+ result: subprocess.CompletedProcess | subprocess.CalledProcessError # having: stdout/stderr/returncode
185
186
  try:
186
187
  result = subprocess.run(args,
187
188
  stdout=subprocess.PIPE if ret_out else None,
@@ -211,9 +212,9 @@ def sh_exec(command_line: str, extra_args: Iterable[str] = (), console_input: st
211
212
 
212
213
  # pylint: disable-next=too-many-arguments,too-many-positional-arguments
213
214
  def sh_exit_if_exec_err(err_code: int, command_line: str,
214
- extra_args: Iterable[str] = (), lines_output: Optional[list[str]] = None,
215
- exit_on_err: bool = True, exit_msg: str = "", app_obj: Optional[ConsoleApp] = None,
216
- 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:
217
218
  """ execute command in the current working directory of the OS console/shell, dump error, and exit app if needed.
218
219
 
219
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.14
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
@@ -62,15 +62,15 @@ Dynamic: requires-dist
62
62
  Dynamic: requires-python
63
63
  Dynamic: summary
64
64
 
65
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.103 -->
66
- <!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.22 -->
67
- # shell 0.3.14
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
68
68
 
69
69
  [![GitLab develop](https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/develop?logo=python)](
70
70
  https://gitlab.com/ae-group/ae_shell)
71
71
  [![LatestPyPIrelease](
72
- https://img.shields.io/gitlab/pipeline/ae-group/ae_shell/release0.3.14?logo=python)](
73
- https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.14)
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)
74
74
  [![PyPIVersions](https://img.shields.io/pypi/v/ae_shell)](
75
75
  https://pypi.org/project/ae-shell/#history)
76
76
 
@@ -99,8 +99,8 @@ Dynamic: summary
99
99
  https://pypi.org/project/ae-shell/#files)
100
100
 
101
101
 
102
- ## installation
103
102
 
103
+ ## installation
104
104
 
105
105
  execute the following command to install the
106
106
  ae.shell module
@@ -121,10 +121,14 @@ following command in the root folder of this repository
121
121
  pip install --editable .[dev]
122
122
  ```
123
123
 
124
- the last command will install this module portion, along with the tools you need
125
- to develop and run tests or to extend the portion documentation. to contribute only to the unit tests or to the
126
- documentation of this portion, replace the setup extras key `dev` in the above command with `tests` or `docs`
127
- 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
128
132
 
129
133
  more detailed explanations on how to contribute to this project
130
134
  [are available here](
@@ -133,7 +137,9 @@ https://gitlab.com/ae-group/ae_shell/-/blob/develop/CONTRIBUTING.rst)
133
137
 
134
138
  ## namespace portion documentation
135
139
 
136
- 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
137
141
  [ReadTheDocs](
138
142
  https://ae.readthedocs.io/en/latest/_autosummary/ae.shell.html
139
143
  "ae_shell documentation").
144
+
145
+
@@ -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
@@ -78,7 +78,7 @@ setup_kwargs = {
78
78
  },
79
79
  'python_requires': '>=3.12',
80
80
  'url': 'https://gitlab.com/ae-group/ae_shell',
81
- 'version': '0.3.14',
81
+ 'version': '0.3.15',
82
82
  'zip_safe': True,
83
83
  }
84
84
 
File without changes
File without changes