logics-manager 2.3.1__tar.gz → 2.3.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.
- {logics_manager-2.3.1 → logics_manager-2.3.2}/PKG-INFO +1 -1
- {logics_manager-2.3.1 → logics_manager-2.3.2}/README.md +7 -1
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/cli.py +71 -2
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager.egg-info/PKG-INFO +1 -1
- {logics_manager-2.3.1 → logics_manager-2.3.2}/pyproject.toml +1 -1
- {logics_manager-2.3.1 → logics_manager-2.3.2}/LICENSE +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/__init__.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/__main__.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/assist.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/assist_handoff.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/assist_surface.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/audit.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/bootstrap.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/cli_output.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/config.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/doctor.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/flow.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/flow_evidence.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/index.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/insights.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/lint.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/mcp.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/path_utils.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/sync.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/termstyle.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/update_check.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager/viewer.py +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager.egg-info/SOURCES.txt +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager.egg-info/dependency_links.txt +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager.egg-info/entry_points.txt +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/logics_manager.egg-info/top_level.txt +0 -0
- {logics_manager-2.3.1 → logics_manager-2.3.2}/setup.cfg +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/AlexAgo83/logics-manager/actions/workflows/ci.yml)
|
|
4
4
|
[](LICENSE)
|
|
5
|
-

|
|
6
6
|

|
|
7
7
|

|
|
8
8
|

