gd-tools-cli 0.3.0__tar.gz → 0.4.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.
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/PKG-INFO +6 -4
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/README.md +5 -3
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/pyproject.toml +2 -2
- gd_tools_cli-0.4.0/src/gd_tools/addon_check.py +75 -0
- gd_tools_cli-0.3.0/src/gd_tools/addons/gd-tools-coverage/pre_run_hook.gd → gd_tools_cli-0.4.0/src/gd_tools/addons/gd-tools-coverage/coverage.gd +281 -266
- gd_tools_cli-0.4.0/src/gd_tools/addons/gd-tools-coverage/pre_run_hook.gd +10 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/cli.py +302 -20
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/config.py +206 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/orchestrator.py +87 -23
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/plan_generator.py +0 -59
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/doctor.py +37 -1
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/init.py +83 -36
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/lint_runner.py +45 -52
- gd_tools_cli-0.4.0/src/gd_tools/output.py +108 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/test_runner.py +44 -30
- gd_tools_cli-0.4.0/src/gd_tools/version.py +54 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/PKG-INFO +6 -4
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/SOURCES.txt +3 -0
- gd_tools_cli-0.3.0/src/gd_tools/addons/gd-tools-coverage/coverage.gd +0 -43
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/setup.cfg +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/__init__.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/__main__.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/addons/__init__.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/addons/gd-tools-coverage/post_run_hook.gd +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/__init__.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/cobertura_reporter.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/html_reporter.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/lcov_reporter.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/reporter.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/templates/file.html +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/templates/index.html +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/coverage/terminal_reporter.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/errors.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/file_discovery.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/format_runner.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/godot.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools/update_check.py +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/dependency_links.txt +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/entry_points.txt +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/requires.txt +0 -0
- {gd_tools_cli-0.3.0 → gd_tools_cli-0.4.0}/src/gd_tools_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gd-tools-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A modern development workflow CLI for GDScript projects in Godot 4.5+
|
|
5
5
|
Author-email: mansyar <m.ansyarafi@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -45,8 +45,8 @@ A modern development workflow CLI for GDScript projects in Godot 4.5+.
|
|
|
45
45
|
|
|
46
46
|
[](https://github.com/mansyar/gd-tools/actions/workflows/ci.yml)
|
|
47
47
|
[](https://codecov.io/gh/mansyar/gd-tools)
|
|
48
|
-
[](https://pypi.org/project/gd-tools/)
|
|
49
|
-
[](https://pypi.org/project/gd-tools/)
|
|
48
|
+
[](https://pypi.org/project/gd-tools-cli/)
|
|
49
|
+
[](https://pypi.org/project/gd-tools-cli/)
|
|
50
50
|
[](https://godotengine.org)
|
|
51
51
|
[](https://opensource.org/licenses/MIT)
|
|
52
52
|
|
|
@@ -66,7 +66,7 @@ One install, one config, one mental model.
|
|
|
66
66
|
|
|
67
67
|
| Feature | Description |
|
|
68
68
|
|---------|-------------|
|
|
69
|
-
| **Unified workflow** | One install, one config (`gd-tools.toml`), one mental model for test, lint, format, and coverage. |
|
|
69
|
+
| **Unified workflow** | One install, one config (`gd-tools.toml`), one mental model for test, lint, format, and coverage. Consistent terminal output with colored markers and summary footers across all commands. |
|
|
70
70
|
| **Zero-friction bootstrap** | `gd-tools init` gets a project fully set up in under a minute -- GUT installed, coverage addon deployed, configs generated. |
|
|
71
71
|
| **Coverage gap-filling** | Production-quality line and branch coverage for GDScript -- HTML, LCOV, and Cobertura reports that integrate with CI and code review tools. |
|
|
72
72
|
| **CI/CD friendly** | Exit codes, `--check` flags, machine-readable output (JSON, JUnit XML, LCOV, Cobertura), no interactive prompts in CI mode. |
|
|
@@ -113,6 +113,8 @@ gd-tools test --coverage --min 80
|
|
|
113
113
|
| `gd-tools lint` | Lint GDScript files using gdlint with text or JSON output. Accepts one or more file or directory paths. |
|
|
114
114
|
| `gd-tools format` | Format GDScript files using gdformat with check and diff modes. Accepts one or more file or directory paths. |
|
|
115
115
|
| `gd-tools coverage` | Coverage subcommands -- `report`, `merge`, `show`. |
|
|
116
|
+
| `gd-tools config` | Configuration management -- `show` (display resolved config), `validate` (check config validity). |
|
|
117
|
+
| `gd-tools version` | Display versions of all gd-tools components (gd-tools, Godot, GUT, gdtoolkit, Python) in a table or JSON. |
|
|
116
118
|
|
|
117
119
|
See the [User Guide](./docs/USER_GUIDE.md) for full command reference,
|
|
118
120
|
flags, examples, and exit codes.
|
|
@@ -4,8 +4,8 @@ A modern development workflow CLI for GDScript projects in Godot 4.5+.
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/mansyar/gd-tools/actions/workflows/ci.yml)
|
|
6
6
|
[](https://codecov.io/gh/mansyar/gd-tools)
|
|
7
|
-
[](https://pypi.org/project/gd-tools/)
|
|
8
|
-
[](https://pypi.org/project/gd-tools/)
|
|
7
|
+
[](https://pypi.org/project/gd-tools-cli/)
|
|
8
|
+
[](https://pypi.org/project/gd-tools-cli/)
|
|
9
9
|
[](https://godotengine.org)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ One install, one config, one mental model.
|
|
|
25
25
|
|
|
26
26
|
| Feature | Description |
|
|
27
27
|
|---------|-------------|
|
|
28
|
-
| **Unified workflow** | One install, one config (`gd-tools.toml`), one mental model for test, lint, format, and coverage. |
|
|
28
|
+
| **Unified workflow** | One install, one config (`gd-tools.toml`), one mental model for test, lint, format, and coverage. Consistent terminal output with colored markers and summary footers across all commands. |
|
|
29
29
|
| **Zero-friction bootstrap** | `gd-tools init` gets a project fully set up in under a minute -- GUT installed, coverage addon deployed, configs generated. |
|
|
30
30
|
| **Coverage gap-filling** | Production-quality line and branch coverage for GDScript -- HTML, LCOV, and Cobertura reports that integrate with CI and code review tools. |
|
|
31
31
|
| **CI/CD friendly** | Exit codes, `--check` flags, machine-readable output (JSON, JUnit XML, LCOV, Cobertura), no interactive prompts in CI mode. |
|
|
@@ -72,6 +72,8 @@ gd-tools test --coverage --min 80
|
|
|
72
72
|
| `gd-tools lint` | Lint GDScript files using gdlint with text or JSON output. Accepts one or more file or directory paths. |
|
|
73
73
|
| `gd-tools format` | Format GDScript files using gdformat with check and diff modes. Accepts one or more file or directory paths. |
|
|
74
74
|
| `gd-tools coverage` | Coverage subcommands -- `report`, `merge`, `show`. |
|
|
75
|
+
| `gd-tools config` | Configuration management -- `show` (display resolved config), `validate` (check config validity). |
|
|
76
|
+
| `gd-tools version` | Display versions of all gd-tools components (gd-tools, Godot, GUT, gdtoolkit, Python) in a table or JSON. |
|
|
75
77
|
|
|
76
78
|
See the [User Guide](./docs/USER_GUIDE.md) for full command reference,
|
|
77
79
|
flags, examples, and exit codes.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gd-tools-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
description = "A modern development workflow CLI for GDScript projects in Godot 4.5+"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -99,7 +99,7 @@ target-version = ["py310"]
|
|
|
99
99
|
|
|
100
100
|
[tool.commitizen]
|
|
101
101
|
name = "cz_conventional_commits"
|
|
102
|
-
version = "0.
|
|
102
|
+
version = "0.4.0"
|
|
103
103
|
version_files = ["pyproject.toml:version"]
|
|
104
104
|
changelog_file = "CHANGELOG.md"
|
|
105
105
|
tag_format = "v$version"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Stale addon detection module.
|
|
2
|
+
|
|
3
|
+
Checks whether the deployed coverage addon version matches the installed
|
|
4
|
+
gd-tools-cli package version. Prints warnings to stderr when the addon
|
|
5
|
+
is missing or stale. Fails silently on any error and can be disabled via
|
|
6
|
+
the GD_TOOLS_NO_UPDATE_CHECK environment variable.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
|
|
11
|
+
import click
|
|
12
|
+
from packaging.version import parse as parse_version
|
|
13
|
+
|
|
14
|
+
from gd_tools import __version__
|
|
15
|
+
from gd_tools.config import find_project_root
|
|
16
|
+
|
|
17
|
+
ADDON_VERSION_FILENAME = "_version.txt"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def check_addon_version() -> None:
|
|
21
|
+
"""Check if the deployed coverage addon version is stale.
|
|
22
|
+
|
|
23
|
+
Compares the version in _version.txt against the installed package
|
|
24
|
+
version. Prints a warning to stderr if the addon is missing or stale.
|
|
25
|
+
Fails silently on any unexpected error.
|
|
26
|
+
|
|
27
|
+
FR2: Stale Addon Check on CLI Invocation.
|
|
28
|
+
FR3: Suppressed by GD_TOOLS_NO_UPDATE_CHECK=1.
|
|
29
|
+
FR4: Uses packaging.version.parse() for comparison.
|
|
30
|
+
"""
|
|
31
|
+
# FR3.1: Environment variable disables check entirely.
|
|
32
|
+
if os.environ.get("GD_TOOLS_NO_UPDATE_CHECK") == "1":
|
|
33
|
+
return
|
|
34
|
+
|
|
35
|
+
try:
|
|
36
|
+
project_root = find_project_root()
|
|
37
|
+
version_file = (
|
|
38
|
+
project_root
|
|
39
|
+
/ "addons"
|
|
40
|
+
/ "gd-tools-coverage"
|
|
41
|
+
/ ADDON_VERSION_FILENAME
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
if not version_file.exists():
|
|
45
|
+
click.echo(
|
|
46
|
+
"WARNING: Coverage addon version file not found. "
|
|
47
|
+
"Run `gd-tools init` to deploy the addon.",
|
|
48
|
+
err=True,
|
|
49
|
+
)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
addon_version = version_file.read_text(encoding="utf-8").strip()
|
|
53
|
+
stale_msg = (
|
|
54
|
+
f"WARNING: Coverage addon is outdated (v{addon_version} "
|
|
55
|
+
f"deployed, v{__version__} available). "
|
|
56
|
+
f"Run `gd-tools init` to update."
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# FR4.1: Compare versions using packaging.version.parse().
|
|
60
|
+
try:
|
|
61
|
+
addon_parsed = parse_version(addon_version)
|
|
62
|
+
package_parsed = parse_version(__version__)
|
|
63
|
+
except (TypeError, ValueError):
|
|
64
|
+
# FR4.2: Unparseable version = treated as stale.
|
|
65
|
+
click.echo(stale_msg, err=True)
|
|
66
|
+
return
|
|
67
|
+
|
|
68
|
+
# FR2.4: Stale (addon < package)
|
|
69
|
+
if addon_parsed < package_parsed:
|
|
70
|
+
click.echo(stale_msg, err=True)
|
|
71
|
+
# FR2.5: Match = no warning
|
|
72
|
+
# FR2.6: Newer addon (downgrade) = no warning
|
|
73
|
+
except Exception:
|
|
74
|
+
# FR2.8: Fail silently on any unexpected error.
|
|
75
|
+
pass
|