strictspec 0.2.0__tar.gz → 0.2.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.
- {strictspec-0.2.0 → strictspec-0.2.2}/PKG-INFO +1 -1
- {strictspec-0.2.0 → strictspec-0.2.2}/pyproject.toml +1 -1
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/__init__.py +1 -1
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_launcher.py +16 -14
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_launcher.py +35 -5
- {strictspec-0.2.0 → strictspec-0.2.2}/uv.lock +1 -1
- {strictspec-0.2.0 → strictspec-0.2.2}/.github/workflows/ci.yml +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/.github/workflows/publish.yml +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/.gitignore +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/.rlsbl/config.json +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/.rlsbl/lint/python.toml +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/.rlsbl/managed-files.json +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/DESIGN.md +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/LICENSE +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/README.md +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/scripts/conformance_adapter.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/scripts/gencodes.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_codes.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_diag.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_doc.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_ir.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_jsondoc.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_render.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_schema.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_strdecode.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/_tomldoc.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/src/strictspec/py.typed +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_codes_freshness.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_cross_check.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_diag.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_doc.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_ir.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_jsondoc.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_public.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_render.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_schema_sweep.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_smoke.py +0 -0
- {strictspec-0.2.0 → strictspec-0.2.2}/tests/test_tomldoc.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: strictspec
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Strict multi-language schema toolchain for declarative spec files (Python runtime + CLI stub)
|
|
5
5
|
Project-URL: Homepage, https://github.com/smm-h/strictspec
|
|
6
6
|
Project-URL: Repository, https://github.com/smm-h/strictspec
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "strictspec"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Strict multi-language schema toolchain for declarative spec files (Python runtime + CLI stub)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -30,7 +30,7 @@ from . import _tomldoc as _tomldoc
|
|
|
30
30
|
# paired to it exactly (see require_runtime_version). rlsbl bumps this
|
|
31
31
|
# __version__ in source on release (Python pypi target); the version-pairing
|
|
32
32
|
# test asserts it matches pyproject, so drift is impossible.
|
|
33
|
-
__version__ = "0.2.
|
|
33
|
+
__version__ = "0.2.2"
|
|
34
34
|
Version = __version__
|
|
35
35
|
|
|
36
36
|
__all__ = [
|
|
@@ -11,16 +11,16 @@ Subsequent invocations reuse the cached binary (no network). Python stdlib only
|
|
|
11
11
|
-- zero runtime dependencies.
|
|
12
12
|
|
|
13
13
|
The binary is the goreleaser-built ``strictspec`` archive on the
|
|
14
|
-
``
|
|
15
|
-
resolves ITS OWN installed version and downloads the matching
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
``strictspec@vX.Y.Z`` GitHub Release (go/.goreleaser.yml). The launcher
|
|
15
|
+
resolves ITS OWN installed version and downloads the matching Release asset:
|
|
16
|
+
runtime package version == strictspec release version, so the lazy download and
|
|
17
|
+
the exact version-pairing rule (decision 19) agree by construction. A failed
|
|
18
|
+
download is a hard error with manual-install remediation, never a silent
|
|
19
|
+
fallback (decision 31).
|
|
20
20
|
|
|
21
21
|
This is adapted from rlsbl's ``pypi/shim-launcher.py.tpl``; the sole strictspec
|
|
22
22
|
difference is that the binary lives on the prefixed monorepo-releasable tag
|
|
23
|
-
``
|
|
23
|
+
``strictspec@vX.Y.Z`` rather than a bare ``vX.Y.Z`` tag.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
import hashlib
|
|
@@ -42,9 +42,11 @@ ASSET_PROJECT = "strictspec"
|
|
|
42
42
|
BINARY_NAME = "strictspec"
|
|
43
43
|
# The installed distribution whose version keys the download.
|
|
44
44
|
DIST_NAME = "strictspec"
|
|
45
|
-
# The
|
|
46
|
-
#
|
|
47
|
-
|
|
45
|
+
# The releasable GROUP's tag prefix on the shared monorepo GitHub Releases. All
|
|
46
|
+
# three language packages ship as one releasable named `strictspec`, so the Go
|
|
47
|
+
# binary is published under `strictspec@vX.Y.Z`, not a bare `vX.Y.Z` tag and not
|
|
48
|
+
# the retired per-package `go-strictspec@vX.Y.Z` one.
|
|
49
|
+
RELEASABLE_TAG_PREFIX = "strictspec@v"
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
def _installed_version():
|
|
@@ -90,10 +92,10 @@ def asset_name(version):
|
|
|
90
92
|
|
|
91
93
|
|
|
92
94
|
def release_base_url(version):
|
|
93
|
-
# The Go binary is on the
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
return f"https://github.com/{GITHUB_REPO}/releases/download/{
|
|
95
|
+
# The Go binary is on the strictspec releasable's GitHub Release, whose tag
|
|
96
|
+
# is `strictspec@vX.Y.Z` (NOT a bare `vX.Y.Z` tag). `@` is a valid path
|
|
97
|
+
# character and GitHub serves release assets under it literally.
|
|
98
|
+
return f"https://github.com/{GITHUB_REPO}/releases/download/{RELEASABLE_TAG_PREFIX}{version}"
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
def cache_dir():
|
|
@@ -49,15 +49,45 @@ def test_asset_name_windows(windows_arm64):
|
|
|
49
49
|
assert _launcher.asset_name("2.3.4") == "strictspec_2.3.4_windows_arm64.zip"
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
def
|
|
53
|
-
# The critical strictspec adaptation: the Go binary lives on the
|
|
54
|
-
# `
|
|
55
|
-
|
|
52
|
+
def test_release_base_url_uses_releasable_group_tag():
|
|
53
|
+
# The critical strictspec adaptation: the Go binary lives on the releasable
|
|
54
|
+
# group's `strictspec@vX.Y.Z` tag, not a bare `vX.Y.Z` tag. The retired
|
|
55
|
+
# per-package `go-strictspec@vX.Y.Z` spelling has no release behind it from
|
|
56
|
+
# the releasable-group migration onward, so a launcher still asking for it
|
|
57
|
+
# 404s on its very first run.
|
|
58
|
+
url = _launcher.release_base_url("0.2.1")
|
|
56
59
|
assert url == (
|
|
57
|
-
"https://github.com/smm-h/strictspec/releases/download/
|
|
60
|
+
"https://github.com/smm-h/strictspec/releases/download/strictspec@v0.2.1"
|
|
58
61
|
)
|
|
59
62
|
|
|
60
63
|
|
|
64
|
+
def test_release_tag_prefix_is_not_the_retired_per_package_one():
|
|
65
|
+
assert _launcher.RELEASABLE_TAG_PREFIX == "strictspec@v"
|
|
66
|
+
assert "go-strictspec@" not in _launcher.release_base_url("9.9.9")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def test_download_failure_remediation_points_at_the_live_release(
|
|
70
|
+
linux_amd64, tmp_path, monkeypatch
|
|
71
|
+
):
|
|
72
|
+
# The manual-install instructions in the hard error must name the SAME
|
|
73
|
+
# (live) release URL the download used -- a remediation pointing at a
|
|
74
|
+
# retired tag is a second 404 handed to the user.
|
|
75
|
+
version = "0.2.1"
|
|
76
|
+
monkeypatch.setattr(_launcher, "_installed_version", lambda: version)
|
|
77
|
+
monkeypatch.setattr(_launcher, "cache_dir", lambda: tmp_path)
|
|
78
|
+
|
|
79
|
+
def _fail(url):
|
|
80
|
+
raise OSError("HTTP Error 404: Not Found")
|
|
81
|
+
|
|
82
|
+
monkeypatch.setattr(_launcher, "_download", _fail)
|
|
83
|
+
|
|
84
|
+
with pytest.raises(RuntimeError) as excinfo:
|
|
85
|
+
_launcher.ensure_binary()
|
|
86
|
+
message = str(excinfo.value)
|
|
87
|
+
assert "releases/download/strictspec@v0.2.1" in message
|
|
88
|
+
assert "go-strictspec@" not in message
|
|
89
|
+
|
|
90
|
+
|
|
61
91
|
def test_expected_digest_matches_filename():
|
|
62
92
|
checksums = (
|
|
63
93
|
"aaaa strictspec_0.1.0_linux_amd64.tar.gz\n"
|
|
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
|