|
|
@@ -215,6 +215,12 @@ pipx ensurepath
|
|
|
215
215
|
pipx install --force logics-manager
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
+
If `logics-manager` is already installed through `pipx`, update that managed environment directly:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
pipx upgrade logics-manager
|
|
222
|
+
```
|
|
223
|
+
|
|
218
224
|
For npm installs, update with:
|
|
219
225
|
|
|
220
226
|
```bash
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
import json
|
|
5
|
+
import os
|
|
5
6
|
from importlib import metadata
|
|
6
7
|
import subprocess
|
|
7
8
|
import sys
|
|
@@ -146,6 +147,17 @@ def _is_externally_managed_python() -> bool:
|
|
|
146
147
|
return bool(stdlib and (Path(stdlib) / "EXTERNALLY-MANAGED").exists())
|
|
147
148
|
|
|
148
149
|
|
|
150
|
+
def _is_running_from_pipx(package_name: str = DEFAULT_SELF_UPDATE_PY_PACKAGE) -> bool:
|
|
151
|
+
expected = package_name.replace("_", "-").lower()
|
|
152
|
+
candidates = [Path(sys.prefix), Path(sys.executable)]
|
|
153
|
+
for candidate in candidates:
|
|
154
|
+
parts = [part.lower() for part in candidate.parts]
|
|
155
|
+
for index, part in enumerate(parts[:-2]):
|
|
156
|
+
if part == "pipx" and parts[index + 1] == "venvs" and parts[index + 2] == expected:
|
|
157
|
+
return True
|
|
158
|
+
return False
|
|
159
|
+
|
|
160
|
+
|
|
149
161
|
def _is_running_from_npm_package() -> bool:
|
|
150
162
|
package_json = Path(__file__).resolve().parents[1] / "package.json"
|
|
151
163
|
try:
|
|
@@ -155,13 +167,58 @@ def _is_running_from_npm_package() -> bool:
|
|
|
155
167
|
return payload.get("name") == DEFAULT_SELF_UPDATE_PACKAGE
|
|
156
168
|
|
|
157
169
|
|
|
170
|
+
def _find_executable_paths(command: str) -> list[str]:
|
|
171
|
+
paths: list[str] = []
|
|
172
|
+
seen: set[str] = set()
|
|
173
|
+
names = [command]
|
|
174
|
+
if sys.platform == "win32":
|
|
175
|
+
extensions = [suffix.lower() for suffix in os.environ.get("PATHEXT", ".COM;.EXE;.BAT;.CMD").split(";") if suffix]
|
|
176
|
+
if Path(command).suffix.lower() not in extensions:
|
|
177
|
+
names = [command + extension for extension in extensions]
|
|
178
|
+
for directory in os.environ.get("PATH", "").split(os.pathsep):
|
|
179
|
+
if not directory:
|
|
180
|
+
continue
|
|
181
|
+
for name in names:
|
|
182
|
+
candidate = Path(directory) / name
|
|
183
|
+
try:
|
|
184
|
+
resolved = str(candidate.resolve())
|
|
185
|
+
except OSError:
|
|
186
|
+
resolved = str(candidate)
|
|
187
|
+
if resolved in seen:
|
|
188
|
+
continue
|
|
189
|
+
if candidate.exists() and os.access(candidate, os.X_OK):
|
|
190
|
+
seen.add(resolved)
|
|
191
|
+
paths.append(str(candidate))
|
|
192
|
+
return paths
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _print_path_conflict_guidance(paths: list[str]) -> None:
|
|
196
|
+
if len(paths) <= 1:
|
|
197
|
+
return
|
|
198
|
+
print(
|
|
199
|
+
"\n".join(
|
|
200
|
+
[
|
|
201
|
+
"",
|
|
202
|
+
"Multiple logics-manager executables are on PATH. If --version still shows an older release, an earlier install is taking precedence.",
|
|
203
|
+
"Diagnose with:",
|
|
204
|
+
" command -v -a logics-manager",
|
|
205
|
+
" pipx list",
|
|
206
|
+
" npm list -g @grifhinz/logics-manager --depth=0",
|
|
207
|
+
]
|
|
208
|
+
)
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
|
|
158
212
|
def _print_externally_managed_update_guidance(package_name: str) -> None:
|
|
159
213
|
print(
|
|
160
214
|
"\n".join(
|
|
161
215
|
[
|
|
162
216
|
"This Python installation is externally managed, so pip cannot safely update logics-manager in the system environment.",
|
|
163
217
|
"",
|
|
164
|
-
"
|
|
218
|
+
"If this command was installed with pipx, update it with:",
|
|
219
|
+
f" pipx upgrade {package_name}",
|
|
220
|
+
"",
|
|
221
|
+
"Otherwise migrate the Python install through pipx:",
|
|
165
222
|
" sudo apt update",
|
|
166
223
|
" sudo apt install pipx python3-venv",
|
|
167
224
|
" pipx ensurepath",
|
|
@@ -249,7 +306,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
249
306
|
return 0 if payload["ok"] else 1
|
|
250
307
|
if command == "self-update":
|
|
251
308
|
parser = argparse.ArgumentParser(prog="logics-manager self-update", add_help=False)
|
|
252
|
-
parser.add_argument("--manager", choices=("auto", "pip", "npm"), default="auto")
|
|
309
|
+
parser.add_argument("--manager", choices=("auto", "pip", "pipx", "npm"), default="auto")
|
|
253
310
|
parser.add_argument("--package", default=DEFAULT_SELF_UPDATE_PACKAGE)
|
|
254
311
|
parser.add_argument("--python-package", default=DEFAULT_SELF_UPDATE_PY_PACKAGE)
|
|
255
312
|
parser.add_argument("--break-system-packages", action="store_true")
|
|
@@ -260,6 +317,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
260
317
|
if manager == "auto":
|
|
261
318
|
if _is_running_from_npm_package() and which("npm"):
|
|
262
319
|
manager = "npm"
|
|
320
|
+
elif _is_running_from_pipx(parsed.python_package) and which("pipx"):
|
|
321
|
+
manager = "pipx"
|
|
263
322
|
else:
|
|
264
323
|
try:
|
|
265
324
|
metadata.version(parsed.python_package)
|
|
@@ -275,6 +334,12 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
275
334
|
command = [sys.executable, "-m", "pip", "install", "--upgrade", parsed.python_package]
|
|
276
335
|
if parsed.break_system_packages:
|
|
277
336
|
command.append("--break-system-packages")
|
|
337
|
+
elif manager == "pipx":
|
|
338
|
+
pipx = which("pipx")
|
|
339
|
+
if not pipx:
|
|
340
|
+
print("pipx was not found on PATH. Install pipx or update with --manager pip/npm.")
|
|
341
|
+
return 1
|
|
342
|
+
command = [pipx, "upgrade", parsed.python_package]
|
|
278
343
|
else:
|
|
279
344
|
npm = which("npm")
|
|
280
345
|
if not npm:
|
|
@@ -289,7 +354,11 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
289
354
|
result = subprocess.run(command, check=False)
|
|
290
355
|
if result.returncode == 0:
|
|
291
356
|
target = parsed.python_package if manager == "pip" else parsed.package
|
|
357
|
+
if manager == "pipx":
|
|
358
|
+
target = parsed.python_package
|
|
292
359
|
print(f"Updated {target} via {manager}.")
|
|
360
|
+
if manager == "npm":
|
|
361
|
+
_print_path_conflict_guidance(_find_executable_paths("logics-manager"))
|
|
293
362
|
return result.returncode
|
|
294
363
|
if command == "flow" and (rest[:1] in (["new"], ["list"], ["companion"], ["deliver"], ["validate-closeout"], ["repair"], ["closeout"], ["promote"], ["split"], ["close"], ["finish"]) or rest[:1] in HELP_ARGV):
|
|
295
364
|
from .flow import main as flow_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
|