openstatspec 0.8.1__tar.gz → 0.9.0__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.
Files changed (211) hide show
  1. {openstatspec-0.8.1 → openstatspec-0.9.0}/CHANGELOG.md +37 -0
  2. {openstatspec-0.8.1 → openstatspec-0.9.0}/PKG-INFO +14 -4
  3. {openstatspec-0.8.1 → openstatspec-0.9.0}/README.md +13 -3
  4. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/release-readiness.md +68 -16
  5. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/transformations.md +106 -0
  6. {openstatspec-0.8.1 → openstatspec-0.9.0}/pyproject.toml +1 -1
  7. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/__init__.py +2 -2
  8. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/api.py +3 -1
  9. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/spss/__init__.py +4 -0
  10. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/spss/binding.py +64 -11
  11. openstatspec-0.9.0/src/openstatspec/frontends/spss/compiler.py +137 -0
  12. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/spss/execution.py +3 -1
  13. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/spss/syntax.py +138 -44
  14. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/inplace_transform.py +11 -4
  15. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/transform/plan.py +14 -6
  16. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/transform/schema.py +4 -2
  17. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_cli.py +1 -1
  18. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_conditional_inplace_transform.py +95 -0
  19. openstatspec-0.9.0/tests/test_frontend_v03.py +227 -0
  20. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_inplace_transform.py +74 -2
  21. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_sql_services.py +73 -0
  22. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_transform_frontend.py +37 -12
  23. openstatspec-0.8.1/src/openstatspec/frontends/spss/compiler.py +0 -64
  24. {openstatspec-0.8.1 → openstatspec-0.9.0}/.github/verify_release_ref.py +0 -0
  25. {openstatspec-0.8.1 → openstatspec-0.9.0}/.github/workflows/ci.yml +0 -0
  26. {openstatspec-0.8.1 → openstatspec-0.9.0}/.github/workflows/release.yml +0 -0
  27. {openstatspec-0.8.1 → openstatspec-0.9.0}/.gitignore +0 -0
  28. {openstatspec-0.8.1 → openstatspec-0.9.0}/THIRD_PARTY_NOTICES.md +0 -0
  29. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/architecture.md +0 -0
  30. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/in-place-transformation.md +0 -0
  31. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/pyspssio-spike.md +0 -0
  32. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/sav-profile.md +0 -0
  33. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/sql-transformation-workflow.md +0 -0
  34. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/superpowers/plans/2026-08-12-python-v071-stable-pin.md +0 -0
  35. {openstatspec-0.8.1 → openstatspec-0.9.0}/docs/superpowers/specs/2026-08-12-python-stable-specification-pin-design.md +0 -0
  36. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/.github/workflows/ci.yml +0 -0
  37. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/.github/workflows/release.yml +0 -0
  38. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/.gitignore +0 -0
  39. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/CHANGELOG.md +0 -0
  40. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/CONTRIBUTING.md +0 -0
  41. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/README.md +0 -0
  42. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/RELEASING.md +0 -0
  43. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/ROADMAP.md +0 -0
  44. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/VERSIONING.md +0 -0
  45. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/LICENSE.md +0 -0
  46. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/README.md +0 -0
  47. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/core-numeric-string.sav +0 -0
  48. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/dictionary-and-display.sav +0 -0
  49. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/generate-fixtures.sps +0 -0
  50. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/long-utf8-and-attributes.sav +0 -0
  51. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/missing-rules.sav +0 -0
  52. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/sets.sav +0 -0
  53. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/weight-and-string-mr.sav +0 -0
  54. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/fixtures/zsav-compressed.zsav +0 -0
  55. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/in-place-transformation-0.1.json +0 -0
  56. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/in-place-transformation-0.2.json +0 -0
  57. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/spss-sav-zsav-1.0.json +0 -0
  58. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/spss-syntax-frontend-0.1.json +0 -0
  59. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/spss-syntax-frontend-0.2.json +0 -0
  60. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/spss-syntax-frontend-0.3.json +0 -0
  61. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/sql-transformation-workflow-0.1.json +0 -0
  62. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/transformation-plan-0.1.json +0 -0
  63. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/conformance/transformation-plan-0.2.json +0 -0
  64. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/architecture.md +0 -0
  65. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/database-io-policy-v1.md +0 -0
  66. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/implementation-profiles/python-pyspssio-0.5.1.md +0 -0
  67. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/mssql-dialect-roadmap.md +0 -0
  68. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-frontend-roadmap.md +0 -0
  69. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-profile.md +0 -0
  70. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-sav-zsav-profile-1.0.md +0 -0
  71. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-syntax-frontend-profile-0.1.md +0 -0
  72. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-syntax-frontend-profile-0.2.md +0 -0
  73. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/spss-syntax-frontend-profile-0.3.md +0 -0
  74. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/sql-transformation-workflow-profile-0.1.md +0 -0
  75. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/superpowers/plans/2026-08-12-roadmap-v030-bookkeeping.md +0 -0
  76. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/superpowers/plans/2026-08-21-spss-frontend-03.md +0 -0
  77. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/superpowers/specs/2026-08-21-spss-frontend-expansion-design.md +0 -0
  78. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/transformation-plan-profile-0.1.md +0 -0
  79. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/transformation-plan-profile-0.2.md +0 -0
  80. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/transformation-plan-sql-binding-0.1.md +0 -0
  81. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/docs/transformation-plan-sql-binding-0.2.md +0 -0
  82. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/examples/basic-spss-mapping.md +0 -0
  83. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/examples/spss-syntax-transformation-0.2.md +0 -0
  84. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/examples/spss-syntax-transformation-0.3.md +0 -0
  85. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/examples/spss-syntax-transformation.md +0 -0
  86. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/examples/sql-transformation-workflow.md +0 -0
  87. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/pyproject.toml +0 -0
  88. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/dialect-profile-baseline.json +0 -0
  89. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/dialect-profiles.md +0 -0
  90. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/dolt-adapter-declaration-schema.json +0 -0
  91. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/dolt-adapter-declarations/README.md +0 -0
  92. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/profile-capabilities.md +0 -0
  93. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/schema-outline.sql +0 -0
  94. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/server-version-policy.md +0 -0
  95. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/transformation-plan-profile-schema.sql +0 -0
  96. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/sql/transformation-workflow-profile-schema.sql +0 -0
  97. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/src/openstatspec_specification/__init__.py +0 -0
  98. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/src/openstatspec_specification/artifacts.py +0 -0
  99. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/src/openstatspec_specification/dolt.py +0 -0
  100. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/tests/test_contract_artifacts.py +0 -0
  101. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/tests/test_dolt_declarations.py +0 -0
  102. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/tools/validate_repository.py +0 -0
  103. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/transformation/plan-0.1.schema.json +0 -0
  104. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/transformation/plan-0.2.schema.json +0 -0
  105. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/transformation/spss-syntax-frontend-0.1.schema.json +0 -0
  106. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/transformation/spss-syntax-frontend-0.2.schema.json +0 -0
  107. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification/transformation/spss-syntax-frontend-0.3.schema.json +0 -0
  108. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/.github/workflows/ci.yml +0 -0
  109. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/.github/workflows/publish.yml +0 -0
  110. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/.gitignore +0 -0
  111. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/CHANGELOG.md +0 -0
  112. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/CONTRIBUTING.md +0 -0
  113. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/README.md +0 -0
  114. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/RELEASING.md +0 -0
  115. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/ROADMAP.md +0 -0
  116. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/VERSIONING.md +0 -0
  117. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/LICENSE.md +0 -0
  118. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/README.md +0 -0
  119. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/core-numeric-string.sav +0 -0
  120. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/dictionary-and-display.sav +0 -0
  121. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/generate-fixtures.sps +0 -0
  122. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/long-utf8-and-attributes.sav +0 -0
  123. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/missing-rules.sav +0 -0
  124. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/sets.sav +0 -0
  125. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/weight-and-string-mr.sav +0 -0
  126. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/fixtures/zsav-compressed.zsav +0 -0
  127. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/in-place-transformation-0.1.json +0 -0
  128. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/in-place-transformation-0.2.json +0 -0
  129. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/spss-sav-zsav-1.0.json +0 -0
  130. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/spss-syntax-frontend-0.1.json +0 -0
  131. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/spss-syntax-frontend-0.2.json +0 -0
  132. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/sql-transformation-workflow-0.1.json +0 -0
  133. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/transformation-plan-0.1.json +0 -0
  134. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/conformance/transformation-plan-0.2.json +0 -0
  135. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/architecture.md +0 -0
  136. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/implementation-profiles/python-pyspssio-0.5.1.md +0 -0
  137. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/mssql-dialect-roadmap.md +0 -0
  138. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/spss-profile.md +0 -0
  139. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/spss-sav-zsav-profile-1.0.md +0 -0
  140. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/spss-syntax-frontend-profile-0.1.md +0 -0
  141. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/spss-syntax-frontend-profile-0.2.md +0 -0
  142. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/sql-transformation-workflow-profile-0.1.md +0 -0
  143. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/transformation-plan-profile-0.1.md +0 -0
  144. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/transformation-plan-profile-0.2.md +0 -0
  145. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/transformation-plan-sql-binding-0.1.md +0 -0
  146. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/docs/transformation-plan-sql-binding-0.2.md +0 -0
  147. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/examples/basic-spss-mapping.md +0 -0
  148. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/examples/spss-syntax-transformation-0.2.md +0 -0
  149. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/examples/spss-syntax-transformation.md +0 -0
  150. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/examples/sql-transformation-workflow.md +0 -0
  151. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/pyproject.toml +0 -0
  152. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/dialect-profile-baseline.json +0 -0
  153. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/dialect-profiles.md +0 -0
  154. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/dolt-adapter-declaration-schema.json +0 -0
  155. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/dolt-adapter-declarations/README.md +0 -0
  156. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/profile-capabilities.md +0 -0
  157. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/schema-outline.sql +0 -0
  158. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/server-version-policy.md +0 -0
  159. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/transformation-plan-profile-schema.sql +0 -0
  160. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/sql/transformation-workflow-profile-schema.sql +0 -0
  161. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/src/openstatspec_specification/__init__.py +0 -0
  162. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/src/openstatspec_specification/dolt.py +0 -0
  163. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/tests/test_dolt_declarations.py +0 -0
  164. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/tools/validate_repository.py +0 -0
  165. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/transformation/plan-0.1.schema.json +0 -0
  166. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/transformation/plan-0.2.schema.json +0 -0
  167. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/transformation/spss-syntax-frontend-0.1.schema.json +0 -0
  168. {openstatspec-0.8.1 → openstatspec-0.9.0}/openstatspec-specification-package/transformation/spss-syntax-frontend-0.2.schema.json +0 -0
  169. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/cli.py +0 -0
  170. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/core/__init__.py +0 -0
  171. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/core/results.py +0 -0
  172. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/__init__.py +0 -0
  173. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/sas/.gitkeep +0 -0
  174. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/frontends/stata/.gitkeep +0 -0
  175. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/spss/__init__.py +0 -0
  176. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/spss/dictionary.py +0 -0
  177. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/spss/raw_dictionary.py +0 -0
  178. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/spss/sav.py +0 -0
  179. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/__init__.py +0 -0
  180. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/capabilities.py +0 -0
  181. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/catalog_api.py +0 -0
  182. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/catalog_verification.py +0 -0
  183. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/database_urls.py +0 -0
  184. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/dolt_conformance.py +0 -0
  185. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/normative.py +0 -0
  186. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/profiles.py +0 -0
  187. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/wide.py +0 -0
  188. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/sql/workflow.py +0 -0
  189. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/transform/__init__.py +0 -0
  190. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/transform/errors.py +0 -0
  191. {openstatspec-0.8.1 → openstatspec-0.9.0}/src/openstatspec/transform/validation.py +0 -0
  192. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/conformance.py +0 -0
  193. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_atomic_import.py +0 -0
  194. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_attribute_catalog.py +0 -0
  195. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_catalog_lifecycle.py +0 -0
  196. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_catalog_persistence_review.py +0 -0
  197. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_document_round_trip.py +0 -0
  198. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_dolt_conformance.py +0 -0
  199. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_loss_reports.py +0 -0
  200. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_normative_catalog.py +0 -0
  201. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_official_conformance.py +0 -0
  202. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_pyspssio_catalog_authority.py +0 -0
  203. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_read_only_export.py +0 -0
  204. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_release_ref.py +0 -0
  205. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_review_transaction_boundary.py +0 -0
  206. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_sav_sqlite.py +0 -0
  207. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_spss_catalog_preflight.py +0 -0
  208. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_sql_profiles.py +0 -0
  209. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_sql_workflow.py +0 -0
  210. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_strict_catalog_review.py +0 -0
  211. {openstatspec-0.8.1 → openstatspec-0.9.0}/tests/test_vls_compatible_names.py +0 -0
