cli-tools-kit 1.1.0__tar.gz → 1.1.1__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.
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/PKG-INFO +1 -1
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/__init__.py +1 -1
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/upgrade.py +13 -2
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/PKG-INFO +1 -1
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_upgrade.py +28 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/LICENSE +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/README.md +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/__main__.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/advertise.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/autostart.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/autostart_gate.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/cli.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/cron_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/discovery.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/gui_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/host.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/icons.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/identity.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/install.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/onboarding.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/settings.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/skills.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/sources.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/state.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/sweep.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/__init__.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/build.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/capability.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/cluster.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/corpus.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/embedder.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/groups.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/taxonomy/llm_groups.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/testing.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/tool_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit/tui_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/SOURCES.txt +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/dependency_links.txt +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/entry_points.txt +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/requires.txt +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/cli_tools_kit.egg-info/top_level.txt +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/pyproject.toml +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/setup.cfg +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_autostart_gate.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_capability_groups.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_cron_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_e2e.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_engine.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_gui_smoke.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_hooks.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_host.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_identity.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_llm_groups.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_public_api.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_skills.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_sources.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_taxonomy_cluster.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_testing.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_tool_installer.py +0 -0
- {cli_tools_kit-1.1.0 → cli_tools_kit-1.1.1}/tests/test_tui_installer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cli-tools-kit
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Installer protocol + helpers for self-installing Python CLI/GUI tools (desktop shortcuts, bash aliases, cron entries), plus reusable tkinter and curses installer screens
|
|
5
5
|
Author: Steffen Probst
|
|
6
6
|
License: MIT License
|
|
@@ -246,7 +246,8 @@ def upgrade(items: Sequence[Item], tools: Sequence[discovery.ToolEntry],
|
|
|
246
246
|
(through ``install.install_tool``, so a wrapper's hooks apply), because its
|
|
247
247
|
code and its requirements may have changed. The kit is upgraded when it is
|
|
248
248
|
in ``items`` or the installer's own checkout was pulled, since that can
|
|
249
|
-
change the installer's pin.
|
|
249
|
+
change the installer's pin. It is never replaced by an older version, even
|
|
250
|
+
when the pulled installer still pins one.
|
|
250
251
|
|
|
251
252
|
Returns ``{"changed": bool, "errors": int}``. ``changed`` means the running
|
|
252
253
|
installer is out of date and should restart.
|
|
@@ -269,10 +270,20 @@ def upgrade(items: Sequence[Item], tools: Sequence[discovery.ToolEntry],
|
|
|
269
270
|
installer_pulled = any(i.kind == "installer" and i.path in pulled for i in items)
|
|
270
271
|
if any(i.kind == "kit" for i in items) or installer_pulled:
|
|
271
272
|
blocker = kit_blocker()
|
|
273
|
+
# Ask again after the pull: an installer that still pins an older kit
|
|
274
|
+
# exactly would otherwise make pip downgrade the one running now.
|
|
275
|
+
latest = None if blocker else latest_kit()
|
|
276
|
+
current = kit_version()
|
|
272
277
|
if blocker:
|
|
273
278
|
log(f"cli-tools-kit left as it is: {blocker}", "info")
|
|
279
|
+
elif latest is None:
|
|
280
|
+
errors += 1
|
|
281
|
+
log(" ✗ pip could not say which cli-tools-kit the installer asks for", "error")
|
|
282
|
+
elif _version_key(latest) <= _version_key(current):
|
|
283
|
+
log(f"cli-tools-kit stays at {current}: nothing newer within the "
|
|
284
|
+
"installer's pin", "info")
|
|
274
285
|
else:
|
|
275
|
-
log("Upgrading cli-tools-kit", "header")
|
|
286
|
+
log(f"Upgrading cli-tools-kit {current} → {latest}", "header")
|
|
276
287
|
cmd = [sys.executable, "-m", "pip", "install", "--upgrade",
|
|
277
288
|
"--disable-pip-version-check", *kit_requirement()]
|
|
278
289
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cli-tools-kit
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Installer protocol + helpers for self-installing Python CLI/GUI tools (desktop shortcuts, bash aliases, cron entries), plus reusable tkinter and curses installer screens
|
|
5
5
|
Author: Steffen Probst
|
|
6
6
|
License: MIT License
|
|
@@ -119,6 +119,34 @@ def test_the_installer_checkout_is_checked_and_its_tools_reinstalled(
|
|
|
119
119
|
assert any("cli-tools-kit left as it is: not under test" in line for line in lines)
|
|
120
120
|
|
|
121
121
|
|
|
122
|
+
@pytest.mark.parametrize("pinned, pip_runs", [("0.7.1", False), (None, False), ("99.0.0", True)])
|
|
123
|
+
def test_a_pulled_installer_never_downgrades_the_kit(
|
|
124
|
+
remote, monkeypatch: pytest.MonkeyPatch, pinned, pip_runs) -> None:
|
|
125
|
+
clone, push = remote
|
|
126
|
+
state.ENTRY_SCRIPT = str(clone / "installer.py")
|
|
127
|
+
push()
|
|
128
|
+
items = upgrade.check(force=True)
|
|
129
|
+
# pinned None: the installer's pin matches the running kit exactly.
|
|
130
|
+
monkeypatch.setattr(upgrade, "kit_blocker", lambda: None)
|
|
131
|
+
monkeypatch.setattr(upgrade, "latest_kit", lambda: pinned or upgrade.kit_version())
|
|
132
|
+
pip_calls = []
|
|
133
|
+
real_run = upgrade.subprocess.run
|
|
134
|
+
|
|
135
|
+
def run(cmd, **kwargs):
|
|
136
|
+
if "pip" in cmd:
|
|
137
|
+
pip_calls.append(cmd)
|
|
138
|
+
return _Result(0, "")
|
|
139
|
+
return real_run(cmd, **kwargs)
|
|
140
|
+
|
|
141
|
+
monkeypatch.setattr(upgrade.subprocess, "run", run)
|
|
142
|
+
lines = []
|
|
143
|
+
result = upgrade.upgrade(items, [], lambda msg, tag="info": lines.append(msg))
|
|
144
|
+
assert result == {"changed": True, "errors": 0}
|
|
145
|
+
assert bool(pip_calls) == pip_runs
|
|
146
|
+
if not pip_runs:
|
|
147
|
+
assert any("stays at" in line for line in lines)
|
|
148
|
+
|
|
149
|
+
|
|
122
150
|
def test_a_pull_that_cannot_fast_forward_is_an_error(remote) -> None:
|
|
123
151
|
clone, push = remote
|
|
124
152
|
state.UPGRADE_REPOS = [("tools", str(clone))]
|
|
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
|