Skip to content

Commit 4b6edd5

Browse files
committed
Document Python 0.1.0 support status
1 parent a08c28d commit 4b6edd5

5 files changed

Lines changed: 101 additions & 10 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to this reference implementation are documented here.
4+
5+
## 0.1.0 — unreleased
6+
7+
First public reference implementation of the OpenStatSpec strict wide-table
8+
SPSS profile.
9+
10+
### Included
11+
12+
- Import of unencrypted SAV and ZSAV sources into one dedicated wide SQL table
13+
and its metadata catalog.
14+
- Export of supported dataset semantics to SAV and ZSAV.
15+
- SQLite, PostgreSQL, and MySQL/MariaDB profiles, including service-backed
16+
PostgreSQL and MySQL CI coverage.
17+
- Preflight checks for target profile limits, atomic imports, validation, a
18+
command-line interface, and machine-readable capability and loss reports.
19+
20+
### Important boundaries
21+
22+
- This release promises semantic round-trip equivalence only for supported
23+
features; it never promises byte-identical SAV/ZSAV output.
24+
- The adapter requires explicit `allow_loss` consent before exporting known
25+
unsupported or lossy dictionary semantics.
26+
- Multiple-response sets, variable alignment, variable sets, and custom
27+
attributes have explicit capability diagnostics; see the SAV profile.
28+
- Encrypted SPSS files are not supported.

‎README.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ openstatspec import responses.sav --database-url postgresql+psycopg://... --data
3737
openstatspec export --database-url postgresql+psycopg://... --dataset-id responses-2026 --output responses-roundtrip.sav
3838
```
3939

40-
The initial scaffold deliberately declares no conforming SPSS or SQL profile.
41-
The entry points are stable, but fail explicitly until an implementation has
42-
been proven by OpenStatSpec conformance fixtures.
40+
## 0.1.0 support status
41+
42+
The adapter supports unencrypted SAV and ZSAV import and SAV/ZSAV export for
43+
the semantics exposed by its SPSS engine. SQLite is the local reference path.
44+
PostgreSQL and MySQL/MariaDB are also covered by service-backed CI conformance
45+
checks. Use these explicit SQLAlchemy URLs:
46+
47+
- SQLite: `sqlite:///dataset.sqlite`
48+
- PostgreSQL: `postgresql+psycopg://user:password@host/database`
49+
- MySQL/MariaDB: `mysql+pymysql://user:password@host/database`
50+
51+
Run `openstatspec capabilities` before an integration to inspect the
52+
machine-readable feature matrix. Export is deliberately strict: if known
53+
dictionary semantics cannot be reproduced, it stops until you pass the exact
54+
diagnostic code with `--allow-loss`. This avoids silent loss while making an
55+
intentional lossy export auditable.
56+
57+
See [the SAV profile](docs/sav-profile.md) for feature boundaries and
58+
[release readiness](docs/release-readiness.md) for the pre-tag checklist.

‎docs/release-readiness.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# 0.1.0 release readiness
2+
3+
This page records the expected release contract, not a publication event.
4+
Creating a version tag remains a separate maintainer action.
5+
6+
## Supported workflow
7+
8+
For a supported unencrypted SAV or ZSAV source, the adapter imports one source
9+
dataset into exactly one dedicated wide data table plus catalog tables. It can
10+
validate that representation and export it back to SAV or ZSAV.
11+
12+
## SQL profiles
13+
14+
| Profile | Connection URL | Verification |
15+
| --- | --- | --- |
16+
| SQLite | `sqlite:///dataset.sqlite` | Local reference fixture |
17+
| PostgreSQL | `postgresql+psycopg://…` | GitHub Actions PostgreSQL service |
18+
| MySQL/MariaDB | `mysql+pymysql://…` | GitHub Actions MySQL service |
19+
20+
The MySQL service test establishes the shared MySQL/MariaDB profile contract.
21+
It is not a claim that every MariaDB release or configuration has separately
22+
been tested.
23+
24+
## Export-loss policy
25+
26+
`capability_matrix()` and `openstatspec capabilities` expose the current
27+
feature state. Before export, the adapter combines source and writer
28+
diagnostics. An export with known loss fails unless the caller passes the
29+
relevant diagnostic codes through `allow_loss` or repeats `--allow-loss CODE`
30+
in the CLI.
31+
32+
Known boundaries include multiple-response sets, variable alignment, variable
33+
sets, and custom attributes. A caller that supplies consent receives the
34+
machine-readable loss report with the export result.
35+
36+
## Maintainer checks before tagging
37+
38+
1. Run `python -m pytest`.
39+
2. Run the service-backed profile checks with configured PostgreSQL and MySQL
40+
URLs, or confirm the GitHub Actions SQL-services job is green.
41+
3. Build with `python -m build` and install the generated wheel in a clean
42+
environment.
43+
4. Confirm `openstatspec capabilities` reflects the intended support boundary.
44+
5. Review this document, the README, and CHANGELOG for accurate scope.

‎docs/sav-profile.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@ measurement level, user-missing rules, file notes, and source encoding
1313
metadata. User-missing values remain stored values; their interpretation is
1414
kept as metadata and is restored to SAV on export.
1515

16-
## Declared SQL profiles
16+
## Verified SQL profiles
1717

18-
SQLite is the tested reference profile. PostgreSQL and MySQL/MariaDB have
19-
explicit preflight declarations but need live-server conformance fixtures
20-
before they are described as tested. An import that exceeds a target's strict
21-
single-table column limit fails before it creates a dataset.
18+
SQLite has a local reference fixture. PostgreSQL and MySQL/MariaDB have
19+
service-backed conformance checks in GitHub Actions that import, validate, and
20+
export the same supported fixture. The MySQL service test verifies the shared
21+
MySQL/MariaDB profile contract; it does not claim separately tested coverage
22+
for every MariaDB release or server configuration. An import that exceeds a
23+
target's strict single-table column limit fails before it creates a dataset.
2224

2325
## Explicit current boundaries
2426

2527
- Imports accept unencrypted `.sav` and `.zsav` sources through pyreadstat.
26-
- Export currently writes `.sav` only. Requesting `.zsav` fails explicitly.
28+
- Exports write SAV and ZSAV; ZSAV output uses the engine's compressed
29+
SAV writer path.
2730
- The writer restores metadata supported by pyreadstat. SPSS dictionary
2831
constructs that pyreadstat does not expose as stable writer inputs—such as
2932
multiple-response sets and variable sets—are not silently claimed as

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "openstatspec"
7-
version = "0.0.0"
7+
version = "0.1.0"
88
description = "Reference adapter for the OpenStatSpec relational contract"
99
readme = "README.md"
1010
requires-python = ">=3.11"

0 commit comments

Comments
 (0)