Skip to content

Commit b95fb29

Browse files
committed
build: qualify published Specs 0.2 temporal contract (#76)
1 parent 9364c86 commit b95fb29

4 files changed

Lines changed: 16 additions & 25 deletions

File tree

‎docs/user-guide/features.md‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,9 @@ raise `ValueError` before feature execution.
8787
### Calendar and bar grid
8888

8989
The calendar-aware default targets the next minor version (0.2), separate from the 0.1.7 patch.
90-
Development and qualification currently pin the merged Specs v2 implementation at
91-
`701bde68744035050ede386efce498234c661c21`. The same immutable Git dependency is declared
92-
in built package metadata; published Specs 0.1.5 does not provide this API. Before a PyPI
93-
release, replace that source dependency with the verified published Specs version containing
94-
the v2 contract and repeat installed-package qualification.
90+
The shared temporal contract requires published `ml4t-specs>=0.2.0,<0.3.0`, also declared
91+
in built package metadata. Specs 0.1.5 does not provide this API. Engineer's development
92+
branch uses the published dependency; the temporal migration is not part of the 0.1.7 patch.
9593

9694
Calendar selection
9795
uses the explicit `calendar` argument, then declared feed metadata, then NYSE. Explicit

‎pyproject.toml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ build-backend = "hatchling.build"
88
[tool.hatch.version]
99
source = "vcs"
1010

11-
[tool.hatch.metadata]
12-
# Qualification pin until the shared time-contract v2 API is published on PyPI.
13-
allow-direct-references = true
14-
1511
[tool.hatch.build.targets.wheel]
1612
packages = ["src/ml4t"]
1713
namespaces = true
@@ -76,7 +72,7 @@ requires-python = ">=3.12,<3.15"
7672

7773
# Core dependencies
7874
dependencies = [
79-
"ml4t-specs @ git+https://github.com/ml4t/specs.git@701bde68744035050ede386efce498234c661c21",
75+
"ml4t-specs>=0.2.0,<0.3.0",
8076

8177
# Data processing (Polars-first)
8278
"polars>=0.20.0",

‎tests/test_release_policy.py‎

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def test_ci_audits_core_and_complete_locked_environments() -> None:
242242
assert "complete.txt" in audit
243243

244244

245-
def test_core_dependency_uses_bounded_specs_or_immutable_source_for_qualification() -> None:
245+
def test_core_dependency_requires_published_time_contract_v2() -> None:
246246
project = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
247247
lock = tomllib.loads((ROOT / "uv.lock").read_text(encoding="utf-8"))
248248

@@ -252,17 +252,10 @@ def test_core_dependency_uses_bounded_specs_or_immutable_source_for_qualificatio
252252
if Requirement(value).name == "ml4t-specs"
253253
)
254254
specs = next(package for package in lock["package"] if package["name"] == "ml4t-specs")
255-
if requirement.url is None:
256-
assert str(requirement.specifier) == "<0.2.0,>=0.1.0"
257-
assert specs["version"] in requirement.specifier
258-
else:
259-
assert re.fullmatch(
260-
r"git\+https://github.com/ml4t/specs\.git@[0-9a-f]{40}", requirement.url
261-
)
262-
commit = requirement.url.rsplit("@", maxsplit=1)[1]
263-
assert specs["source"] == {
264-
"git": f"https://github.com/ml4t/specs.git?rev={commit}#{commit}"
265-
}
255+
assert requirement.url is None
256+
assert str(requirement.specifier) == "<0.3.0,>=0.2.0"
257+
assert specs["version"] in requirement.specifier
258+
assert specs["source"] == {"registry": "https://pypi.org/simple"}
266259

267260

268261
def test_package_supports_python_312_through_314() -> None:

‎uv.lock‎

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)