msdev 0.15.1__tar.gz → 0.15.2__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.
- {msdev-0.15.1 → msdev-0.15.2}/PKG-INFO +2 -1
- {msdev-0.15.1 → msdev-0.15.2}/README.md +1 -0
- {msdev-0.15.1 → msdev-0.15.2}/pyproject.toml +1 -1
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/__init__.py +1 -1
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/cli.py +6 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev.egg-info/PKG-INFO +2 -1
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev.egg-info/SOURCES.txt +1 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_cli.py +10 -0
- msdev-0.15.2/tests/test_version_scenario.py +47 -0
- {msdev-0.15.1 → msdev-0.15.2}/LICENSE +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/setup.cfg +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/__init__.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/compat.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/config.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/config_bundle.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/direct_exec.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/env_exec.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/env_transfer.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/exec_argv.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/guides.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/init_setup.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/inventory.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/limits.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/resources.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/__init__.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/capabilities.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/context.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/environment.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/execution.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/model.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/node.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/npu.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/services/results.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/sftp_transfer.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/skill_install.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/ssh_auth.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/ssh_config.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/core/transport.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev/skills/msdev-cli/SKILL.md +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev.egg-info/dependency_links.txt +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev.egg-info/entry_points.txt +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/src/msdev.egg-info/top_level.txt +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_cli_only_architecture.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_compat.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_config.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_config_bundle.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_connect_env_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_env_exec_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_env_put_get_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_env_read_write_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_env_transfer.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_exec_argv.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_exec_command_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_exec_default_timeout_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_init_skill.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_inventory.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_live_dev122_dev186_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_local_docker_ssh_smoke_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_model_cli.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_model_services.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_msdev_cli_skill.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_bootstrap_version_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_connect_provision_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_connect_save_password_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_env_config.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_env_services.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_node_sync_ssh_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_sftp_transfer_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_ssh_auth.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_ssh_config.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_target_exec_services.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_target_guides.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_transport.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_windows_git_bash_ssh_scenario.py +0 -0
- {msdev-0.15.1 → msdev-0.15.2}/tests/test_windows_local_scenario.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: msdev
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
4
4
|
Summary: Portable nodes and execution environments for msModelSlim development
|
|
5
5
|
Author: msModelSlim Agent Contributors
|
|
6
6
|
License-Expression: MulanPSL-2.0
|
|
@@ -44,6 +44,7 @@ git clone https://gitcode.com/rookie_hongchuan/msdev.git
|
|
|
44
44
|
cd msdev
|
|
45
45
|
python3 -m pip install -e .
|
|
46
46
|
msdev --help
|
|
47
|
+
msdev --version
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
The package installs the `msdev` CLI.
|
|
@@ -594,6 +594,12 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
594
594
|
default=None,
|
|
595
595
|
help="override local node/environment registry path",
|
|
596
596
|
)
|
|
597
|
+
parser.add_argument(
|
|
598
|
+
"--version",
|
|
599
|
+
action="version",
|
|
600
|
+
version=f"%(prog)s {__version__}",
|
|
601
|
+
help="print the msdev version and exit",
|
|
602
|
+
)
|
|
597
603
|
sub = parser.add_subparsers(dest="command", required=True)
|
|
598
604
|
|
|
599
605
|
node = sub.add_parser("node", help="manage SSH connection nodes")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: msdev
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
4
4
|
Summary: Portable nodes and execution environments for msModelSlim development
|
|
5
5
|
Author: msModelSlim Agent Contributors
|
|
6
6
|
License-Expression: MulanPSL-2.0
|
|
@@ -44,6 +44,7 @@ git clone https://gitcode.com/rookie_hongchuan/msdev.git
|
|
|
44
44
|
cd msdev
|
|
45
45
|
python3 -m pip install -e .
|
|
46
46
|
msdev --help
|
|
47
|
+
msdev --version
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
The package installs the `msdev` CLI.
|
|
@@ -20,6 +20,16 @@ from msdev.core.resources import Environment, Node
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class CliParserTest(unittest.TestCase):
|
|
23
|
+
def test_version_flag_prints_package_version(self):
|
|
24
|
+
stdout = io.StringIO()
|
|
25
|
+
with redirect_stdout(stdout), self.assertRaises(SystemExit) as raised:
|
|
26
|
+
build_parser().parse_args(["--version"])
|
|
27
|
+
self.assertEqual(raised.exception.code, 0)
|
|
28
|
+
self.assertEqual(
|
|
29
|
+
stdout.getvalue().strip(),
|
|
30
|
+
f"msdev {cli_module.__version__}",
|
|
31
|
+
)
|
|
32
|
+
|
|
23
33
|
def test_parent_exit_watcher_cancels_cli_process(self):
|
|
24
34
|
stop = threading.Event()
|
|
25
35
|
with (
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Scenario: ``msdev --version`` reports the installed package version."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
import unittest
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from msdev import __version__
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class VersionScenarioTests(unittest.TestCase):
|
|
16
|
+
def setUp(self) -> None:
|
|
17
|
+
self.env = os.environ.copy()
|
|
18
|
+
src = str(Path(__file__).resolve().parents[1] / "src")
|
|
19
|
+
existing = self.env.get("PYTHONPATH", "")
|
|
20
|
+
self.env["PYTHONPATH"] = src if not existing else src + os.pathsep + existing
|
|
21
|
+
|
|
22
|
+
def _run_msdev(self, *args: str) -> subprocess.CompletedProcess[str]:
|
|
23
|
+
return subprocess.run(
|
|
24
|
+
[sys.executable, "-m", "msdev.cli", *args],
|
|
25
|
+
capture_output=True,
|
|
26
|
+
text=True,
|
|
27
|
+
env=self.env,
|
|
28
|
+
timeout=30,
|
|
29
|
+
check=False,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
def test_version_flag_reports_package_version(self) -> None:
|
|
33
|
+
completed = self._run_msdev("--version")
|
|
34
|
+
|
|
35
|
+
self.assertEqual(completed.returncode, 0, completed.stderr)
|
|
36
|
+
self.assertEqual(completed.stdout.strip(), f"msdev {__version__}")
|
|
37
|
+
self.assertEqual(completed.stderr, "")
|
|
38
|
+
|
|
39
|
+
def test_version_flag_does_not_require_a_command_or_config(self) -> None:
|
|
40
|
+
completed = self._run_msdev("--config", "/nonexistent/resources.json", "--version")
|
|
41
|
+
|
|
42
|
+
self.assertEqual(completed.returncode, 0, completed.stderr)
|
|
43
|
+
self.assertEqual(completed.stdout.strip(), f"msdev {__version__}")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|