@@ -2,6 +2,43 @@
2
2
 
3
3
  All notable changes to this reference implementation are documented here.
4
4
 
5
+ ## 0.9.0 - 2026-09-10
6
+
7
+ This minor release adds the explicitly selected optional official SPSS Frontend
8
+ 0.3 and changes emitted Python schema-extension identifiers. Older readers cannot
9
+ load the new IDs; upgrade consumers before using new compiler output.
10
+
11
+ ### Added
12
+
13
+ - Implement explicitly selected official SPSS Frontend 0.3 over unchanged
14
+ Plan 0.1/0.2 through the shared parser/binder, with a strict
15
+ `compile_spss_request` boundary and opt-in live apply provenance. Support
16
+ comments, dictionary-order `TO`, grouped commands, finite open RECODE ranges,
17
+ additive ordered typed labels, inequality aliases, and canonical NOT lowering.
18
+ Precedence is comparisons → NOT → AND → OR; parentheses override it.
19
+ Tests cover all 90 effective normative cases plus request boundaries and
20
+ in-place SQLite identity/metadata/audit/no-artifact checks. Default APIs and
21
+ Python extension support/rejections remain unchanged.
22
+
23
+ ### Fixed
24
+
25
+ - Namespace new Python schema-change plans and SPSS output as
26
+ `openstatspec-python-schema-change-plan-v0.1` and
27
+ `openstatspec-python-schema-change-spss-v0.1`, retaining exported constant names.
28
+ The former `openstatspec-transformation-plan-v0.3` remains accepted as a
29
+ legacy Python extension with unchanged semantics, canonical JSON, and hashes;
30
+ stored audits are not migrated. New compilation changes schema-plan hashes.
31
+ - Clarify that specification `v0.5.0` has no official Plan 0.3. Its syntax-only
32
+ Frontend 0.3 over Plan 0.1/0.2 is separate from Python schema extensions.
33
+ Legacy acceptance and Python extension tests do not claim official conformance.
34
+ See [compatibility and migration](docs/transformations.md#contract-ownership-and-legacy-compatibility).
35
+
36
+ The specification remains pinned to released `v0.5.0` at exact commit
37
+ `864e84479f554b8ee250ffed44c4dfb963750d4a`; the required SPSS codec remains
38
+ `openstatspec-pyspssio==0.5.1.post2`. No catalog migration, dependency change,
39
+ new database support, or optional Transformation Workflow 0.3 implementation
40
+ is included.
41
+
5
42
  ## 0.8.1 - 2026-09-10
6
43
 
7
44
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: openstatspec
3
- Version: 0.8.1
3
+ Version: 0.9.0
4
4
  Summary: Reference adapter for the OpenStatSpec relational contract
5
5
  Author: OpenStatSpec
6
6
  License: Apache-2.0
@@ -23,10 +23,11 @@ The reference Python implementation of the OpenStatSpec specification.
23
23
 
24
24
  This package implements the specification; it does not define or extend it.
25
25
  The normative model lives in the `OpenStatSpec/specification` repository.
26
- Python 0.8.1 pins released specification `v0.5.0` at
26
+ Python 0.9.0 pins released specification `v0.5.0` at
27
27
  `864e84479f554b8ee250ffed44c4dfb963750d4a` and selects SAV/ZSAV 1.0 with
28
- `database_io_policy=openstatspec-database-io-v1`. This does not claim
29
- implementation of the optional Transformation Workflow 0.3 profile.
28
+ `database_io_policy=openstatspec-database-io-v1`. It implements the explicitly
29
+ selected optional official SPSS Frontend 0.3 over unchanged Plan 0.1/0.2, not
30
+ the separate optional Transformation Workflow 0.3 profile.
30
31
 
31
32
  ## Boundaries
32
33
 
@@ -105,6 +106,15 @@ target before assignment. Dolt requires the caller's exact clean branch/HEAD,
105
106
  leaves success as an inspectable working-set diff, and never calls
106
107
  `DOLT_COMMIT`.
107
108
 
109
+ Explicitly select official Frontend 0.3 with `compile_spss_request`, or pass
110
+ `frontend_contract="openstatspec-spss-syntax-frontend-v0.3"` to the typed compiler
111
+ or in-place API. Default APIs and the CLI retain their compatibility behavior;
112
+ `STRING` and `DELETE VARIABLES` remain Python extensions, not official 0.3.
113
+ New schema-changing output uses Python-owned IDs that older readers cannot load.
114
+ Upgrade consumers first; legacy plans retain their canonical JSON and hashes,
115
+ and stored audits are not migrated. Recompiling schema-changing syntax changes
116
+ its plan hash. See [compatibility and migration](docs/transformations.md#contract-ownership-and-legacy-compatibility).
117
+
108
118
  See the [dataset transformations manual](docs/transformations.md) for schema
109
119
  installation, Python and CLI surfaces, database invariants, audit provenance,
110
120
  package layout, and extension guidance. Stata and SAS are unimplemented
@@ -4,10 +4,11 @@ The reference Python implementation of the OpenStatSpec specification.
4
4
 
5
5
  This package implements the specification; it does not define or extend it.
6
6
  The normative model lives in the `OpenStatSpec/specification` repository.
7
- Python 0.8.1 pins released specification `v0.5.0` at
7
+ Python 0.9.0 pins released specification `v0.5.0` at
8
8
  `864e84479f554b8ee250ffed44c4dfb963750d4a` and selects SAV/ZSAV 1.0 with
9
- `database_io_policy=openstatspec-database-io-v1`. This does not claim
10
- implementation of the optional Transformation Workflow 0.3 profile.
9
+ `database_io_policy=openstatspec-database-io-v1`. It implements the explicitly
10
+ selected optional official SPSS Frontend 0.3 over unchanged Plan 0.1/0.2, not
11
+ the separate optional Transformation Workflow 0.3 profile.
11
12
 
12
13
  ## Boundaries
13
14
 
@@ -86,6 +87,15 @@ target before assignment. Dolt requires the caller's exact clean branch/HEAD,
86
87
  leaves success as an inspectable working-set diff, and never calls
87
88
  `DOLT_COMMIT`.
88
89
 
90
+ Explicitly select official Frontend 0.3 with `compile_spss_request`, or pass
91
+ `frontend_contract="openstatspec-spss-syntax-frontend-v0.3"` to the typed compiler
92
+ or in-place API. Default APIs and the CLI retain their compatibility behavior;
93
+ `STRING` and `DELETE VARIABLES` remain Python extensions, not official 0.3.
94
+ New schema-changing output uses Python-owned IDs that older readers cannot load.
95
+ Upgrade consumers first; legacy plans retain their canonical JSON and hashes,
96
+ and stored audits are not migrated. Recompiling schema-changing syntax changes
97
+ its plan hash. See [compatibility and migration](docs/transformations.md#contract-ownership-and-legacy-compatibility).
98
+
89
99
  See the [dataset transformations manual](docs/transformations.md) for schema
90
100
  installation, Python and CLI surfaces, database invariants, audit provenance,
91
101
  package layout, and extension guidance. Stata and SAS are unimplemented
@@ -1,16 +1,22 @@
1
- # 0.8.1 release readiness
1
+ # 0.9.0 release readiness
2
2
 
3
3
  This page records the expected release contract, not a publication event.
4
4
  Creating a version tag remains a separate maintainer action.
5
5
 
6
- ## Patch scope
7
-
8
- Version 0.8.1 includes the merged metadata-integrity, consistent-read-snapshot,
9
- row-copy, transformation-planning and SQLite workflow fixes described in the
10
- [release notes](../CHANGELOG.md). It introduces no catalog
11
- migration, dependency change, new database support or specification pin update.
12
- The local 0.8.0 evidence below is historical, not verification of this patch.
13
- Re-run the gates below on the exact selected 0.8.1 release commit.
6
+ ## Minor release scope
7
+
8
+ Version 0.9.0, dated 2026-09-10, adds explicitly selected official SPSS Frontend
9
+ 0.3 over unchanged Plan 0.1/0.2 and namespaces new Python schema-extension
10
+ output, as described in the [release notes](../CHANGELOG.md). The minor bump
11
+ reflects the optional frontend and old-reader incompatibility: upgrade consumers
12
+ before emitting the new Python IDs. Legacy plans retain their canonical JSON,
13
+ hashes and semantics; stored audits are not migrated. Recompiling schema-changing
14
+ syntax changes its plan hash. See [compatibility and migration](transformations.md#contract-ownership-and-legacy-compatibility).
15
+ There is no catalog migration, dependency change, new database support or
16
+ specification pin update. The required codec remains
17
+ `openstatspec-pyspssio==0.5.1.post2`.
18
+ The local 0.8.0/0.8.1 evidence below is historical, not verification of 0.9.0.
19
+ Re-run the gates below on the exact selected 0.9.0 release commit.
14
20
 
15
21
  The release selects SAV/ZSAV 1.0 with the optional Database I/O Execution
16
22
  Policy `openstatspec-database-io-v1`. Reads and exports, including failures,
@@ -78,11 +84,24 @@ machine-readable loss report with the export result.
78
84
 
79
85
  The canonical transformation core and SPSS syntax frontend are separate public
80
86
  surfaces. A release must run the specification-owned canonical-plan and SPSS
81
- frontend conformance fixtures, then exercise both the generic plan apply API
82
- and the SPSS compatibility apply path.
87
+ frontend conformance fixtures, including `tests/test_frontend_v03.py` with all
88
+ 90 effective official Frontend 0.3 cases (35 declared plus inherited cases with
89
+ published overrides/supersessions) from exact specification commit
90
+ `864e84479f554b8ee250ffed44c4dfb963750d4a`. Then exercise the generic plan apply
91
+ API, SPSS compatibility apply path, and explicitly selected official 0.3 apply.
92
+ Python schema-extension and legacy acceptance tests are separate compatibility
93
+ evidence, not official Plan 0.3 conformance; no official Plan 0.3 exists.
83
94
 
84
95
  The gate must prove that:
85
96
 
97
+ - official Frontend 0.3 requests preserve exact Plan 0.1/0.2 objects and hashes,
98
+ source hashes, diagnostics and declared metadata across all 90 effective cases;
99
+ - strict request boundaries reject invalid input, default API/CLI support and
100
+ rejections remain unchanged, and official 0.3 rejects Python schema extensions;
101
+ - explicit official 0.3 SQLite apply preserves data/metadata semantics, dataset
102
+ and table identity, audit provenance and the no-copy/no-history boundary;
103
+ - new Python schema-extension IDs are emitted while legacy plans preserve their
104
+ canonical JSON, hashes and supplied identifiers without rewriting audits;
86
105
  - a TransformationPlan object and its strict JSON mapping produce the same
87
106
  plan hash and in-place result;
88
107
  - the exact bounded `COMPUTE`/`IF` program compiles to all seven ordered
@@ -182,12 +201,43 @@ checkout, without configured database services:
182
201
  This is local candidate evidence, not final release-commit service CI or
183
202
  publication evidence. No v0.8.1 tag or registry upload was made by these checks.
184
203
 
204
+ ## 0.9.0 local preparation verification
205
+
206
+ Using `../python-release-081/.venv/bin/python` (Python 3.13.2), with
207
+ `PYTHONPATH=src` and
208
+ `OPENSTATSPEC_SPECIFICATION_DIR=/tmp/openstatspec-alignment-spec` at exact
209
+ `864e84479f554b8ee250ffed44c4dfb963750d4a`:
210
+
211
+ - The updated capability version assertion failed first on 0.8.1, then passed
212
+ on 0.9.0. Focused capability, release-ref and `test_frontend_v03.py` checks:
213
+ **169 passed**, including all **90 effective** official cases.
214
+ - `python -m pytest -p no:cacheprovider -m 'not services' -ra`:
215
+ **590 passed, 9 skipped, 55 deselected**. The skips require a live Dolt admin;
216
+ no database services were configured for this run.
217
+ - `python -m compileall -q src tests .github/verify_release_ref.py` and
218
+ `git diff --check` passed.
219
+ - `python -m build --outdir /tmp/openstatspec-v090-yhklqZ/dist .` and
220
+ `python -m twine check /tmp/openstatspec-v090-yhklqZ/dist/*` passed for the
221
+ 0.9.0 wheel and sdist.
222
+ - A fresh `/tmp/openstatspec-v090-yhklqZ/venv` installed that wheel with
223
+ dependencies from PyPI, including unchanged `openstatspec-pyspssio==0.5.1.post2`.
224
+ From `/tmp` with `PYTHONPATH` unset, CLI/API capabilities agreed on 0.9.0,
225
+ released v0.5.0 at the exact pin, and the database I/O policy. Core, frontend,
226
+ legacy compiler re-exports and codec imports came from `site-packages`.
227
+ An explicit official 0.3 comment/open-range RECODE request compiled to Plan
228
+ 0.1 without a database connection.
229
+
230
+ This is local preparation evidence, not final release-commit service CI or
231
+ publication evidence. No push, PR, tag or publication was performed.
232
+
185
233
  ## Maintainer release checklist
186
234
 
187
235
  1. Publish the pinned `openstatspec-pyspssio==0.5.1.post2` engine distribution
188
236
  first and confirm that a clean environment can download it from PyPI. The
189
237
  main package has no fallback SPSS engine.
190
- 2. Run `python -m pytest -m "not services"`.
238
+ 2. Run `python -m pytest -m "not services"`, including the 90 effective official
239
+ Frontend 0.3 cases in `tests/test_frontend_v03.py` and existing canonical-plan,
240
+ frontend, legacy compatibility and in-place suites.
191
241
  3. Confirm the GitHub Actions matrix is green for exact PostgreSQL 17.10/18.4,
192
242
  MySQL 8.4.11/9.7.2, MariaDB 11.4.12/11.8.8/12.3.2, and exact Dolt
193
243
  2.2.2/2.2.3 service evidence from the immutable image pins in CI. The Dolt
@@ -205,7 +255,9 @@ publication evidence. No v0.8.1 tag or registry upload was made by these checks.
205
255
  4. Build with `python -m build` and install the generated wheel in a clean
206
256
  environment, resolving `openstatspec-pyspssio==0.5.1.post2` from PyPI.
207
257
  Run the installed CLI outside the source checkout with `PYTHONPATH` unset;
208
- verify adapter version `0.8.1` and the selected database I/O policy.
258
+ verify adapter version `0.9.0`, the selected database I/O policy, public and
259
+ legacy imports, and a simple explicitly selected official 0.3 compilation
260
+ without a database connection.
209
261
  5. Confirm `openstatspec capabilities` reflects the intended support boundary.
210
262
  6. Confirm CI, release fixtures, and capabilities use the published OpenStatSpec
211
263
  specification `v0.5.0` at exact commit
@@ -213,16 +265,16 @@ publication evidence. No v0.8.1 tag or registry upload was made by these checks.
213
265
  `specification_status=released`, and set `specification_release` to `v0.5.0`.
214
266
  Use an exact checkout via `OPENSTATSPEC_SPECIFICATION_DIR` for local tests.
215
267
  7. Review this document, the README, and CHANGELOG for accurate scope. Finalize
216
- the 0.8.1 changelog date before selecting the final release commit.
268
+ the 0.9.0 changelog date as 2026-09-10 before selecting the final release commit.
217
269
  8. Confirm the exact release commit's CI matrix and package smoke passed, and
218
270
  verify the protected `pypi` environment and Trusted Publishing setup before
219
- pushing a new annotated/protected `v0.8.1` tag. A `v*` tag push starts the
271
+ pushing a new annotated/protected `v0.9.0` tag. A `v*` tag push starts the
220
272
  publishing workflow; it is not a preparation-only check. Do not move an
221
273
  existing tag. The workflow also rebuilds the unchanged specification companion
222
274
  package 0.1.0 at its existing pin and uses `skip-existing`; it does not release
223
275
  the newer specification validator changes.
224
276
  9. After publication, verify the tag resolves to the intended commit, the
225
- tag-triggered workflow succeeded, and PyPI installs `openstatspec==0.8.1` in a
277
+ tag-triggered workflow succeeded, and PyPI installs `openstatspec==0.9.0` in a
226
278
  clean environment. Record the tag, CI and registry evidence before claiming
227
279
  the release is published.
228
280
 
@@ -30,6 +30,112 @@ This is a trust boundary. JSON plans must pass
30
30
  `transformation_plan_from_dict()` and live-schema validation before mutation;
31
31
  they are never treated as arbitrary SQL.
32
32
 
33
+ ## Contract ownership and legacy compatibility
34
+
35
+ Published OpenStatSpec `v0.5.0` defines Transformation Plan 0.1/0.2, not
36
+ Plan 0.3. Its optional SPSS Frontend 0.3 is a syntax-only expansion emitting
37
+ Plan 0.1/0.2, implemented through the explicit official request boundary below.
38
+
39
+ Explicit `create_variable` / `delete_variable` operations (including SPSS
40
+ `STRING` / `DELETE VARIABLES`) belong to a **Python extension**, not official
41
+ OpenStatSpec conformance. New schema-changing compilations emit:
42
+
43
+ - Plan: `openstatspec-python-schema-change-plan-v0.1`
44
+ - Frontend: `openstatspec-python-schema-change-spss-v0.1`
45
+
46
+ The exported names `TRANSFORMATION_PLAN_SCHEMA_CHANGE_CONTRACT` and
47
+ `SPSS_FRONTEND_SCHEMA_CHANGE_CONTRACT` remain unchanged; their values now use
48
+ these Python-owned identifiers. Plans without these explicit schema operations
49
+ retain their existing Plan 0.1/0.2 selection and default frontend identifier. Official
50
+ Plan 0.1/0.2 still reject explicit create/delete operations.
51
+
52
+ The loader and executor continue to accept the old Python plan identifier
53
+ `openstatspec-transformation-plan-v0.3` with its original operation semantics.
54
+ This is legacy compatibility, **not** recognition of an official Plan 0.3.
55
+ Loading, canonical serialization, hashing, and apply preserve the supplied
56
+ identifier; existing canonical JSON, hashes, and stored audits are not rewritten.
57
+ Historical `openstatspec-spss-syntax-frontend-v0.3` audit values described this
58
+ Python extension and are not evidence of official Frontend 0.3 conformance.
59
+
60
+ No database migration is needed. Consumers should accept the new extension IDs
61
+ before using new compiler output. Keep stored legacy plans and audits intact;
62
+ recompiling schema-changing syntax now produces a new plan identity/hash even
63
+ when its operations are identical. An intentional change of a saved plan's
64
+ contract likewise creates a new artifact with a new hash, not an audit migration.
65
+ Older adapter versions cannot load the new IDs.
66
+
67
+ ## Official Frontend 0.3
68
+
69
+ Use `openstatspec.compile_spss_request(request)` for the official JSON request
70
+ boundary. It accepts **only** `openstatspec-spss-syntax-frontend-v0.3`, with
71
+ exact required fields `contract`, `input_alias`, `input_schema`, and
72
+ `source_text`. Unknown fields, missing fields, wrong types, noncanonical or
73
+ nonfinite typed codes, ambiguous variable names, and mismatched label types
74
+ fail closed. Request-shape failures report `invalid_spss_request`; source
75
+ failures retain the normative diagnostics. It returns no partial compilation.
76
+
77
+ ```python
78
+ compilation = openstatspec.compile_spss_request({
79
+ "contract": "openstatspec-spss-syntax-frontend-v0.3",
80
+ "input_alias": "parent",
81
+ "input_schema": {"variables": [
82
+ {"name": "age", "storage_kind": "numeric"},
83
+ ]},
84
+ "source_text": "COMMENT finite ages. RECODE age (LOWEST THRU 17 = 0).",
85
+ })
86
+ ```
87
+
88
+ The ordered request dictionary accepts only `name`, `storage_kind`,
89
+ `variable_label`, ordered typed `value_labels`, `format_family`, `width`,
90
+ `decimals`, and `measurement_level`. In particular, `width`/`decimals` are
91
+ request field names, not `format_width`/`format_decimals`. Descriptive input
92
+ format metadata is preserved, including partial metadata and string formats;
93
+ `FORMATS` operations still accept only bounded numeric F formats. Physical
94
+ identifiers and Python `declared_string_width` are not request fields.
95
+
96
+ The same parser/binder implements command-boundary star and `COMMENT`
97
+ comments, non-nested block comments, dictionary-order inclusive `TO` ranges,
98
+ grouped recodes/labels/formats/levels, finite `LOWEST`/`HIGHEST` RECODE bounds,
99
+ `NE`/`<>`/`~=`, `NOT`, and `ADD VALUE LABELS`. `TO` cannot generate `INTO`
100
+ targets. Additive labels update an existing typed code at its ordinal and
101
+ append new codes in source order, using the preceding label state. Numeric
102
+ zero has positive-zero identity; string codes retain exact contents.
103
+ Comments remain in the LF-normalized source hash but emit no operation;
104
+ comment-only input is invalid. Python `STRING` and `DELETE VARIABLES` are
105
+ rejected under the official selector.
106
+
107
+ **Explicit implementation decision:** precedence is standard SPSS order,
108
+ comparisons → `NOT` → `AND` → `OR` (tightest first). Thus `NOT a = 1 AND
109
+ b = 1` means `(NOT (a = 1)) AND b = 1`, not negation of the conjunction.
110
+ Parentheses override precedence. Comparison complements and De Morgan lowering
111
+ preserve SQL UNKNOWN, and maximal same-operator nodes flatten in source order.
112
+ This decision has adapter regression tests; normative fixtures are unchanged.
113
+
114
+ Programs using only Plan 0.1 operations retain their exact Plan 0.1 object;
115
+ any Plan 0.2-only operation selects Plan 0.2. Both source and complete canonical
116
+ plan hashes remain independent. Official compilations record the 0.3 frontend
117
+ identifier regardless of output-plan version.
118
+
119
+ For typed-schema or live-database callers, explicitly pass
120
+ `frontend_contract="openstatspec-spss-syntax-frontend-v0.3"` to
121
+ `compile_spss_syntax` or `apply_spss_in_place`. The latter compiles against the
122
+ live schema within the existing transaction and records official frontend and
123
+ source/plan provenance. JSON callers should use `compile_spss_request` rather
124
+ than building a typed schema from untrusted fields. Omitting the selector
125
+ retains all old support, rejection behavior, and Python extension selection;
126
+ the existing CLI remains on that compatibility path.
127
+
128
+ Evidence: `tests/test_frontend_v03.py` runs the 35 declared and all 90 effective
129
+ cases from specification commit
130
+ `864e84479f554b8ee250ffed44c4dfb963750d4a`, applying only the published inherited
131
+ contract overrides and two comment supersessions. It checks exact Plan 0.1/0.2
132
+ objects/hashes, source hashes, diagnostics, and declared output metadata.
133
+ Local SQLite integration checks UNKNOWN, sequential data and metadata,
134
+ identity, audit provenance, and absence of copy/history artifacts. Existing
135
+ frontend, plan, and in-place suites remain in the gate. This is not new service
136
+ execution evidence: MySQL/MariaDB/Dolt provisioning restrictions and caller-owned
137
+ Dolt commits are unchanged.
138
+
33
139
  ## Install the audit schema
34
140
 
35
141
  Install the compact audit relation once before the first apply:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "openstatspec"
7
- version = "0.8.1"
7
+ version = "0.9.0"
8
8
  description = "Reference adapter for the OpenStatSpec relational contract"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -10,7 +10,7 @@ from .api import (
10
10
  remove_derived_physical_relation, retire_derived, validate, validate_derived,
11
11
  )
12
12
  from .core import CapabilityDeclaration, LossReport, UnsupportedOperationError
13
- from .frontends.spss import SpssFrontendCompilation, compile_spss_syntax
13
+ from .frontends.spss import SpssFrontendCompilation, compile_spss_syntax, compile_spss_request
14
14
  from .sql import DoltConformanceSource
15
15
  from .sql.workflow import TransformationError
16
16
  from .transform import (
@@ -37,7 +37,7 @@ __all__ = [
37
37
  "TransformationPlan", "TypedValue", "ValueLabel",
38
38
  "VariableDefinition", "VariableSchema", "transformation_plan_from_dict",
39
39
  "apply_spss_in_place", "apply_transformation_plan_in_place",
40
- "compile_spss_syntax", "install_in_place_transformation_schema",
40
+ "compile_spss_syntax", "compile_spss_request", "install_in_place_transformation_schema",
41
41
  "UnsupportedOperationError", "capabilities", "capability_matrix",
42
42
  "derive_sql_dataset", "dolt_state_snapshot", "execute_sql_transformation", "export_sav", "get_dataset",
43
43
  "import_sav", "initialize_catalog", "inspect", "list_datasets",
@@ -226,7 +226,8 @@ def derive_sql_dataset(*, database_url: Any, **options: Any) -> Mapping[str, Any
226
226
 
227
227
  def apply_spss_in_place(
228
228
  *, database_url: Any, dataset_id: str, source_text: str,
229
- actor: str, expected_branch: str | None = None,
229
+ actor: str, frontend_contract: str | None = None,
230
+ expected_branch: str | None = None,
230
231
  expected_head: str | None = None,
231
232
  dolt_conformance_source: DoltConformanceSource | None = None,
232
233
  ) -> Mapping[str, Any]:
@@ -239,6 +240,7 @@ def apply_spss_in_place(
239
240
  dataset_id=dataset_id,
240
241
  source_text=source_text,
241
242
  actor=actor,
243
+ frontend_contract=frontend_contract,
242
244
  expected_branch=expected_branch,
243
245
  expected_head=expected_head,
244
246
  dolt_conformance_source=dolt_conformance_source,
@@ -3,9 +3,11 @@
3
3
  from .binding import bind_spss_syntax
4
4
  from .compiler import (
5
5
  SPSS_FRONTEND_CONTRACT,
6
+ SPSS_FRONTEND_V03_CONTRACT,
6
7
  SPSS_FRONTEND_SCHEMA_CHANGE_CONTRACT,
7
8
  SpssFrontendCompilation,
8
9
  compile_spss_syntax,
10
+ compile_spss_request,
9
11
  )
10
12
  from .syntax import (
11
13
  SpssSyntaxProgram,
@@ -18,11 +20,13 @@ from .syntax import (
18
20
 
19
21
  __all__ = [
20
22
  "SPSS_FRONTEND_CONTRACT",
23
+ "SPSS_FRONTEND_V03_CONTRACT",
21
24
  "SPSS_FRONTEND_SCHEMA_CHANGE_CONTRACT",
22
25
  "SpssFrontendCompilation",
23
26
  "SpssSyntaxProgram",
24
27
  "bind_spss_syntax",
25
28
  "compile_spss_syntax",
29
+ "compile_spss_request",
26
30
  "normalize_spss_source",
27
31
  "parse_spss_syntax",
28
32
  "spss_source_hash",
@@ -24,7 +24,7 @@ from ...transform.validation import bind_transformation_plan
24
24
  from .syntax import (
25
25
  BooleanSyntax, ComparisonSyntax, ComputeCommandSyntax, ExecuteCommandSyntax,
26
26
  DeleteVariablesCommandSyntax, FormatsCommandSyntax, IfCommandSyntax,
27
- OperandSyntax, PredicateSyntax,
27
+ NotSyntax, OperandSyntax, PredicateSyntax, Token, VariableRangeSyntax,
28
28
  RecodeCommandSyntax, RecodeMatchSyntax, RecodeResultSyntax,
29
29
  SpssSyntaxProgram, SyntaxLiteral, ValueLabelsCommandSyntax,
30
30
  StringCommandSyntax, VariableLabelsCommandSyntax, VariableLevelCommandSyntax,
@@ -74,9 +74,16 @@ def _bind_operand(
74
74
 
75
75
 
76
76
  def _bind_predicate(
77
- syntax: PredicateSyntax, variables: list[VariableDefinition],
77
+ syntax: PredicateSyntax, variables: list[VariableDefinition], *, negated: bool = False,
78
78
  ) -> PredicateExpression:
79
+ if isinstance(syntax, NotSyntax):
80
+ return _bind_predicate(syntax.operand, variables, negated=not negated)
79
81
  if isinstance(syntax, ComparisonSyntax):
82
+ if syntax.operator == "ne" or (negated and syntax.operator == "="):
83
+ expanded = BooleanSyntax("or", tuple(
84
+ replace(syntax, operator=operator) for operator in ("<", ">")
85
+ ), syntax.span)
86
+ return _bind_predicate(expanded, variables, negated=negated and syntax.operator == "ne")
80
87
  left, left_type = _bind_operand(syntax.left, variables)
81
88
  right, right_type = _bind_operand(syntax.right, variables)
82
89
  if left_type != right_type:
@@ -91,19 +98,21 @@ def _bind_predicate(
91
98
  "Ordered comparisons require numeric operands.",
92
99
  span=syntax.span, operator=syntax.operator,
93
100
  )
94
- return ComparisonExpression(left, syntax.operator, right)
101
+ operator = ({"=": "=", "<": ">=", "<=": ">", ">": "<=", ">=": "<"}[syntax.operator] if negated else syntax.operator)
102
+ return ComparisonExpression(left, operator, right)
95
103
  assert isinstance(syntax, BooleanSyntax)
104
+ operator = ("or" if syntax.operator == "and" else "and") if negated else syntax.operator
96
105
  operands: list[PredicateExpression] = []
97
106
  for operand in syntax.operands:
98
- bound = _bind_predicate(operand, variables)
107
+ bound = _bind_predicate(operand, variables, negated=negated)
99
108
  if (
100
109
  isinstance(bound, BooleanExpression)
101
- and bound.operator == syntax.operator
110
+ and bound.operator == operator
102
111
  ):
103
112
  operands.extend(bound.operands)
104
113
  else:
105
114
  operands.append(bound)
106
- return BooleanExpression(syntax.operator, tuple(operands))
115
+ return BooleanExpression(operator, tuple(operands))
107
116
 
108
117
 
109
118
  def _assignment(
@@ -151,7 +160,7 @@ def _assignment(
151
160
 
152
161
 
153
162
  def _match(
154
- syntax: RecodeMatchSyntax, source: VariableDefinition,
163
+ syntax: RecodeMatchSyntax, source: VariableDefinition, *, official_v03: bool = False,
155
164
  ) -> RecodeMatch:
156
165
  expected = _expected_type(source.storage_kind)
157
166
  if syntax.kind == "system_missing":
@@ -172,7 +181,7 @@ def _match(
172
181
  )
173
182
  if lower.number() > upper.number():
174
183
  raise frontend_error(
175
- "invalid_numeric_range",
184
+ "invalid_variable_range" if official_v03 else "invalid_numeric_range",
176
185
  "THRU lower endpoint exceeds its upper endpoint.",
177
186
  span=syntax.span, variable=source.name,
178
187
  )
@@ -252,10 +261,12 @@ def _validate_recode_string_width(
252
261
 
253
262
 
254
263
  def _bind_recode(
255
- command: RecodeCommandSyntax, variables: list[VariableDefinition],
264
+ command: RecodeCommandSyntax, variables: list[VariableDefinition], *, official_v03: bool = False,
256
265
  ) -> tuple[list[RecodeOperation], list[SourceSpan]]:
257
266
  sources = [_resolve(variables, token.text, token.span)[1] for token in command.sources]
258
267
  targets = command.targets
268
+ if targets is not None and len(targets) != len(sources):
269
+ raise frontend_error("spss_syntax_error", "RECODE INTO requires one target per source.", span=command.span)
259
270
  target_mode: Literal["create", "replace"] = "create" if targets is not None else "replace"
260
271
  target_names = (
261
272
  [token.text for token in targets] if targets is not None
@@ -292,7 +303,7 @@ def _bind_recode(
292
303
  if clause.match.kind == "else":
293
304
  else_result = result
294
305
  continue
295
- rules.append(RecodeRule(_match(clause.match, source), result))
306
+ rules.append(RecodeRule(_match(clause.match, source, official_v03=official_v03), result))
296
307
  unmatched = else_result or RecodeResult(
297
308
  "system_missing" if target_mode == "create" else "copy"
298
309
  )
@@ -332,6 +343,28 @@ def _bind_recode(
332
343
  # replace intentionally preserves the existing variable metadata. A later
333
344
  # VALUE LABELS command replaces value labels explicitly.
334
345
  return operations, spans
346
+
347
+
348
+ def _expand_variables(
349
+ tokens: tuple[Token | VariableRangeSyntax, ...], variables: list[VariableDefinition],
350
+ ) -> tuple[Token, ...]:
351
+ expanded: list[Token] = []
352
+ for token in tokens:
353
+ if isinstance(token, VariableRangeSyntax):
354
+ first, _ = _resolve(variables, token.first.text, token.first.span)
355
+ last = first
356
+ for endpoint in (token.last, *token.continuations):
357
+ next_index, _ = _resolve(variables, endpoint.text, endpoint.span)
358
+ if last > next_index:
359
+ raise frontend_error("invalid_variable_range", "TO endpoints are reversed in dictionary order.", span=token.span)
360
+ last = next_index
361
+ expanded.extend(Token("identifier", v.name, v.name, token.span) for v in variables[first:last + 1])
362
+ else:
363
+ _resolve(variables, token.text, token.span)
364
+ expanded.append(token)
365
+ return tuple(expanded)
366
+
367
+
335
368
  def bind_spss_syntax(
336
369
  program: SpssSyntaxProgram, schema: VariableSchema, *, input_alias: str = "parent",
337
370
  ) -> BoundTransformation:
@@ -345,6 +378,22 @@ def bind_spss_syntax(
345
378
  operations: list[PlanOperation] = []
346
379
  spans: list[SourceSpan] = []
347
380
  for command in program.commands:
381
+ if program.official_v03:
382
+ if isinstance(command, (StringCommandSyntax, DeleteVariablesCommandSyntax)):
383
+ raise frontend_error("unsupported_spss_command", "Python schema commands are outside official Frontend 0.3.", span=command.span)
384
+ if isinstance(command, RecodeCommandSyntax):
385
+ command = replace(command, sources=_expand_variables(command.sources, variables))
386
+ elif isinstance(command, (FormatsCommandSyntax, VariableLevelCommandSyntax, VariableLabelsCommandSyntax)):
387
+ command = replace(command, assignments=tuple(
388
+ replace(assignment, variable=token)
389
+ for assignment in command.assignments
390
+ for token in _expand_variables((assignment.variable,), variables)
391
+ ))
392
+ elif isinstance(command, ValueLabelsCommandSyntax):
393
+ command = replace(command, groups=tuple(
394
+ replace(group, variables=_expand_variables(group.variables, variables))
395
+ for group in command.groups
396
+ ))
348
397
  if isinstance(command, StringCommandSyntax):
349
398
  for variable_token in command.variables:
350
399
  if variable_token.text.startswith("__"):
@@ -383,7 +432,7 @@ def bind_spss_syntax(
383
432
  del variables[index]
384
433
  continue
385
434
  if isinstance(command, RecodeCommandSyntax):
386
- recodes, recode_spans = _bind_recode(command, variables)
435
+ recodes, recode_spans = _bind_recode(command, variables, official_v03=program.official_v03)
387
436
  operations.extend(recodes)
388
437
  spans.extend(recode_spans)
389
438
  continue
@@ -515,6 +564,10 @@ def bind_spss_syntax(
515
564
  "VALUE LABELS contains duplicate canonical codes.",
516
565
  span=group.span, variable=variable.name,
517
566
  )
567
+ if command.additive:
568
+ merged = {label.value.canonical_key(): label for label in variable.value_labels}
569
+ merged.update((label.value.canonical_key(), label) for label in labels)
570
+ labels = tuple(merged.values())
518
571
  operation = ReplaceValueLabelsOperation(variable.name, labels)
519
572
  operations.append(operation)
520
573
  spans.append(group.span)