ae-shell 0.3.4__tar.gz → 0.3.5__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_shell-0.3.4 → ae_shell-0.3.5}/LICENSE.md +1 -1
- {ae_shell-0.3.4/ae_shell.egg-info → ae_shell-0.3.5}/PKG-INFO +6 -6
- {ae_shell-0.3.4 → ae_shell-0.3.5}/README.md +5 -5
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae/shell.py +1 -9
- {ae_shell-0.3.4 → ae_shell-0.3.5/ae_shell.egg-info}/PKG-INFO +6 -6
- {ae_shell-0.3.4 → ae_shell-0.3.5}/pyproject.toml +1 -1
- {ae_shell-0.3.4 → ae_shell-0.3.5}/setup.py +7 -7
- {ae_shell-0.3.4 → ae_shell-0.3.5}/tests/test_shell.py +23 -89
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae_shell.egg-info/SOURCES.txt +0 -0
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae_shell.egg-info/dependency_links.txt +0 -0
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae_shell.egg-info/requires.txt +0 -0
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae_shell.egg-info/top_level.txt +0 -0
- {ae_shell-0.3.4 → ae_shell-0.3.5}/ae_shell.egg-info/zip-safe +0 -0
- {ae_shell-0.3.4 → ae_shell-0.3.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_shell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
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
|
|
@@ -63,15 +63,15 @@ Dynamic: provides-extra
|
|
|
63
63
|
Dynamic: requires-python
|
|
64
64
|
Dynamic: summary
|
|
65
65
|
|
|
66
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
67
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
68
|
-
# shell 0.3.
|
|
66
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.100 -->
|
|
67
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.21 -->
|
|
68
|
+
# shell 0.3.5
|
|
69
69
|
|
|
70
70
|
[](
|
|
71
71
|
https://gitlab.com/ae-group/ae_shell)
|
|
72
72
|
[](
|
|
74
|
+
https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.5)
|
|
75
75
|
[](
|
|
76
76
|
https://pypi.org/project/ae-shell/#history)
|
|
77
77
|
|
|
@@ -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
|
-
# shell 0.3.
|
|
1
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.100 -->
|
|
2
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.21 -->
|
|
3
|
+
# shell 0.3.5
|
|
4
4
|
|
|
5
5
|
[](
|
|
6
6
|
https://gitlab.com/ae-group/ae_shell)
|
|
7
7
|
[](
|
|
9
|
+
https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.5)
|
|
10
10
|
[](
|
|
11
11
|
https://pypi.org/project/ae-shell/#history)
|
|
12
12
|
|
|
@@ -204,7 +204,7 @@ from ae.core import main_app_instance
|
|
|
204
204
|
from ae.console import MAIN_SECTION_NAME, ConsoleApp # type: ignore
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
__version__ = '0.3.
|
|
207
|
+
__version__ = '0.3.5'
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
COMMIT_MSG_FILE_NAME = '.commit_msg.txt' #: name of the file containing the commit message
|
|
@@ -1033,14 +1033,6 @@ def in_venv(name: str = "") -> Iterator[None]:
|
|
|
1033
1033
|
activate_venv(old_venv)
|
|
1034
1034
|
|
|
1035
1035
|
|
|
1036
|
-
def on_ci_host() -> bool:
|
|
1037
|
-
""" check and return True if this tool is running on the GitLab/GitHub CI host/server.
|
|
1038
|
-
|
|
1039
|
-
:return: True if running on CI host, else False
|
|
1040
|
-
"""
|
|
1041
|
-
return 'CI' in os.environ or 'CI_PROJECT_ID' in os.environ
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
1036
|
def owner_project_from_url(remote_url: str) -> str:
|
|
1045
1037
|
""" determine the owner and project name path from the specified git remote repository url.
|
|
1046
1038
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_shell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
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
|
|
@@ -63,15 +63,15 @@ Dynamic: provides-extra
|
|
|
63
63
|
Dynamic: requires-python
|
|
64
64
|
Dynamic: summary
|
|
65
65
|
|
|
66
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
67
|
-
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
68
|
-
# shell 0.3.
|
|
66
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.100 -->
|
|
67
|
+
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.21 -->
|
|
68
|
+
# shell 0.3.5
|
|
69
69
|
|
|
70
70
|
[](
|
|
71
71
|
https://gitlab.com/ae-group/ae_shell)
|
|
72
72
|
[](
|
|
74
|
+
https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.5)
|
|
75
75
|
[](
|
|
76
76
|
https://pypi.org/project/ae-shell/#history)
|
|
77
77
|
|
|
@@ -1,4 +1,4 @@
|
|
|
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.58
|
|
2
2
|
""" setup of ae namespace module portion shell: shell execution and environment helpers. """
|
|
3
3
|
# noinspection PyUnresolvedReferences
|
|
4
4
|
import sys
|
|
@@ -23,15 +23,15 @@ setup_kwargs = {
|
|
|
23
23
|
'install_requires': [],
|
|
24
24
|
'keywords': ['configuration', 'development', 'environment', 'productivity'],
|
|
25
25
|
'license': 'GPL-3.0-or-later',
|
|
26
|
-
'long_description': ('<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.
|
|
27
|
-
'<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.
|
|
28
|
-
'# shell 0.3.
|
|
26
|
+
'long_description': ('<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae v0.3.100 -->\n'
|
|
27
|
+
'<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.namespace_root_tpls v0.3.21 -->\n'
|
|
28
|
+
'# shell 0.3.5\n'
|
|
29
29
|
'\n'
|
|
30
30
|
'[](\n'
|
|
31
31
|
' https://gitlab.com/ae-group/ae_shell)\n'
|
|
32
32
|
'[](\n'
|
|
34
|
+
' https://gitlab.com/ae-group/ae_shell/-/tree/release0.3.5)\n'
|
|
35
35
|
'[](\n'
|
|
36
36
|
' https://pypi.org/project/ae-shell/#history)\n'
|
|
37
37
|
'\n'
|
|
@@ -108,7 +108,7 @@ setup_kwargs = {
|
|
|
108
108
|
'Source': 'https://ae.readthedocs.io/en/latest/_modules/ae/shell.html'},
|
|
109
109
|
'python_requires': '>=3.9',
|
|
110
110
|
'url': 'https://gitlab.com/ae-group/ae_shell',
|
|
111
|
-
'version': '0.3.
|
|
111
|
+
'version': '0.3.5',
|
|
112
112
|
'zip_safe': True,
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -18,7 +18,7 @@ from tests.conftest import skip_gitlab_ci
|
|
|
18
18
|
|
|
19
19
|
from ae.base import (
|
|
20
20
|
DEF_PROJECT_PARENT_FOLDER, PY_CACHE_FOLDER,
|
|
21
|
-
camel_to_snake, in_wd, load_dotenvs, load_env_var_defaults, norm_name, norm_path,
|
|
21
|
+
camel_to_snake, in_wd, load_dotenvs, load_env_var_defaults, norm_name, norm_path, on_ci_host,
|
|
22
22
|
os_path_basename, os_path_dirname, os_path_isdir, os_path_isfile, os_path_join, os_path_relpath,
|
|
23
23
|
project_main_file, read_file, write_file, UNSET)
|
|
24
24
|
from ae.core import DEBUG_LEVEL_DISABLED, DEBUG_LEVEL_ENABLED, DEBUG_LEVEL_VERBOSE
|
|
@@ -39,7 +39,7 @@ from ae.shell import (
|
|
|
39
39
|
git_current_branch, git_diff, git_fetch, git_init_if_needed, git_merge, git_push,
|
|
40
40
|
git_remote_domain_group, git_remotes, git_renew_remotes, git_status,
|
|
41
41
|
git_tag_add, git_ref_in_branch, git_tag_list, git_tag_remotes, git_uncommitted,
|
|
42
|
-
hint, in_os_env, in_prj_dir_venv, in_venv,
|
|
42
|
+
hint, in_os_env, in_prj_dir_venv, in_venv, owner_project_from_url, project_name_version,
|
|
43
43
|
sh_exec, sh_exit_if_exec_err, sh_exit_if_git_err, sh_log, sh_logs,
|
|
44
44
|
temp_context_cleanup, temp_context_folders, temp_context_get_or_create, _temp_folders, venv_bin_path,
|
|
45
45
|
MockedMainApp)
|
|
@@ -465,90 +465,45 @@ class TestGitCommands:
|
|
|
465
465
|
|
|
466
466
|
@skip_gitlab_ci
|
|
467
467
|
def test_git_branch_files_between_versions(self):
|
|
468
|
-
prj_path = norm_path("../
|
|
469
|
-
exp = last_exp = {
|
|
470
|
-
'README.md',
|
|
471
|
-
'aedev/git_repo_manager.py',
|
|
472
|
-
'tests/test_git_repo_manager.py',
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.59..v0.3.60") == exp
|
|
476
|
-
|
|
477
|
-
extra_61 = {'requirements.txt'}
|
|
478
|
-
exp = extra_61 | {
|
|
479
|
-
'README.md',
|
|
480
|
-
'aedev/git_repo_manager.py',
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.60..v0.3.61") == exp
|
|
484
|
-
|
|
485
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.59..v0.3.61") == exp | last_exp
|
|
486
|
-
|
|
468
|
+
prj_path = norm_path("../ae_base")
|
|
487
469
|
exp = {
|
|
488
470
|
'README.md',
|
|
489
|
-
'
|
|
490
|
-
'
|
|
491
|
-
'tests/
|
|
471
|
+
'ae/base.py',
|
|
472
|
+
'setup.py',
|
|
473
|
+
'tests/test_base.py',
|
|
492
474
|
}
|
|
493
475
|
|
|
494
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.
|
|
476
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.69..v0.3.70") == exp
|
|
477
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.70..v0.3.71") == exp
|
|
478
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.71..v0.3.72") == exp
|
|
479
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.69..v0.3.72") == exp
|
|
480
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.69..v0.3.71") == exp
|
|
481
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.70..v0.3.72") == exp
|
|
495
482
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
most = git_branch_files(prj_path, branch_or_tag="v0.3.65...v0.3.66", untracked=True,
|
|
499
|
-
skip_file_path=lambda _:
|
|
500
|
-
PY_CACHE_FOLDER in _
|
|
501
|
-
or _.startswith(".idea")
|
|
502
|
-
or _.startswith(".mypy_cache")
|
|
503
|
-
or _.startswith(".pylint")
|
|
504
|
-
or _.startswith(".pytest_cache")
|
|
505
|
-
or _.startswith("htmlcov")
|
|
506
|
-
or _.startswith("mypy_report")
|
|
507
|
-
or _.startswith("aedev_git_repo_manager.egg-info")
|
|
508
|
-
)
|
|
509
|
-
assert all(_ in most for _ in exp)
|
|
510
|
-
|
|
511
|
-
exp = big_exp = {
|
|
483
|
+
exp = {
|
|
512
484
|
'.gitignore',
|
|
513
485
|
'.gitlab-ci.yml',
|
|
514
486
|
'CONTRIBUTING.rst',
|
|
515
487
|
'LICENSE.md',
|
|
516
488
|
'README.md',
|
|
517
489
|
'SECURITY.md',
|
|
518
|
-
'
|
|
519
|
-
'aedev/git_repo_manager/__main__.py',
|
|
490
|
+
'ae/base.py',
|
|
520
491
|
'dev_requirements.txt',
|
|
521
492
|
'setup.py',
|
|
522
493
|
'tests/conftest.py',
|
|
523
494
|
'tests/requirements.txt',
|
|
495
|
+
'tests/test_base.py',
|
|
524
496
|
}
|
|
525
497
|
|
|
526
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.
|
|
527
|
-
|
|
528
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.66
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.61...v0.3.62") == exp | extra_62 # pkg __init__/__main__
|
|
533
|
-
|
|
534
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.62...v0.3.63") == exp # changed in v0.3.63
|
|
535
|
-
|
|
536
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.66...v0.3.69") == exp # 3 versions
|
|
537
|
-
|
|
538
|
-
exp = {
|
|
539
|
-
'README.md',
|
|
540
|
-
'aedev/git_repo_manager/__init__.py',
|
|
541
|
-
'aedev/git_repo_manager/__main__.py',
|
|
542
|
-
}
|
|
543
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.67..v0.3.68") == exp
|
|
544
|
-
|
|
545
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.67..v0.3.68") == exp
|
|
546
|
-
|
|
547
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.68..v0.3.69") == exp
|
|
548
|
-
|
|
549
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.68...v0.3.69") == exp
|
|
498
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.64..v0.3.65") == exp
|
|
499
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.65..v0.3.66") == exp
|
|
500
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.66..v0.3.67") == exp | {'pyproject.toml'}
|
|
501
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.67..v0.3.68") == exp | {'pyproject.toml'}
|
|
502
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.68..v0.3.69") == (
|
|
503
|
+
exp | {'pyproject.toml'}) - {'tests/test_base.py'}
|
|
550
504
|
|
|
551
|
-
assert git_branch_files(prj_path, branch_or_tag="v0.3.
|
|
505
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.64..v0.3.69") == exp | {'pyproject.toml'}
|
|
506
|
+
assert git_branch_files(prj_path, branch_or_tag="v0.3.64..v0.3.72") == exp | {'pyproject.toml'}
|
|
552
507
|
|
|
553
508
|
def test_git_branch_files_excludes(self, changed_repo_path):
|
|
554
509
|
assert git_branch_files(changed_repo_path) == {'ChangeD.y', 'deleteD.x', 'rename.it'}
|
|
@@ -1497,27 +1452,6 @@ class TestHelpers:
|
|
|
1497
1452
|
assert not hint("hint command", _hint_tst_callable, "extra message")
|
|
1498
1453
|
assert not hint("hint command", _hint_tst_callable.__name__, "extra message")
|
|
1499
1454
|
|
|
1500
|
-
@skip_gitlab_ci
|
|
1501
|
-
def test_on_ci_host_local(self):
|
|
1502
|
-
assert not on_ci_host()
|
|
1503
|
-
|
|
1504
|
-
def test_on_ci_host_on_gitlab(self):
|
|
1505
|
-
assert on_ci_host() == ('CI_PROJECT_ID' in os.environ)
|
|
1506
|
-
|
|
1507
|
-
@skip_gitlab_ci
|
|
1508
|
-
def test_on_ci_host_with_ci_var(self, monkeypatch):
|
|
1509
|
-
assert not on_ci_host()
|
|
1510
|
-
|
|
1511
|
-
monkeypatch.setenv('CI', "any value")
|
|
1512
|
-
assert on_ci_host()
|
|
1513
|
-
|
|
1514
|
-
@skip_gitlab_ci
|
|
1515
|
-
def test_on_ci_host_with_ci_project_id(self, monkeypatch):
|
|
1516
|
-
assert not on_ci_host()
|
|
1517
|
-
|
|
1518
|
-
monkeypatch.setenv('CI_PROJECT_ID', "any value")
|
|
1519
|
-
assert on_ci_host()
|
|
1520
|
-
|
|
1521
1455
|
def test_owner_project_from_url(self):
|
|
1522
1456
|
assert owner_project_from_url("owner/project") == "owner/project"
|
|
1523
1457
|
assert owner_project_from_url("owner/project.git") == "owner/project"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|