Skip to content

Commit 9a73b1e

Browse files
committed
Use publishable SPSS engine dependency
1 parent 68bb78e commit 9a73b1e

9 files changed

Lines changed: 47 additions & 24 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
repository: OpenStatSpec/specification
2323
ref: b2c9283eb3bf7103bff324731922358672974aee
2424
path: openstatspec-specification
25+
- name: Checkout required SPSS engine
26+
uses: actions/checkout@v7
27+
with:
28+
repository: TonisOrmisson/pyspssio
29+
ref: baf8958a162aa35e11b4fdc73b807a9e81070eb4
30+
path: openstatspec-pyspssio
2531
- uses: actions/setup-python@v7
2632
with:
2733
python-version: ${{ matrix.python-version }}
2834
- run: python -m pip install --upgrade pip
35+
- run: python -m pip install ./openstatspec-pyspssio
2936
- run: python -m pip install -e ".[dev]"
3037
- run: python -m pytest -m "not services"
3138

@@ -40,12 +47,19 @@ jobs:
4047
repository: OpenStatSpec/specification
4148
ref: b2c9283eb3bf7103bff324731922358672974aee
4249
path: openstatspec-specification
50+
- name: Checkout required SPSS engine
51+
uses: actions/checkout@v7
52+
with:
53+
repository: TonisOrmisson/pyspssio
54+
ref: baf8958a162aa35e11b4fdc73b807a9e81070eb4
55+
path: openstatspec-pyspssio
4356
- uses: actions/setup-python@v7
4457
with:
4558
python-version: "3.12"
4659
- run: python -m pip install --upgrade pip build
4760
- run: python -m build
4861
- run: python -m venv /tmp/openstatspec-wheel-smoke
62+
- run: /tmp/openstatspec-wheel-smoke/bin/python -m pip install ./openstatspec-pyspssio
4963
- run: /tmp/openstatspec-wheel-smoke/bin/python -m pip install dist/*.whl
5064
- run: /tmp/openstatspec-wheel-smoke/bin/openstatspec capabilities
5165

@@ -99,9 +113,16 @@ jobs:
99113
repository: OpenStatSpec/specification
100114
ref: b2c9283eb3bf7103bff324731922358672974aee
101115
path: openstatspec-specification
116+
- name: Checkout required SPSS engine
117+
uses: actions/checkout@v7
118+
with:
119+
repository: TonisOrmisson/pyspssio
120+
ref: baf8958a162aa35e11b4fdc73b807a9e81070eb4
121+
path: openstatspec-pyspssio
102122
- uses: actions/setup-python@v7
103123
with:
104124
python-version: "3.12"
105125
- run: python -m pip install --upgrade pip
126+
- run: python -m pip install ./openstatspec-pyspssio
106127
- run: python -m pip install -e ".[dev,sql]"
107128
- run: python -m pytest -m services

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ openstatspec export --database-url postgresql+psycopg://... --dataset-id respons
3939

4040
## 0.1.0 support status
4141

42-
The adapter requires the pinned TonisOrmisson/pyspssio fork declared in
43-
pyproject.toml as its sole SPSS engine. There is no
44-
fallback reader or writer. It supports unencrypted SAV and ZSAV import and
42+
The adapter requires `openstatspec-pyspssio==0.5.1.post1` as its sole SPSS
43+
engine. Its import module remains `pyspssio`; the exact source commit is recorded
44+
in operation metadata. There is no fallback reader or writer. It supports unencrypted SAV and ZSAV import and
4545
SAV/ZSAV export for the semantics exposed by that engine. SQLite is the local
4646
reference path.
4747
PostgreSQL, MySQL, and MariaDB are each covered by separate service-backed CI
@@ -60,7 +60,7 @@ intentional lossy export auditable.
6060
The matrix is also available to Python callers as
6161
`openstatspec.capability_matrix()`. It distinguishes supported semantics from
6262
unobservable and fail-closed paths; see the SAV profile for the exact
63-
the pinned pyspssio fork boundary.
63+
the openstatspec-pyspssio boundary.
6464

6565
See [the SAV profile](docs/sav-profile.md) for feature boundaries and
6666
[release readiness](docs/release-readiness.md) for the pre-tag checklist.

‎THIRD_PARTY_NOTICES.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ SPSS engine is a separate third-party distribution:
55

66
| Component | Version | Applicable terms |
77
| --- | --- | --- |
8-
| pyspssio | TonisOrmisson/pyspssio pinned commit 9c07a02 | MIT for the Python wrapper, except for its IBM I/O Module files |
9-
| IBM I/O Modules for IBM SPSS Statistics Data Files | bundled by the pinned pyspssio fork | IBM International License Agreement for Non-Warranted Programs and the accompanying License Information / REDIST files |
8+
| openstatspec-pyspssio (import module `pyspssio`) | 0.5.1.post1, source commit baf8958 | MIT for the Python wrapper, except for its IBM I/O Module files |
9+
| IBM I/O Modules for IBM SPSS Statistics Data Files | bundled by openstatspec-pyspssio | IBM International License Agreement for Non-Warranted Programs and the accompanying License Information / REDIST files |
1010

1111
pyspssio ships the IBM licence, redistribution list, and third-party notices
1212
inside its installed distribution, normally under pyspssio/spssio/license/.
@@ -15,8 +15,8 @@ Apache-2.0 licence.
1515

1616
## Distribution responsibility
1717

18-
OpenStatSpec requires the pinned pyspssio fork declared in pyproject.toml; it has no alternate SPSS engine. This
19-
repository does not vendor, alter, or publish the IBM binaries. Anyone who
18+
OpenStatSpec requires the exact openstatspec-pyspssio release declared in pyproject.toml; it has no alternate SPSS engine. This
19+
repository does not vendor or alter the IBM binaries. Anyone who
2020
distributes an application bundle containing the installed engine must review
2121
and comply with the IBM materials supplied with that engine. In particular, the
2222
IBM redistribution conditions require object-code-only distribution as part of

‎docs/pyspssio-spike.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
**Status:** selected as the required, sole Python SPSS engine.
44

5-
OpenStatSpec Python uses the pinned TonisOrmisson/pyspssio fork, based on
6-
[pyspssio](https://pypi.org/project/pyspssio/), for both SAV and ZSAV import and export. There is no alternate SPSS engine.
5+
OpenStatSpec Python requires `openstatspec-pyspssio==0.5.1.post1`, built from
6+
TonisOrmisson/pyspssio commit `baf8958`, for both SAV and ZSAV import and
7+
export. There is no alternate SPSS engine.
78

89
## Probe result
910

‎docs/sav-profile.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ chunks, or creates a cell/EAV representation.
77

88
## SPSS engine
99

10-
OpenStatSpec Python requires the pinned TonisOrmisson/pyspssio fork declared in
11-
pyproject.toml as its sole SPSS engine. There is no fallback reader or writer. The engine reads unencrypted .sav and .zsav
12-
files, and writes both formats through the same implementation.
10+
OpenStatSpec Python requires `openstatspec-pyspssio==0.5.1.post1` as its sole
11+
SPSS engine. There is no fallback reader or writer. The engine reads
12+
unencrypted .sav and .zsav files, and writes both formats through the same implementation.
1313

1414
## Verified SQL profiles
1515

@@ -36,7 +36,7 @@ of this boundary. It records the pinned source commit and installed engine versi
3636

3737
| SPSS semantic | Pinned pyspssio status | Behaviour |
3838
| --- | --- | --- |
39-
| File label | Supported through the pinned fork | The adapter persists it in the dataset catalog and writes it through the IBM I/O identifier-string API. |
39+
| File label | Supported through openstatspec-pyspssio | The adapter persists it in the dataset catalog and writes it through the IBM I/O identifier-string API. |
4040
| Very-long UTF-8 strings | Supported | The SAV and ZSAV fixture preserves a 340-byte, multi-byte UTF-8 string through the SQL catalog and back. |
4141
| Ordered document text | Supported through a strict type-6 dictionary bridge plus the pinned fork | Import stores normalized document rows; export creates a temporary UTF-8 SAV source and has IBM I/O copy the records into SAV or ZSAV without invalidating ZSAV dictionary offsets. |
4242
| Print and write formats independently | Supported as raw IBM I/O tuples | The adapter stores both tuples separately and writes them without collapsing either value. |

‎pyproject.toml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
requires-python = ">=3.11"
1111
license = {text = "Apache-2.0"}
1212
authors = [{name = "OpenStatSpec"}]
13-
dependencies = ["SQLAlchemy>=2.0", "pandas>=2.2", "pyspssio @ git+https://github.com/TonisOrmisson/pyspssio.git@9c07a02"]
13+
dependencies = ["SQLAlchemy>=2.0", "pandas>=2.2", "openstatspec-pyspssio==0.5.1.post1"]
1414

1515
[project.optional-dependencies]
1616
dev = ["pytest>=8"]
@@ -24,8 +24,5 @@ testpaths = ["tests"]
2424
addopts = "-q"
2525
markers = ["services: requires a configured PostgreSQL or MySQL/MariaDB service"]
2626

27-
[tool.hatch.metadata]
28-
allow-direct-references = true
29-
3027
[tool.hatch.build.targets.wheel]
3128
packages = ["src/openstatspec"]

‎src/openstatspec/spss/sav.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@
5050
def engine_identity() -> dict[str, str]:
5151
"""Return the exact pinned SPSS engine identity for audit records."""
5252
return {
53-
"package": "pyspssio",
54-
"distribution": "TonisOrmisson/pyspssio",
55-
"pinned_commit": "9c07a02",
53+
"package": "openstatspec-pyspssio",
54+
"module": "pyspssio",
55+
"repository": "TonisOrmisson/pyspssio",
56+
"pinned_commit": "baf8958",
5657
"installed_version": str(pyspssio.__version__),
5758
}
5859

‎tests/test_cli.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def test_cli_import_inspect_validate_and_export_emit_json(tmp_path, capsys) -> N
1717
assert openstatspec.cli.main(["inspect", str(source)]) == 0
1818
inspected = json.loads(capsys.readouterr().out)
1919
assert inspected["source_format"] == "SAV"
20-
assert inspected["engine"]["pinned_commit"] == "9c07a02"
20+
assert inspected["engine"]["package"] == "openstatspec-pyspssio"
21+
assert inspected["engine"]["pinned_commit"] == "baf8958"
2122
assert inspected["source_sha256"]
2223
assert inspected["loss_report"] == []
2324
assert imported["case_count"] == 1
@@ -37,7 +38,8 @@ def test_cli_import_inspect_validate_and_export_emit_json(tmp_path, capsys) -> N
3738

3839
def test_capability_matrix_is_public_and_cli_matches_engine_boundary(capsys) -> None:
3940
matrix = openstatspec.capability_matrix()
40-
assert matrix["engine"]["pinned_commit"] == "9c07a02"
41+
assert matrix["engine"]["package"] == "openstatspec-pyspssio"
42+
assert matrix["engine"]["pinned_commit"] == "baf8958"
4143

4244
assert matrix["spss"] == {
4345
"values": "supported",

‎tests/test_loss_reports.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def test_persisted_import_fidelity_events_require_consent_after_reopen(tmp_path)
2828
connection = sqlite3.connect(database_path)
2929
assert {row[0] for row in connection.execute("select code from fidelity_event_catalog")} == set(_REQUIRED_ENGINE_LOSS)
3030
import_details = json.loads(connection.execute("select details from operation_catalog order by created_at limit 1").fetchone()[0])
31-
assert import_details["engine"]["pinned_commit"] == "9c07a02"
31+
assert import_details["engine"]["package"] == "openstatspec-pyspssio"
32+
assert import_details["engine"]["pinned_commit"] == "baf8958"
3233

3334
openstatspec.export_sav(database_url=database, dataset_id="persisted", destination=blocked)
3435
assert blocked.exists()

0 commit comments

Comments
 (0)