pkgdx 0.7.0__tar.gz → 0.9.0__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.
- {pkgdx-0.7.0 → pkgdx-0.9.0}/.gitignore +3 -1
- {pkgdx-0.7.0 → pkgdx-0.9.0}/CHANGELOG.md +32 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/PKG-INFO +3 -3
- {pkgdx-0.7.0 → pkgdx-0.9.0}/README.md +1 -1
- {pkgdx-0.7.0 → pkgdx-0.9.0}/pyproject.toml +1 -1
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/exceptions.py +10 -1
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/_cli.py +19 -9
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/_hooks.py +3 -5
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/hooks.toml +1 -1
- {pkgdx-0.7.0 → pkgdx-0.9.0}/COPYRIGHT +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/LICENSE +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/__init__.py +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/__main__.py +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/_core.py +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/_types.py +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/py.typed +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/__init__.py +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/mypy.ini +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/pymarkdown.toml +0 -0
- {pkgdx-0.7.0 → pkgdx-0.9.0}/src/pkgdx/standards/ruff.toml +0 -0
|
@@ -16,6 +16,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
> - `Fixed` for any bug fixes.
|
|
17
17
|
> - `Security` in case of vulnerabilities.
|
|
18
18
|
|
|
19
|
+
## [Unreleased]
|
|
20
|
+
|
|
21
|
+
## [0.9.0] - 2026-11-04
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `help` & `help <command>` print the same help as `--help`, from `pyclig` 0.4.0.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `pyclig` is pinned to `~=0.4.0` (was `~=0.3.0`).
|
|
30
|
+
|
|
31
|
+
## [0.8.0] - 2026-11-03
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `-q`, `--no-color` & `--no-input` run flags, `GLOBAL OPTIONS:` in `--help` & `-h` after a usage
|
|
36
|
+
error, from `pyclig` 0.3.0.
|
|
37
|
+
- `test_cli_conforms_to_the_guidelines` runs `pyclig`'s conformance kit against the CLI.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- `pyclig` is pinned to `~=0.3.0` (was `~=0.2`).
|
|
42
|
+
- `--help` lists `EXAMPLES:` before `OPTIONS:`.
|
|
43
|
+
- `ToolNotFoundError` carries a `hint`. A hook shim whose tool is missing from `PATH` prints
|
|
44
|
+
`error:` with the fact, then the remedy on the next line.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- `-q` on `pkgdx init` & `pkgdx config` drops the OK rows & the closing line. Warnings, failures &
|
|
49
|
+
`config`'s STDOUT rows stay.
|
|
50
|
+
|
|
19
51
|
## [0.7.0] - 2026-11-02
|
|
20
52
|
|
|
21
53
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pkgdx
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: A package to centralise standards across Python projects.
|
|
5
5
|
Project-URL: Documentation, https://gitlab.com/andyrids/pkgdx/blob/main/README.md
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/andyrids/pkgdx
|
|
@@ -27,7 +27,7 @@ Requires-Dist: click~=8.5
|
|
|
27
27
|
Requires-Dist: detect-secrets>=1.5.0
|
|
28
28
|
Requires-Dist: mypy>=2.1.0
|
|
29
29
|
Requires-Dist: prek~=0.4.8
|
|
30
|
-
Requires-Dist: pyclig~=0.
|
|
30
|
+
Requires-Dist: pyclig~=0.4.0
|
|
31
31
|
Requires-Dist: pymarkdownlnt>=0.9.37
|
|
32
32
|
Requires-Dist: rich>=15.0.0
|
|
33
33
|
Requires-Dist: ruff>=0.15.20
|
|
@@ -170,7 +170,7 @@ uv add --dev git+https://gitlab.com/andyrids/pkgdx.git
|
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
```bash
|
|
173
|
-
uv add --dev git+https://gitlab.com/andyrids/pkgdx.git@v0.
|
|
173
|
+
uv add --dev git+https://gitlab.com/andyrids/pkgdx.git@v0.9.0
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
## CI/CD integration
|
|
@@ -46,4 +46,13 @@ class ProjectConfigError(Error):
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
class ToolNotFoundError(Error):
|
|
49
|
-
"""Raised when a hook tool executable is not found on `PATH`.
|
|
49
|
+
"""Raised when a hook tool executable is not found on `PATH`.
|
|
50
|
+
|
|
51
|
+
Attributes:
|
|
52
|
+
hint: The remedy, printed by the CLI after the error.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
hint = (
|
|
56
|
+
"Run the hook in the environment pkgdx is installed in, "
|
|
57
|
+
"e.g. via `uv run`"
|
|
58
|
+
)
|
|
@@ -195,17 +195,20 @@ def _run_steps(
|
|
|
195
195
|
console: Console,
|
|
196
196
|
command: str,
|
|
197
197
|
steps: Sequence[tuple[str, Callable[[], StepResult]]],
|
|
198
|
+
quiet: bool = False,
|
|
198
199
|
) -> int:
|
|
199
200
|
"""Run ledger steps in order, printing one line per step & a summary.
|
|
200
201
|
|
|
201
202
|
NOTE: Prints to STDERR, with a transient spinner only when STDERR is an
|
|
202
203
|
interactive terminal. Debug log lines (`-d`) appear above the line of
|
|
203
|
-
the step that emitted them. Stops at the first FAIL.
|
|
204
|
+
the step that emitted them. Stops at the first FAIL. With `quiet`, OK
|
|
205
|
+
rows & the `done` line are skipped; warnings & failures stay.
|
|
204
206
|
|
|
205
207
|
Args:
|
|
206
208
|
console: The STDERR console, shared with logging.
|
|
207
209
|
command: The `pkgdx` subcommand, named in the closing line.
|
|
208
210
|
steps: The step labels & callables, in run order.
|
|
211
|
+
quiet: Skip OK rows & the `done` line (`-q`).
|
|
209
212
|
|
|
210
213
|
Returns:
|
|
211
214
|
The integer process exit code. 0 on success (with or without
|
|
@@ -223,7 +226,8 @@ def _run_steps(
|
|
|
223
226
|
else:
|
|
224
227
|
result = run()
|
|
225
228
|
|
|
226
|
-
|
|
229
|
+
if not (quiet and result.outcome is Outcome.OK):
|
|
230
|
+
_report(console, label, result, width)
|
|
227
231
|
if result.outcome is Outcome.FAIL:
|
|
228
232
|
closing = (
|
|
229
233
|
f"pkgdx {command}: failed at step {number}/{len(steps)}"
|
|
@@ -254,9 +258,10 @@ def _run_steps(
|
|
|
254
258
|
else "nothing to change"
|
|
255
259
|
)
|
|
256
260
|
elapsed = time.monotonic() - start
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
if not quiet:
|
|
262
|
+
console.print(
|
|
263
|
+
Text(f"pkgdx {command}: done in {elapsed:.1f}s{tail} ({counts})")
|
|
264
|
+
)
|
|
260
265
|
return pyclig.ExitCode.OK
|
|
261
266
|
|
|
262
267
|
|
|
@@ -289,6 +294,7 @@ def command_init(ctx: pyclig.Context, reset: bool) -> int:
|
|
|
289
294
|
ctx.err,
|
|
290
295
|
"init",
|
|
291
296
|
[(label, partial(run, state)) for label, run in _STEPS],
|
|
297
|
+
ctx.quiet,
|
|
292
298
|
)
|
|
293
299
|
|
|
294
300
|
|
|
@@ -339,6 +345,7 @@ def command_config(ctx: pyclig.Context, export: bool) -> int:
|
|
|
339
345
|
(bundled.name, partial(_core.export_config, bundled, user_dir))
|
|
340
346
|
for bundled in standards.BUNDLED_CONFIGS
|
|
341
347
|
],
|
|
348
|
+
ctx.quiet,
|
|
342
349
|
)
|
|
343
350
|
|
|
344
351
|
excludes = standards.project_excludes()
|
|
@@ -371,8 +378,11 @@ def command_config(ctx: pyclig.Context, export: bool) -> int:
|
|
|
371
378
|
|
|
372
379
|
via = f"from {env}" if os.environ.get(env) else f"{env} not set"
|
|
373
380
|
sources = f"{users} user, {len(standards.BUNDLED_CONFIGS) - users} bundled"
|
|
374
|
-
ctx.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
381
|
+
if not ctx.quiet:
|
|
382
|
+
ctx.err.print(
|
|
383
|
+
Text(
|
|
384
|
+
f"pkgdx config: user config dir {user_dir}, {via} ({sources})"
|
|
385
|
+
),
|
|
386
|
+
soft_wrap=True,
|
|
387
|
+
)
|
|
378
388
|
return pyclig.ExitCode.OK
|
|
@@ -48,11 +48,9 @@ def _run_tool(cmd: list[str], **kwargs: Any) -> int:
|
|
|
48
48
|
try:
|
|
49
49
|
proc = subprocess.run(cmd, **kwargs)
|
|
50
50
|
except FileNotFoundError as e:
|
|
51
|
-
|
|
52
|
-
f"`{cmd[0]}` not found on PATH
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
raise exceptions.ToolNotFoundError(msg) from e
|
|
51
|
+
raise exceptions.ToolNotFoundError(
|
|
52
|
+
f"`{cmd[0]}` not found on PATH"
|
|
53
|
+
) from e
|
|
56
54
|
else:
|
|
57
55
|
return proc.returncode
|
|
58
56
|
|
|
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
|