Skip to content

Commit 034ce47

Browse files
Fix transformation specification fixture lookup (#5)
Fix transformation specification fixture lookup
2 parents e52776c + e5bad06 commit 034ce47

5 files changed

Lines changed: 30 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v7
2121
with: &specification-checkout
2222
repository: OpenStatSpec/specification
23-
ref: 6b9d1fc38f2f083c0ac5cf1c64874a6d07b95045
23+
ref: 7edcad38470fffebfe2306f22fdecb6892f8eece
2424
path: openstatspec-specification
2525
- name: Checkout required SPSS engine
2626
uses: actions/checkout@v7

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/checkout@v7
4040
with:
4141
repository: OpenStatSpec/specification
42-
ref: 6b9d1fc38f2f083c0ac5cf1c64874a6d07b95045
42+
ref: 7edcad38470fffebfe2306f22fdecb6892f8eece
4343
path: openstatspec-specification
4444
- name: Checkout required SPSS engine
4545
uses: actions/checkout@v7

‎src/openstatspec/sql/capabilities.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .profiles import profile_for_url
1616
from ..core import UnsupportedOperationError
1717

18-
SPECIFICATION_COMMIT = "6b9d1fc38f2f083c0ac5cf1c64874a6d07b95045"
18+
SPECIFICATION_COMMIT = "7edcad38470fffebfe2306f22fdecb6892f8eece"
1919
SPECIFICATION_RELEASE: str | None = None
2020

2121
SERVER_POLICIES = {

‎tests/test_cli.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_capability_matrix_is_public_and_cli_matches_engine_boundary(capsys) ->
4040
matrix = openstatspec.capability_matrix()
4141
assert matrix["specification_status"] == "release_candidate"
4242
assert matrix["specification_release"] is None
43-
assert matrix["specification_commit"] == "6b9d1fc38f2f083c0ac5cf1c64874a6d07b95045"
43+
assert matrix["specification_commit"] == "7edcad38470fffebfe2306f22fdecb6892f8eece"
4444
assert matrix["directions"] == ["import", "export", "semantic_round_trip"]
4545
assert matrix["active_connection"] is None
4646
assert matrix["engine"]["package"] == "openstatspec-pyspssio"

‎tests/test_sql_workflow.py‎

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import hashlib
22
import json
3+
import os
34
from pathlib import Path
45

56
import rfc8785
@@ -21,6 +22,28 @@
2122
from openstatspec.sql.wide import create_wide_dataset
2223

2324

25+
def _workflow_conformance_manifest() -> Path:
26+
configured = os.environ.get("OPENSTATSPEC_SPECIFICATION_DIR")
27+
candidates = [
28+
(
29+
Path(configured)
30+
/ "conformance/sql-transformation-workflow-0.1.json"
31+
if configured else None
32+
),
33+
Path(__file__).resolve().parents[1]
34+
/ "openstatspec-specification/conformance/sql-transformation-workflow-0.1.json",
35+
Path(__file__).resolve().parents[2]
36+
/ "specification/conformance/sql-transformation-workflow-0.1.json",
37+
]
38+
for candidate in candidates:
39+
if candidate and candidate.is_file():
40+
return candidate
41+
raise RuntimeError(
42+
"The SQL transformation conformance fixture is required; "
43+
"set OPENSTATSPEC_SPECIFICATION_DIR."
44+
)
45+
46+
2447
def _variables():
2548
return [
2649
{
@@ -541,10 +564,9 @@ def test_scope_aware_ctes_merge_with_parent_and_shadowing_fails(catalog):
541564

542565

543566
def test_definition_hash_matches_every_normative_conformance_vector():
544-
manifest = json.loads((
545-
Path(__file__).resolve().parents[2]
546-
/ "specification/conformance/sql-transformation-workflow-0.1.json"
547-
).read_text(encoding="utf-8"))
567+
manifest = json.loads(
568+
_workflow_conformance_manifest().read_text(encoding="utf-8")
569+
)
548570
for case in manifest["cases"]:
549571
actual = _definition_hash(
550572
transformation_id=case["transformation_id"],

0 commit comments

Comments
 (0)