rivetsql 0.1.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 (625) hide show
  1. rivetsql-0.1.0/.gitignore +25 -0
  2. rivetsql-0.1.0/PKG-INFO +161 -0
  3. rivetsql-0.1.0/README.md +120 -0
  4. rivetsql-0.1.0/pyproject.rivetsql.toml +53 -0
  5. rivetsql-0.1.0/pyproject.toml +53 -0
  6. rivetsql-0.1.0/scripts/audit_dependencies.py +176 -0
  7. rivetsql-0.1.0/scripts/check_module_boundaries.py +96 -0
  8. rivetsql-0.1.0/scripts/find_dead_code.py +393 -0
  9. rivetsql-0.1.0/scripts/flag_stale_docs.py +82 -0
  10. rivetsql-0.1.0/src/rivet_aws/__init__.py +25 -0
  11. rivetsql-0.1.0/src/rivet_aws/credentials.py +278 -0
  12. rivetsql-0.1.0/src/rivet_aws/errors.py +101 -0
  13. rivetsql-0.1.0/src/rivet_aws/glue_catalog.py +645 -0
  14. rivetsql-0.1.0/src/rivet_aws/glue_sink.py +644 -0
  15. rivetsql-0.1.0/src/rivet_aws/glue_source.py +249 -0
  16. rivetsql-0.1.0/src/rivet_aws/glue_utils.py +5 -0
  17. rivetsql-0.1.0/src/rivet_aws/py.typed +0 -0
  18. rivetsql-0.1.0/src/rivet_aws/pyproject.toml +35 -0
  19. rivetsql-0.1.0/src/rivet_aws/s3_catalog.py +665 -0
  20. rivetsql-0.1.0/src/rivet_aws/s3_sink.py +353 -0
  21. rivetsql-0.1.0/src/rivet_aws/s3_source.py +211 -0
  22. rivetsql-0.1.0/src/rivet_bridge/__init__.py +28 -0
  23. rivetsql-0.1.0/src/rivet_bridge/builder.py +51 -0
  24. rivetsql-0.1.0/src/rivet_bridge/catalogs.py +62 -0
  25. rivetsql-0.1.0/src/rivet_bridge/converter.py +82 -0
  26. rivetsql-0.1.0/src/rivet_bridge/declarations.py +252 -0
  27. rivetsql-0.1.0/src/rivet_bridge/decomposer.py +114 -0
  28. rivetsql-0.1.0/src/rivet_bridge/engines.py +57 -0
  29. rivetsql-0.1.0/src/rivet_bridge/errors.py +51 -0
  30. rivetsql-0.1.0/src/rivet_bridge/forward.py +93 -0
  31. rivetsql-0.1.0/src/rivet_bridge/models.py +57 -0
  32. rivetsql-0.1.0/src/rivet_bridge/plugins.py +40 -0
  33. rivetsql-0.1.0/src/rivet_bridge/profiles.py +68 -0
  34. rivetsql-0.1.0/src/rivet_bridge/py.typed +0 -0
  35. rivetsql-0.1.0/src/rivet_bridge/reverse.py +74 -0
  36. rivetsql-0.1.0/src/rivet_bridge/roundtrip.py +95 -0
  37. rivetsql-0.1.0/src/rivet_bridge/sql_gen.py +65 -0
  38. rivetsql-0.1.0/src/rivet_bridge/upstream.py +49 -0
  39. rivetsql-0.1.0/src/rivet_cli/__init__.py +13 -0
  40. rivetsql-0.1.0/src/rivet_cli/app.py +470 -0
  41. rivetsql-0.1.0/src/rivet_cli/commands/__init__.py +1 -0
  42. rivetsql-0.1.0/src/rivet_cli/commands/catalog.py +366 -0
  43. rivetsql-0.1.0/src/rivet_cli/commands/catalog_create.py +966 -0
  44. rivetsql-0.1.0/src/rivet_cli/commands/compile.py +165 -0
  45. rivetsql-0.1.0/src/rivet_cli/commands/docs.py +294 -0
  46. rivetsql-0.1.0/src/rivet_cli/commands/doctor.py +622 -0
  47. rivetsql-0.1.0/src/rivet_cli/commands/explore.py +426 -0
  48. rivetsql-0.1.0/src/rivet_cli/commands/init.py +245 -0
  49. rivetsql-0.1.0/src/rivet_cli/commands/run.py +126 -0
  50. rivetsql-0.1.0/src/rivet_cli/commands/test.py +576 -0
  51. rivetsql-0.1.0/src/rivet_cli/commands/watermark.py +85 -0
  52. rivetsql-0.1.0/src/rivet_cli/docs/__init__.py +1 -0
  53. rivetsql-0.1.0/src/rivet_cli/docs/extractors/__init__.py +1 -0
  54. rivetsql-0.1.0/src/rivet_cli/docs/extractors/api_extractor.py +419 -0
  55. rivetsql-0.1.0/src/rivet_cli/docs/extractors/architecture.py +201 -0
  56. rivetsql-0.1.0/src/rivet_cli/docs/extractors/cli_extractor.py +109 -0
  57. rivetsql-0.1.0/src/rivet_cli/docs/extractors/config_extractor.py +143 -0
  58. rivetsql-0.1.0/src/rivet_cli/docs/extractors/dag_extractor.py +73 -0
  59. rivetsql-0.1.0/src/rivet_cli/docs/extractors/error_extractor.py +147 -0
  60. rivetsql-0.1.0/src/rivet_cli/docs/extractors/plugin_extractor.py +222 -0
  61. rivetsql-0.1.0/src/rivet_cli/docs/extractors/user_guides.py +288 -0
  62. rivetsql-0.1.0/src/rivet_cli/docs/models.py +107 -0
  63. rivetsql-0.1.0/src/rivet_cli/docs/renderers/__init__.py +1 -0
  64. rivetsql-0.1.0/src/rivet_cli/docs/renderers/html_renderer.py +197 -0
  65. rivetsql-0.1.0/src/rivet_cli/docs/renderers/markdown_renderer.py +124 -0
  66. rivetsql-0.1.0/src/rivet_cli/docs/validators/__init__.py +1 -0
  67. rivetsql-0.1.0/src/rivet_cli/docs/validators/coverage.py +90 -0
  68. rivetsql-0.1.0/src/rivet_cli/docs/validators/freshness.py +111 -0
  69. rivetsql-0.1.0/src/rivet_cli/errors.py +60 -0
  70. rivetsql-0.1.0/src/rivet_cli/exit_codes.py +28 -0
  71. rivetsql-0.1.0/src/rivet_cli/metrics.py +34 -0
  72. rivetsql-0.1.0/src/rivet_cli/py.typed +0 -0
  73. rivetsql-0.1.0/src/rivet_cli/rendering/__init__.py +1 -0
  74. rivetsql-0.1.0/src/rivet_cli/rendering/catalog_json.py +86 -0
  75. rivetsql-0.1.0/src/rivet_cli/rendering/catalog_text.py +230 -0
  76. rivetsql-0.1.0/src/rivet_cli/rendering/colors.py +26 -0
  77. rivetsql-0.1.0/src/rivet_cli/rendering/doctor_text.py +61 -0
  78. rivetsql-0.1.0/src/rivet_cli/rendering/explore_terminal.py +295 -0
  79. rivetsql-0.1.0/src/rivet_cli/rendering/formatter.py +518 -0
  80. rivetsql-0.1.0/src/rivet_cli/rendering/json_out.py +34 -0
  81. rivetsql-0.1.0/src/rivet_cli/rendering/mermaid.py +58 -0
  82. rivetsql-0.1.0/src/rivet_cli/rendering/run_text.py +171 -0
  83. rivetsql-0.1.0/src/rivet_cli/rendering/test_text.py +154 -0
  84. rivetsql-0.1.0/src/rivet_cli/rendering/visual.py +11 -0
  85. rivetsql-0.1.0/src/rivet_cli/repl/__init__.py +146 -0
  86. rivetsql-0.1.0/src/rivet_cli/repl/accessibility.py +59 -0
  87. rivetsql-0.1.0/src/rivet_cli/repl/app.py +1159 -0
  88. rivetsql-0.1.0/src/rivet_cli/repl/catalog_cache.py +131 -0
  89. rivetsql-0.1.0/src/rivet_cli/repl/config.py +87 -0
  90. rivetsql-0.1.0/src/rivet_cli/repl/editor_cache.py +105 -0
  91. rivetsql-0.1.0/src/rivet_cli/repl/errors.py +83 -0
  92. rivetsql-0.1.0/src/rivet_cli/repl/file_watcher.py +183 -0
  93. rivetsql-0.1.0/src/rivet_cli/repl/keymap.py +244 -0
  94. rivetsql-0.1.0/src/rivet_cli/repl/screens/__init__.py +1 -0
  95. rivetsql-0.1.0/src/rivet_cli/repl/screens/command_palette.py +236 -0
  96. rivetsql-0.1.0/src/rivet_cli/repl/screens/debug.py +312 -0
  97. rivetsql-0.1.0/src/rivet_cli/repl/screens/dialect_selector.py +86 -0
  98. rivetsql-0.1.0/src/rivet_cli/repl/screens/engine_selector.py +78 -0
  99. rivetsql-0.1.0/src/rivet_cli/repl/screens/error_modal.py +146 -0
  100. rivetsql-0.1.0/src/rivet_cli/repl/screens/export.py +226 -0
  101. rivetsql-0.1.0/src/rivet_cli/repl/screens/help.py +123 -0
  102. rivetsql-0.1.0/src/rivet_cli/repl/screens/history.py +116 -0
  103. rivetsql-0.1.0/src/rivet_cli/repl/screens/profile_selector.py +182 -0
  104. rivetsql-0.1.0/src/rivet_cli/repl/screens/test_results.py +257 -0
  105. rivetsql-0.1.0/src/rivet_cli/repl/themes/__init__.py +73 -0
  106. rivetsql-0.1.0/src/rivet_cli/repl/themes/high_contrast.tcss +448 -0
  107. rivetsql-0.1.0/src/rivet_cli/repl/themes/rivet.tcss +371 -0
  108. rivetsql-0.1.0/src/rivet_cli/repl/themes/rivet_light.tcss +371 -0
  109. rivetsql-0.1.0/src/rivet_cli/repl/widgets/__init__.py +1 -0
  110. rivetsql-0.1.0/src/rivet_cli/repl/widgets/catalog.py +635 -0
  111. rivetsql-0.1.0/src/rivet_cli/repl/widgets/command_input.py +285 -0
  112. rivetsql-0.1.0/src/rivet_cli/repl/widgets/compilation_view.py +173 -0
  113. rivetsql-0.1.0/src/rivet_cli/repl/widgets/editor.py +836 -0
  114. rivetsql-0.1.0/src/rivet_cli/repl/widgets/footer.py +151 -0
  115. rivetsql-0.1.0/src/rivet_cli/repl/widgets/logs_view.py +191 -0
  116. rivetsql-0.1.0/src/rivet_cli/repl/widgets/progress_indicator.py +128 -0
  117. rivetsql-0.1.0/src/rivet_cli/repl/widgets/results.py +1054 -0
  118. rivetsql-0.1.0/src/rivet_cli/repl/widgets/results_tab_bar.py +134 -0
  119. rivetsql-0.1.0/src/rivet_cli/repl/widgets/splitter.py +133 -0
  120. rivetsql-0.1.0/src/rivet_cli/repl/widgets/status_bar.py +707 -0
  121. rivetsql-0.1.0/src/rivet_config/__init__.py +126 -0
  122. rivetsql-0.1.0/src/rivet_config/annotations.py +83 -0
  123. rivetsql-0.1.0/src/rivet_config/declarations.py +252 -0
  124. rivetsql-0.1.0/src/rivet_config/env.py +92 -0
  125. rivetsql-0.1.0/src/rivet_config/errors.py +21 -0
  126. rivetsql-0.1.0/src/rivet_config/manifest.py +115 -0
  127. rivetsql-0.1.0/src/rivet_config/models.py +146 -0
  128. rivetsql-0.1.0/src/rivet_config/profiles.py +271 -0
  129. rivetsql-0.1.0/src/rivet_config/py.typed +0 -0
  130. rivetsql-0.1.0/src/rivet_config/python_parser.py +244 -0
  131. rivetsql-0.1.0/src/rivet_config/quality.py +335 -0
  132. rivetsql-0.1.0/src/rivet_config/sql_parser.py +234 -0
  133. rivetsql-0.1.0/src/rivet_config/yaml_parser.py +220 -0
  134. rivetsql-0.1.0/src/rivet_core/__init__.py +67 -0
  135. rivetsql-0.1.0/src/rivet_core/assembly.py +223 -0
  136. rivetsql-0.1.0/src/rivet_core/builtins/__init__.py +1 -0
  137. rivetsql-0.1.0/src/rivet_core/builtins/arrow_catalog.py +263 -0
  138. rivetsql-0.1.0/src/rivet_core/builtins/filesystem_catalog.py +352 -0
  139. rivetsql-0.1.0/src/rivet_core/catalog_explorer.py +871 -0
  140. rivetsql-0.1.0/src/rivet_core/checks.py +72 -0
  141. rivetsql-0.1.0/src/rivet_core/compiler.py +1252 -0
  142. rivetsql-0.1.0/src/rivet_core/context.py +22 -0
  143. rivetsql-0.1.0/src/rivet_core/credentials.py +24 -0
  144. rivetsql-0.1.0/src/rivet_core/errors.py +106 -0
  145. rivetsql-0.1.0/src/rivet_core/executor.py +1748 -0
  146. rivetsql-0.1.0/src/rivet_core/glue_utils.py +81 -0
  147. rivetsql-0.1.0/src/rivet_core/interactive/__init__.py +109 -0
  148. rivetsql-0.1.0/src/rivet_core/interactive/assembly_formatter.py +664 -0
  149. rivetsql-0.1.0/src/rivet_core/interactive/catalog_search.py +173 -0
  150. rivetsql-0.1.0/src/rivet_core/interactive/completions.py +509 -0
  151. rivetsql-0.1.0/src/rivet_core/interactive/differ.py +134 -0
  152. rivetsql-0.1.0/src/rivet_core/interactive/exporter.py +70 -0
  153. rivetsql-0.1.0/src/rivet_core/interactive/formatter.py +91 -0
  154. rivetsql-0.1.0/src/rivet_core/interactive/history.py +97 -0
  155. rivetsql-0.1.0/src/rivet_core/interactive/log_buffer.py +49 -0
  156. rivetsql-0.1.0/src/rivet_core/interactive/material_cache.py +38 -0
  157. rivetsql-0.1.0/src/rivet_core/interactive/profiler.py +182 -0
  158. rivetsql-0.1.0/src/rivet_core/interactive/query_planner.py +280 -0
  159. rivetsql-0.1.0/src/rivet_core/interactive/session.py +1059 -0
  160. rivetsql-0.1.0/src/rivet_core/interactive/sql_preprocessor.py +563 -0
  161. rivetsql-0.1.0/src/rivet_core/interactive/types.py +429 -0
  162. rivetsql-0.1.0/src/rivet_core/introspection.py +108 -0
  163. rivetsql-0.1.0/src/rivet_core/lineage.py +111 -0
  164. rivetsql-0.1.0/src/rivet_core/logging.py +117 -0
  165. rivetsql-0.1.0/src/rivet_core/metrics.py +134 -0
  166. rivetsql-0.1.0/src/rivet_core/models.py +214 -0
  167. rivetsql-0.1.0/src/rivet_core/optimizer.py +680 -0
  168. rivetsql-0.1.0/src/rivet_core/plugins.py +469 -0
  169. rivetsql-0.1.0/src/rivet_core/py.typed +0 -0
  170. rivetsql-0.1.0/src/rivet_core/sql_parser.py +802 -0
  171. rivetsql-0.1.0/src/rivet_core/strategies.py +134 -0
  172. rivetsql-0.1.0/src/rivet_core/testing/__init__.py +15 -0
  173. rivetsql-0.1.0/src/rivet_core/testing/comparison.py +248 -0
  174. rivetsql-0.1.0/src/rivet_core/testing/fixtures.py +212 -0
  175. rivetsql-0.1.0/src/rivet_core/testing/models.py +54 -0
  176. rivetsql-0.1.0/src/rivet_core/watermark.py +46 -0
  177. rivetsql-0.1.0/src/rivet_core/write_strategies.py +30 -0
  178. rivetsql-0.1.0/src/rivet_databricks/__init__.py +55 -0
  179. rivetsql-0.1.0/src/rivet_databricks/adapters/__init__.py +1 -0
  180. rivetsql-0.1.0/src/rivet_databricks/adapters/duckdb.py +446 -0
  181. rivetsql-0.1.0/src/rivet_databricks/adapters/unity.py +341 -0
  182. rivetsql-0.1.0/src/rivet_databricks/auth.py +294 -0
  183. rivetsql-0.1.0/src/rivet_databricks/client.py +194 -0
  184. rivetsql-0.1.0/src/rivet_databricks/databricks_catalog.py +279 -0
  185. rivetsql-0.1.0/src/rivet_databricks/databricks_cross_joint.py +60 -0
  186. rivetsql-0.1.0/src/rivet_databricks/databricks_sink.py +457 -0
  187. rivetsql-0.1.0/src/rivet_databricks/databricks_source.py +223 -0
  188. rivetsql-0.1.0/src/rivet_databricks/engine.py +570 -0
  189. rivetsql-0.1.0/src/rivet_databricks/py.typed +0 -0
  190. rivetsql-0.1.0/src/rivet_databricks/pyproject.toml +38 -0
  191. rivetsql-0.1.0/src/rivet_databricks/unity_catalog.py +490 -0
  192. rivetsql-0.1.0/src/rivet_databricks/unity_sink.py +315 -0
  193. rivetsql-0.1.0/src/rivet_databricks/unity_source.py +198 -0
  194. rivetsql-0.1.0/src/rivet_duckdb/__init__.py +48 -0
  195. rivetsql-0.1.0/src/rivet_duckdb/adapters/__init__.py +1 -0
  196. rivetsql-0.1.0/src/rivet_duckdb/adapters/glue.py +316 -0
  197. rivetsql-0.1.0/src/rivet_duckdb/adapters/pushdown.py +71 -0
  198. rivetsql-0.1.0/src/rivet_duckdb/adapters/s3.py +261 -0
  199. rivetsql-0.1.0/src/rivet_duckdb/adapters/unity.py +383 -0
  200. rivetsql-0.1.0/src/rivet_duckdb/catalog.py +246 -0
  201. rivetsql-0.1.0/src/rivet_duckdb/engine.py +299 -0
  202. rivetsql-0.1.0/src/rivet_duckdb/extensions.py +69 -0
  203. rivetsql-0.1.0/src/rivet_duckdb/filesystem_sink.py +253 -0
  204. rivetsql-0.1.0/src/rivet_duckdb/py.typed +0 -0
  205. rivetsql-0.1.0/src/rivet_duckdb/pyproject.toml +34 -0
  206. rivetsql-0.1.0/src/rivet_duckdb/sink.py +295 -0
  207. rivetsql-0.1.0/src/rivet_duckdb/source.py +106 -0
  208. rivetsql-0.1.0/src/rivet_polars/__init__.py +38 -0
  209. rivetsql-0.1.0/src/rivet_polars/adapters/__init__.py +1 -0
  210. rivetsql-0.1.0/src/rivet_polars/adapters/glue.py +359 -0
  211. rivetsql-0.1.0/src/rivet_polars/adapters/pushdown.py +94 -0
  212. rivetsql-0.1.0/src/rivet_polars/adapters/s3.py +246 -0
  213. rivetsql-0.1.0/src/rivet_polars/adapters/unity.py +422 -0
  214. rivetsql-0.1.0/src/rivet_polars/engine.py +235 -0
  215. rivetsql-0.1.0/src/rivet_polars/py.typed +0 -0
  216. rivetsql-0.1.0/src/rivet_polars/pyproject.toml +37 -0
  217. rivetsql-0.1.0/src/rivet_postgres/__init__.py +42 -0
  218. rivetsql-0.1.0/src/rivet_postgres/adapters/__init__.py +1 -0
  219. rivetsql-0.1.0/src/rivet_postgres/adapters/duckdb.py +279 -0
  220. rivetsql-0.1.0/src/rivet_postgres/adapters/pyspark.py +305 -0
  221. rivetsql-0.1.0/src/rivet_postgres/catalog.py +343 -0
  222. rivetsql-0.1.0/src/rivet_postgres/cross_joint.py +48 -0
  223. rivetsql-0.1.0/src/rivet_postgres/engine.py +325 -0
  224. rivetsql-0.1.0/src/rivet_postgres/errors.py +84 -0
  225. rivetsql-0.1.0/src/rivet_postgres/py.typed +0 -0
  226. rivetsql-0.1.0/src/rivet_postgres/pyproject.toml +37 -0
  227. rivetsql-0.1.0/src/rivet_postgres/sink.py +525 -0
  228. rivetsql-0.1.0/src/rivet_postgres/source.py +137 -0
  229. rivetsql-0.1.0/src/rivet_pyspark/__init__.py +40 -0
  230. rivetsql-0.1.0/src/rivet_pyspark/adapters/__init__.py +1 -0
  231. rivetsql-0.1.0/src/rivet_pyspark/adapters/_detection.py +60 -0
  232. rivetsql-0.1.0/src/rivet_pyspark/adapters/glue.py +217 -0
  233. rivetsql-0.1.0/src/rivet_pyspark/adapters/pushdown.py +65 -0
  234. rivetsql-0.1.0/src/rivet_pyspark/adapters/s3.py +245 -0
  235. rivetsql-0.1.0/src/rivet_pyspark/adapters/unity.py +328 -0
  236. rivetsql-0.1.0/src/rivet_pyspark/engine.py +298 -0
  237. rivetsql-0.1.0/src/rivet_pyspark/py.typed +0 -0
  238. rivetsql-0.1.0/src/rivet_pyspark/pyproject.toml +34 -0
  239. rivetsql-0.1.0/tests/__init__.py +1 -0
  240. rivetsql-0.1.0/tests/aws/__init__.py +0 -0
  241. rivetsql-0.1.0/tests/aws/test_aws_credentials.py +413 -0
  242. rivetsql-0.1.0/tests/aws/test_aws_error_mapping.py +423 -0
  243. rivetsql-0.1.0/tests/aws/test_aws_plugin_registration_verify_12_1.py +104 -0
  244. rivetsql-0.1.0/tests/aws/test_connection_failure_handling.py +256 -0
  245. rivetsql-0.1.0/tests/aws/test_credential_caching_property.py +144 -0
  246. rivetsql-0.1.0/tests/aws/test_credential_resolution_order_property.py +185 -0
  247. rivetsql-0.1.0/tests/aws/test_end_to_end_plugin_registration_12_2.py +261 -0
  248. rivetsql-0.1.0/tests/aws/test_error_payload_structure_property.py +101 -0
  249. rivetsql-0.1.0/tests/aws/test_explicit_region_property.py +120 -0
  250. rivetsql-0.1.0/tests/aws/test_glue_catalog_plugin.py +885 -0
  251. rivetsql-0.1.0/tests/aws/test_glue_list_children_hierarchy_property.py +154 -0
  252. rivetsql-0.1.0/tests/aws/test_glue_partition_metadata_consistency_property.py +105 -0
  253. rivetsql-0.1.0/tests/aws/test_glue_schema_consistency_property.py +176 -0
  254. rivetsql-0.1.0/tests/aws/test_glue_sink_plugin.py +791 -0
  255. rivetsql-0.1.0/tests/aws/test_glue_sink_write_strategy_property.py +46 -0
  256. rivetsql-0.1.0/tests/aws/test_glue_source_plugin.py +369 -0
  257. rivetsql-0.1.0/tests/aws/test_glue_utils.py +130 -0
  258. rivetsql-0.1.0/tests/aws/test_import_boundary_property.py +114 -0
  259. rivetsql-0.1.0/tests/aws/test_merge_scd2_requires_delta_property.py +56 -0
  260. rivetsql-0.1.0/tests/aws/test_s3_catalog_plugin.py +706 -0
  261. rivetsql-0.1.0/tests/aws/test_s3_default_table_reference_property.py +73 -0
  262. rivetsql-0.1.0/tests/aws/test_s3_invalid_format_property.py +29 -0
  263. rivetsql-0.1.0/tests/aws/test_s3_list_children_property.py +217 -0
  264. rivetsql-0.1.0/tests/aws/test_s3_parquet_schema_roundtrip_property.py +127 -0
  265. rivetsql-0.1.0/tests/aws/test_s3_partition_metadata_property.py +221 -0
  266. rivetsql-0.1.0/tests/aws/test_s3_sink_plugin.py +441 -0
  267. rivetsql-0.1.0/tests/aws/test_s3_sink_write_strategy_property.py +52 -0
  268. rivetsql-0.1.0/tests/aws/test_s3_source_plugin.py +326 -0
  269. rivetsql-0.1.0/tests/aws/test_schema_roundtrip.py +335 -0
  270. rivetsql-0.1.0/tests/bridge/__init__.py +1 -0
  271. rivetsql-0.1.0/tests/bridge/conftest.py +65 -0
  272. rivetsql-0.1.0/tests/bridge/test_builder.py +104 -0
  273. rivetsql-0.1.0/tests/bridge/test_catalogs.py +115 -0
  274. rivetsql-0.1.0/tests/bridge/test_converter.py +257 -0
  275. rivetsql-0.1.0/tests/bridge/test_declarations.py +421 -0
  276. rivetsql-0.1.0/tests/bridge/test_decomposer.py +127 -0
  277. rivetsql-0.1.0/tests/bridge/test_engines.py +139 -0
  278. rivetsql-0.1.0/tests/bridge/test_errors.py +506 -0
  279. rivetsql-0.1.0/tests/bridge/test_forward.py +517 -0
  280. rivetsql-0.1.0/tests/bridge/test_models.py +214 -0
  281. rivetsql-0.1.0/tests/bridge/test_profiles.py +134 -0
  282. rivetsql-0.1.0/tests/bridge/test_reverse.py +145 -0
  283. rivetsql-0.1.0/tests/bridge/test_roundtrip.py +408 -0
  284. rivetsql-0.1.0/tests/bridge/test_samples.py +432 -0
  285. rivetsql-0.1.0/tests/bridge/test_sql_gen.py +195 -0
  286. rivetsql-0.1.0/tests/bridge/test_upstream.py +116 -0
  287. rivetsql-0.1.0/tests/cli/__init__.py +1 -0
  288. rivetsql-0.1.0/tests/cli/conftest.py +17 -0
  289. rivetsql-0.1.0/tests/cli/snapshots/mermaid_01_minimal.txt +8 -0
  290. rivetsql-0.1.0/tests/cli/snapshots/mermaid_02_multi_source_assertions.txt +16 -0
  291. rivetsql-0.1.0/tests/cli/snapshots/mermaid_03_multi_engine.txt +14 -0
  292. rivetsql-0.1.0/tests/cli/snapshots/mermaid_04_full_featured.txt +24 -0
  293. rivetsql-0.1.0/tests/cli/snapshots/visual_01_minimal.txt +16 -0
  294. rivetsql-0.1.0/tests/cli/snapshots/visual_02_multi_source_assertions.txt +16 -0
  295. rivetsql-0.1.0/tests/cli/snapshots/visual_03_multi_engine.txt +14 -0
  296. rivetsql-0.1.0/tests/cli/snapshots/visual_04_full_featured.txt +15 -0
  297. rivetsql-0.1.0/tests/cli/test_accessibility.py +235 -0
  298. rivetsql-0.1.0/tests/cli/test_app.py +270 -0
  299. rivetsql-0.1.0/tests/cli/test_catalog_cache.py +312 -0
  300. rivetsql-0.1.0/tests/cli/test_catalog_create.py +278 -0
  301. rivetsql-0.1.0/tests/cli/test_catalog_create_engine_helpers.py +98 -0
  302. rivetsql-0.1.0/tests/cli/test_catalog_create_noninteractive.py +369 -0
  303. rivetsql-0.1.0/tests/cli/test_catalog_create_props.py +809 -0
  304. rivetsql-0.1.0/tests/cli/test_catalog_create_wiring.py +517 -0
  305. rivetsql-0.1.0/tests/cli/test_catalog_create_wizard.py +1190 -0
  306. rivetsql-0.1.0/tests/cli/test_catalog_create_write.py +194 -0
  307. rivetsql-0.1.0/tests/cli/test_catalog_describe.py +366 -0
  308. rivetsql-0.1.0/tests/cli/test_catalog_json.py +423 -0
  309. rivetsql-0.1.0/tests/cli/test_catalog_list.py +417 -0
  310. rivetsql-0.1.0/tests/cli/test_catalog_panel.py +392 -0
  311. rivetsql-0.1.0/tests/cli/test_catalog_panel_activity.py +82 -0
  312. rivetsql-0.1.0/tests/cli/test_catalog_panel_enter_preview.py +59 -0
  313. rivetsql-0.1.0/tests/cli/test_catalog_panel_extract.py +34 -0
  314. rivetsql-0.1.0/tests/cli/test_catalog_panel_preview.py +29 -0
  315. rivetsql-0.1.0/tests/cli/test_cli_catalog.py +711 -0
  316. rivetsql-0.1.0/tests/cli/test_cli_explore.py +543 -0
  317. rivetsql-0.1.0/tests/cli/test_colors.py +70 -0
  318. rivetsql-0.1.0/tests/cli/test_command_input.py +253 -0
  319. rivetsql-0.1.0/tests/cli/test_command_palette.py +235 -0
  320. rivetsql-0.1.0/tests/cli/test_compilation_view.py +135 -0
  321. rivetsql-0.1.0/tests/cli/test_compile_cmd.py +376 -0
  322. rivetsql-0.1.0/tests/cli/test_debug_screen.py +266 -0
  323. rivetsql-0.1.0/tests/cli/test_doctor_cmd.py +343 -0
  324. rivetsql-0.1.0/tests/cli/test_doctor_text.py +81 -0
  325. rivetsql-0.1.0/tests/cli/test_editor_cache.py +172 -0
  326. rivetsql-0.1.0/tests/cli/test_editor_cache_restore_on_startup.py +126 -0
  327. rivetsql-0.1.0/tests/cli/test_editor_panel_activity.py +86 -0
  328. rivetsql-0.1.0/tests/cli/test_editor_validation_dialect.py +152 -0
  329. rivetsql-0.1.0/tests/cli/test_engine_selector.py +128 -0
  330. rivetsql-0.1.0/tests/cli/test_errors.py +79 -0
  331. rivetsql-0.1.0/tests/cli/test_execution_wiring.py +403 -0
  332. rivetsql-0.1.0/tests/cli/test_exit_codes.py +74 -0
  333. rivetsql-0.1.0/tests/cli/test_export_screen.py +124 -0
  334. rivetsql-0.1.0/tests/cli/test_extracted_sql_executable.py +122 -0
  335. rivetsql-0.1.0/tests/cli/test_file_watcher.py +314 -0
  336. rivetsql-0.1.0/tests/cli/test_footer.py +158 -0
  337. rivetsql-0.1.0/tests/cli/test_generate_command.py +111 -0
  338. rivetsql-0.1.0/tests/cli/test_help_screen.py +76 -0
  339. rivetsql-0.1.0/tests/cli/test_history_screen.py +113 -0
  340. rivetsql-0.1.0/tests/cli/test_init_command.py +259 -0
  341. rivetsql-0.1.0/tests/cli/test_joint_preview_handler.py +79 -0
  342. rivetsql-0.1.0/tests/cli/test_joint_preview_metadata_property.py +200 -0
  343. rivetsql-0.1.0/tests/cli/test_joint_preview_no_execution_property.py +146 -0
  344. rivetsql-0.1.0/tests/cli/test_json_out.py +323 -0
  345. rivetsql-0.1.0/tests/cli/test_keymap.py +304 -0
  346. rivetsql-0.1.0/tests/cli/test_mermaid.py +93 -0
  347. rivetsql-0.1.0/tests/cli/test_metrics.py +174 -0
  348. rivetsql-0.1.0/tests/cli/test_panel_splitter.py +169 -0
  349. rivetsql-0.1.0/tests/cli/test_preview_replacement.py +109 -0
  350. rivetsql-0.1.0/tests/cli/test_profile_selector.py +153 -0
  351. rivetsql-0.1.0/tests/cli/test_progress_indicator.py +91 -0
  352. rivetsql-0.1.0/tests/cli/test_progress_wiring.py +129 -0
  353. rivetsql-0.1.0/tests/cli/test_repl_config.py +293 -0
  354. rivetsql-0.1.0/tests/cli/test_repl_errors.py +319 -0
  355. rivetsql-0.1.0/tests/cli/test_repl_execution_path.py +327 -0
  356. rivetsql-0.1.0/tests/cli/test_repl_exit_code_property.py +224 -0
  357. rivetsql-0.1.0/tests/cli/test_results_panel.py +509 -0
  358. rivetsql-0.1.0/tests/cli/test_results_panel_pin_property.py +121 -0
  359. rivetsql-0.1.0/tests/cli/test_results_panel_progress.py +170 -0
  360. rivetsql-0.1.0/tests/cli/test_run_cmd.py +359 -0
  361. rivetsql-0.1.0/tests/cli/test_run_text.py +178 -0
  362. rivetsql-0.1.0/tests/cli/test_sample_integration.py +406 -0
  363. rivetsql-0.1.0/tests/cli/test_snapshot_regression.py +327 -0
  364. rivetsql-0.1.0/tests/cli/test_startup_flow.py +332 -0
  365. rivetsql-0.1.0/tests/cli/test_status_bar.py +553 -0
  366. rivetsql-0.1.0/tests/cli/test_test_cli.py +622 -0
  367. rivetsql-0.1.0/tests/cli/test_test_discovery.py +373 -0
  368. rivetsql-0.1.0/tests/cli/test_test_execution.py +441 -0
  369. rivetsql-0.1.0/tests/cli/test_test_isolation.py +202 -0
  370. rivetsql-0.1.0/tests/cli/test_test_results_screen.py +270 -0
  371. rivetsql-0.1.0/tests/cli/test_test_text.py +243 -0
  372. rivetsql-0.1.0/tests/cli/test_themes.py +143 -0
  373. rivetsql-0.1.0/tests/cli/test_visual.py +425 -0
  374. rivetsql-0.1.0/tests/cli/test_watermark_cmd.py +111 -0
  375. rivetsql-0.1.0/tests/config/__init__.py +0 -0
  376. rivetsql-0.1.0/tests/config/test_annotation_property.py +100 -0
  377. rivetsql-0.1.0/tests/config/test_annotations.py +153 -0
  378. rivetsql-0.1.0/tests/config/test_annotations_property.py +78 -0
  379. rivetsql-0.1.0/tests/config/test_annotations_python.py +137 -0
  380. rivetsql-0.1.0/tests/config/test_config_loader.py +169 -0
  381. rivetsql-0.1.0/tests/config/test_declaration_name_uniqueness_property.py +119 -0
  382. rivetsql-0.1.0/tests/config/test_declaration_quality_ordering_property.py +199 -0
  383. rivetsql-0.1.0/tests/config/test_declarations.py +333 -0
  384. rivetsql-0.1.0/tests/config/test_declarations_file_discovery_property.py +159 -0
  385. rivetsql-0.1.0/tests/config/test_declarations_ordering_property.py +84 -0
  386. rivetsql-0.1.0/tests/config/test_env.py +321 -0
  387. rivetsql-0.1.0/tests/config/test_errors.py +47 -0
  388. rivetsql-0.1.0/tests/config/test_manifest.py +395 -0
  389. rivetsql-0.1.0/tests/config/test_models.py +178 -0
  390. rivetsql-0.1.0/tests/config/test_profiles.py +649 -0
  391. rivetsql-0.1.0/tests/config/test_profiles_completeness_property.py +145 -0
  392. rivetsql-0.1.0/tests/config/test_profiles_format_equivalence.py +84 -0
  393. rivetsql-0.1.0/tests/config/test_profiles_non_overlapping_property.py +270 -0
  394. rivetsql-0.1.0/tests/config/test_profiles_required_fields_property.py +163 -0
  395. rivetsql-0.1.0/tests/config/test_profiles_selection_property.py +112 -0
  396. rivetsql-0.1.0/tests/config/test_python_parser.py +231 -0
  397. rivetsql-0.1.0/tests/config/test_quality.py +354 -0
  398. rivetsql-0.1.0/tests/config/test_quality_argument_parsing_property.py +98 -0
  399. rivetsql-0.1.0/tests/config/test_quality_dedicated_file_targeting_property.py +135 -0
  400. rivetsql-0.1.0/tests/config/test_quality_file_classification_property.py +144 -0
  401. rivetsql-0.1.0/tests/config/test_quality_multi_file_merge_property.py +100 -0
  402. rivetsql-0.1.0/tests/config/test_quality_phase_property.py +132 -0
  403. rivetsql-0.1.0/tests/config/test_quality_severity_property.py +91 -0
  404. rivetsql-0.1.0/tests/config/test_quality_unrecognized_type_property.py +72 -0
  405. rivetsql-0.1.0/tests/config/test_samples.py +532 -0
  406. rivetsql-0.1.0/tests/config/test_sql_parser.py +261 -0
  407. rivetsql-0.1.0/tests/config/test_sql_parser_annotation_body_property.py +119 -0
  408. rivetsql-0.1.0/tests/config/test_sql_parser_joint_declaration_property.py +129 -0
  409. rivetsql-0.1.0/tests/config/test_write_strategy_property.py +125 -0
  410. rivetsql-0.1.0/tests/config/test_yaml_parser.py +281 -0
  411. rivetsql-0.1.0/tests/config/test_yaml_parser_columns_property.py +71 -0
  412. rivetsql-0.1.0/tests/config/test_yaml_parser_name_validation.py +101 -0
  413. rivetsql-0.1.0/tests/config/test_yaml_parser_property.py +276 -0
  414. rivetsql-0.1.0/tests/config/test_yaml_parser_type_required_property.py +127 -0
  415. rivetsql-0.1.0/tests/conftest.py +1 -0
  416. rivetsql-0.1.0/tests/core/__init__.py +1 -0
  417. rivetsql-0.1.0/tests/core/_python_joint_fixtures.py +50 -0
  418. rivetsql-0.1.0/tests/core/test_arrow_catalog.py +209 -0
  419. rivetsql-0.1.0/tests/core/test_assembly.py +291 -0
  420. rivetsql-0.1.0/tests/core/test_catalog_explorer.py +2534 -0
  421. rivetsql-0.1.0/tests/core/test_catalog_explorer_preview.py +335 -0
  422. rivetsql-0.1.0/tests/core/test_catalog_explorer_search.py +521 -0
  423. rivetsql-0.1.0/tests/core/test_catalog_explorer_source.py +336 -0
  424. rivetsql-0.1.0/tests/core/test_catalog_plugin_list_children.py +119 -0
  425. rivetsql-0.1.0/tests/core/test_catalog_search.py +224 -0
  426. rivetsql-0.1.0/tests/core/test_checks.py +87 -0
  427. rivetsql-0.1.0/tests/core/test_compiler.py +404 -0
  428. rivetsql-0.1.0/tests/core/test_compiler_resolution.py +628 -0
  429. rivetsql-0.1.0/tests/core/test_context.py +46 -0
  430. rivetsql-0.1.0/tests/core/test_differ_categorization_property.py +154 -0
  431. rivetsql-0.1.0/tests/core/test_duckdb_catalog_plugin.py +275 -0
  432. rivetsql-0.1.0/tests/core/test_engine_boundary_detection.py +225 -0
  433. rivetsql-0.1.0/tests/core/test_errors.py +78 -0
  434. rivetsql-0.1.0/tests/core/test_executor.py +478 -0
  435. rivetsql-0.1.0/tests/core/test_executor_checks.py +650 -0
  436. rivetsql-0.1.0/tests/core/test_executor_failfast.py +534 -0
  437. rivetsql-0.1.0/tests/core/test_executor_pushdown_threading.py +206 -0
  438. rivetsql-0.1.0/tests/core/test_executor_python.py +204 -0
  439. rivetsql-0.1.0/tests/core/test_filesystem_catalog.py +243 -0
  440. rivetsql-0.1.0/tests/core/test_formatter.py +72 -0
  441. rivetsql-0.1.0/tests/core/test_interactive_differ.py +141 -0
  442. rivetsql-0.1.0/tests/core/test_introspection.py +220 -0
  443. rivetsql-0.1.0/tests/core/test_lineage.py +153 -0
  444. rivetsql-0.1.0/tests/core/test_lineage_traversal.py +232 -0
  445. rivetsql-0.1.0/tests/core/test_logging.py +93 -0
  446. rivetsql-0.1.0/tests/core/test_material_cache.py +78 -0
  447. rivetsql-0.1.0/tests/core/test_material_cache_properties.py +107 -0
  448. rivetsql-0.1.0/tests/core/test_metrics.py +96 -0
  449. rivetsql-0.1.0/tests/core/test_models.py +351 -0
  450. rivetsql-0.1.0/tests/core/test_optimizer.py +658 -0
  451. rivetsql-0.1.0/tests/core/test_plugin_registry.py +622 -0
  452. rivetsql-0.1.0/tests/core/test_sql_parser.py +598 -0
  453. rivetsql-0.1.0/tests/core/test_strategies.py +127 -0
  454. rivetsql-0.1.0/tests/core/test_write_strategies_and_watermark.py +105 -0
  455. rivetsql-0.1.0/tests/core/testing/__init__.py +1 -0
  456. rivetsql-0.1.0/tests/core/testing/test_comparison.py +303 -0
  457. rivetsql-0.1.0/tests/core/testing/test_comparison_properties.py +310 -0
  458. rivetsql-0.1.0/tests/core/testing/test_fixtures.py +100 -0
  459. rivetsql-0.1.0/tests/core/testing/test_inline_data.py +195 -0
  460. rivetsql-0.1.0/tests/core/testing/test_models.py +97 -0
  461. rivetsql-0.1.0/tests/databricks/__init__.py +1 -0
  462. rivetsql-0.1.0/tests/databricks/test_databricks_unity_adapter.py +519 -0
  463. rivetsql-0.1.0/tests/databricks/test_databricks_unity_adapter_properties.py +740 -0
  464. rivetsql-0.1.0/tests/databricks/test_resolve_credentials.py +82 -0
  465. rivetsql-0.1.0/tests/databricks/test_resolve_table_name.py +80 -0
  466. rivetsql-0.1.0/tests/databricks/test_unity_adapter_module_boundary.py +79 -0
  467. rivetsql-0.1.0/tests/docs/__init__.py +1 -0
  468. rivetsql-0.1.0/tests/docs/conftest.py +1 -0
  469. rivetsql-0.1.0/tests/docs/strategies.py +91 -0
  470. rivetsql-0.1.0/tests/docs/test_api_extractor.py +268 -0
  471. rivetsql-0.1.0/tests/docs/test_api_extractor_completeness.py +342 -0
  472. rivetsql-0.1.0/tests/docs/test_architecture.py +75 -0
  473. rivetsql-0.1.0/tests/docs/test_cli_extractor.py +150 -0
  474. rivetsql-0.1.0/tests/docs/test_cli_extractor_subcommand_property.py +183 -0
  475. rivetsql-0.1.0/tests/docs/test_code_tabs.py +38 -0
  476. rivetsql-0.1.0/tests/docs/test_config_extractor.py +214 -0
  477. rivetsql-0.1.0/tests/docs/test_config_extractor_plugin_options_property.py +197 -0
  478. rivetsql-0.1.0/tests/docs/test_coverage.py +187 -0
  479. rivetsql-0.1.0/tests/docs/test_dag_extractor.py +105 -0
  480. rivetsql-0.1.0/tests/docs/test_docs_cli.py +532 -0
  481. rivetsql-0.1.0/tests/docs/test_error_extractor.py +248 -0
  482. rivetsql-0.1.0/tests/docs/test_extractor_resilience.py +147 -0
  483. rivetsql-0.1.0/tests/docs/test_freshness.py +126 -0
  484. rivetsql-0.1.0/tests/docs/test_mkdocs_renderer.py +86 -0
  485. rivetsql-0.1.0/tests/docs/test_plugin_extractor.py +83 -0
  486. rivetsql-0.1.0/tests/docs/test_stale_docs.py +90 -0
  487. rivetsql-0.1.0/tests/docs/test_static_config_correctness.py +118 -0
  488. rivetsql-0.1.0/tests/docs/test_user_guides.py +72 -0
  489. rivetsql-0.1.0/tests/duckdb/__init__.py +0 -0
  490. rivetsql-0.1.0/tests/duckdb/test_duckdb_engine_plugin.py +462 -0
  491. rivetsql-0.1.0/tests/duckdb/test_duckdb_execute_sql.py +63 -0
  492. rivetsql-0.1.0/tests/duckdb/test_duckdb_extensions.py +111 -0
  493. rivetsql-0.1.0/tests/duckdb/test_duckdb_metrics.py +244 -0
  494. rivetsql-0.1.0/tests/duckdb/test_duckdb_no_postgres_adapter.py +45 -0
  495. rivetsql-0.1.0/tests/duckdb/test_duckdb_pushdown.py +135 -0
  496. rivetsql-0.1.0/tests/duckdb/test_duckdb_sink.py +467 -0
  497. rivetsql-0.1.0/tests/duckdb/test_duckdb_source.py +198 -0
  498. rivetsql-0.1.0/tests/duckdb/test_extension_management_properties.py +93 -0
  499. rivetsql-0.1.0/tests/duckdb/test_filesystem_sink.py +289 -0
  500. rivetsql-0.1.0/tests/duckdb/test_glue_duckdb_adapter.py +424 -0
  501. rivetsql-0.1.0/tests/duckdb/test_s3_duckdb_adapter.py +341 -0
  502. rivetsql-0.1.0/tests/duckdb/test_unity_duckdb_adapter.py +289 -0
  503. rivetsql-0.1.0/tests/interactive/__init__.py +1 -0
  504. rivetsql-0.1.0/tests/interactive/test_activity_indicator.py +47 -0
  505. rivetsql-0.1.0/tests/interactive/test_activity_state.py +137 -0
  506. rivetsql-0.1.0/tests/interactive/test_assembly_formatter.py +710 -0
  507. rivetsql-0.1.0/tests/interactive/test_assembly_inspect.py +231 -0
  508. rivetsql-0.1.0/tests/interactive/test_build_and_compile_transient.py +149 -0
  509. rivetsql-0.1.0/tests/interactive/test_catalog_search.py +130 -0
  510. rivetsql-0.1.0/tests/interactive/test_completion_fuzzy_property.py +178 -0
  511. rivetsql-0.1.0/tests/interactive/test_completion_sort_order.py +214 -0
  512. rivetsql-0.1.0/tests/interactive/test_completions.py +116 -0
  513. rivetsql-0.1.0/tests/interactive/test_completions_dot_scoping.py +138 -0
  514. rivetsql-0.1.0/tests/interactive/test_dialect_names.py +43 -0
  515. rivetsql-0.1.0/tests/interactive/test_dialect_names_property.py +54 -0
  516. rivetsql-0.1.0/tests/interactive/test_engine_dispatch_errors.py +69 -0
  517. rivetsql-0.1.0/tests/interactive/test_engine_indicator.py +91 -0
  518. rivetsql-0.1.0/tests/interactive/test_execution_guard.py +271 -0
  519. rivetsql-0.1.0/tests/interactive/test_executor_adapter.py +387 -0
  520. rivetsql-0.1.0/tests/interactive/test_export_round_trip_property.py +149 -0
  521. rivetsql-0.1.0/tests/interactive/test_exporter.py +132 -0
  522. rivetsql-0.1.0/tests/interactive/test_format_sql_repl_state_dialect_property.py +70 -0
  523. rivetsql-0.1.0/tests/interactive/test_formatter.py +112 -0
  524. rivetsql-0.1.0/tests/interactive/test_generate_joint.py +178 -0
  525. rivetsql-0.1.0/tests/interactive/test_generate_joint_annotations_property.py +91 -0
  526. rivetsql-0.1.0/tests/interactive/test_generate_joint_duplicate_property.py +59 -0
  527. rivetsql-0.1.0/tests/interactive/test_get_joint_sql.py +52 -0
  528. rivetsql-0.1.0/tests/interactive/test_get_joint_sql_property.py +60 -0
  529. rivetsql-0.1.0/tests/interactive/test_history.py +232 -0
  530. rivetsql-0.1.0/tests/interactive/test_log_buffer.py +116 -0
  531. rivetsql-0.1.0/tests/interactive/test_log_rendering.py +98 -0
  532. rivetsql-0.1.0/tests/interactive/test_log_wiring.py +160 -0
  533. rivetsql-0.1.0/tests/interactive/test_module_boundary_enforcement.py +104 -0
  534. rivetsql-0.1.0/tests/interactive/test_profiler.py +159 -0
  535. rivetsql-0.1.0/tests/interactive/test_profiler_properties.py +278 -0
  536. rivetsql-0.1.0/tests/interactive/test_query_planner.py +1437 -0
  537. rivetsql-0.1.0/tests/interactive/test_repl_state_mutations.py +212 -0
  538. rivetsql-0.1.0/tests/interactive/test_repl_state_persistence.py +100 -0
  539. rivetsql-0.1.0/tests/interactive/test_repl_state_profile_switch.py +62 -0
  540. rivetsql-0.1.0/tests/interactive/test_repl_state_properties.py +100 -0
  541. rivetsql-0.1.0/tests/interactive/test_repl_state_query_preserves.py +74 -0
  542. rivetsql-0.1.0/tests/interactive/test_scan_table_refs.py +292 -0
  543. rivetsql-0.1.0/tests/interactive/test_session_metrics_property.py +224 -0
  544. rivetsql-0.1.0/tests/interactive/test_session_progress.py +186 -0
  545. rivetsql-0.1.0/tests/interactive/test_session_query_plan.py +103 -0
  546. rivetsql-0.1.0/tests/interactive/test_session_read_only.py +169 -0
  547. rivetsql-0.1.0/tests/interactive/test_session_truncation.py +98 -0
  548. rivetsql-0.1.0/tests/interactive/test_session_validation_property.py +65 -0
  549. rivetsql-0.1.0/tests/interactive/test_session_wiring.py +137 -0
  550. rivetsql-0.1.0/tests/interactive/test_sql_preprocessor.py +851 -0
  551. rivetsql-0.1.0/tests/interactive/test_tab_state.py +138 -0
  552. rivetsql-0.1.0/tests/polars/__init__.py +0 -0
  553. rivetsql-0.1.0/tests/polars/test_glue_polars_adapter.py +562 -0
  554. rivetsql-0.1.0/tests/polars/test_polars_arrow_materialization.py +90 -0
  555. rivetsql-0.1.0/tests/polars/test_polars_delta_validation.py +110 -0
  556. rivetsql-0.1.0/tests/polars/test_polars_engine_plugin.py +182 -0
  557. rivetsql-0.1.0/tests/polars/test_polars_metrics.py +165 -0
  558. rivetsql-0.1.0/tests/polars/test_polars_pushdown_helper.py +194 -0
  559. rivetsql-0.1.0/tests/polars/test_polars_sql_context_fusion.py +130 -0
  560. rivetsql-0.1.0/tests/polars/test_polars_sql_execute.py +127 -0
  561. rivetsql-0.1.0/tests/polars/test_polars_streaming_mode.py +111 -0
  562. rivetsql-0.1.0/tests/polars/test_s3_polars_adapter.py +324 -0
  563. rivetsql-0.1.0/tests/polars/test_unity_polars_adapter.py +372 -0
  564. rivetsql-0.1.0/tests/postgres/__init__.py +0 -0
  565. rivetsql-0.1.0/tests/postgres/test_connection_error_classification.py +393 -0
  566. rivetsql-0.1.0/tests/postgres/test_postgres_catalog_plugin.py +558 -0
  567. rivetsql-0.1.0/tests/postgres/test_postgres_duckdb_adapter_attach.py +266 -0
  568. rivetsql-0.1.0/tests/postgres/test_postgres_duckdb_adapter_capabilities.py +24 -0
  569. rivetsql-0.1.0/tests/postgres/test_postgres_duckdb_adapter_extension.py +121 -0
  570. rivetsql-0.1.0/tests/postgres/test_postgres_duckdb_adapter_registration.py +81 -0
  571. rivetsql-0.1.0/tests/postgres/test_postgres_engine_plugin.py +647 -0
  572. rivetsql-0.1.0/tests/postgres/test_postgres_metrics.py +230 -0
  573. rivetsql-0.1.0/tests/postgres/test_postgres_pyspark_adapter.py +559 -0
  574. rivetsql-0.1.0/tests/postgres/test_postgres_sink.py +738 -0
  575. rivetsql-0.1.0/tests/postgres/test_postgres_source.py +247 -0
  576. rivetsql-0.1.0/tests/pyspark/__init__.py +0 -0
  577. rivetsql-0.1.0/tests/pyspark/test_delta_detection.py +562 -0
  578. rivetsql-0.1.0/tests/pyspark/test_pyspark_adapter_error_codes.py +221 -0
  579. rivetsql-0.1.0/tests/pyspark/test_pyspark_arrow_materialization.py +105 -0
  580. rivetsql-0.1.0/tests/pyspark/test_pyspark_cte_fusion.py +137 -0
  581. rivetsql-0.1.0/tests/pyspark/test_pyspark_engine_plugin.py +224 -0
  582. rivetsql-0.1.0/tests/pyspark/test_pyspark_glue_adapter.py +255 -0
  583. rivetsql-0.1.0/tests/pyspark/test_pyspark_metrics.py +168 -0
  584. rivetsql-0.1.0/tests/pyspark/test_pyspark_pushdown.py +181 -0
  585. rivetsql-0.1.0/tests/pyspark/test_pyspark_s3_adapter.py +327 -0
  586. rivetsql-0.1.0/tests/pyspark/test_pyspark_session_lifecycle.py +320 -0
  587. rivetsql-0.1.0/tests/pyspark/test_pyspark_unity_adapter.py +333 -0
  588. rivetsql-0.1.0/tests/test_adapter_dispatch_integration.py +504 -0
  589. rivetsql-0.1.0/tests/test_adapter_precedence_properties.py +231 -0
  590. rivetsql-0.1.0/tests/test_cross_joint_registry.py +89 -0
  591. rivetsql-0.1.0/tests/test_cross_plugin.py +489 -0
  592. rivetsql-0.1.0/tests/test_error_scenarios.py +751 -0
  593. rivetsql-0.1.0/tests/test_execute_via_plugin.py +244 -0
  594. rivetsql-0.1.0/tests/test_lifecycle_properties.py +341 -0
  595. rivetsql-0.1.0/tests/test_module_boundary_compliance.py +100 -0
  596. rivetsql-0.1.0/tests/test_opensource_readiness.py +317 -0
  597. rivetsql-0.1.0/tests/test_option_validation_properties.py +276 -0
  598. rivetsql-0.1.0/tests/test_plugin_pyproject_validity.py +74 -0
  599. rivetsql-0.1.0/tests/test_plugin_registration.py +535 -0
  600. rivetsql-0.1.0/tests/test_plugin_structured_errors.py +371 -0
  601. rivetsql-0.1.0/tests/test_plugins_properties.py +195 -0
  602. rivetsql-0.1.0/tests/test_resolve_cross_joint.py +194 -0
  603. rivetsql-0.1.0/tests/test_spec_alignment_properties.py +47 -0
  604. rivetsql-0.1.0/tests/test_spec_alignment_unit.py +172 -0
  605. rivetsql-0.1.0/tests/test_unsupported_cross_engine_rvt502.py +315 -0
  606. rivetsql-0.1.0/tests/test_write_strategy_declaration_properties.py +373 -0
  607. rivetsql-0.1.0/tests/unity/__init__.py +0 -0
  608. rivetsql-0.1.0/tests/unity/test_databricks_catalog_plugin.py +655 -0
  609. rivetsql-0.1.0/tests/unity/test_databricks_engine_plugin.py +93 -0
  610. rivetsql-0.1.0/tests/unity/test_databricks_engine_verify_3_1.py +144 -0
  611. rivetsql-0.1.0/tests/unity/test_databricks_error_context.py +186 -0
  612. rivetsql-0.1.0/tests/unity/test_databricks_execute_sql.py +155 -0
  613. rivetsql-0.1.0/tests/unity/test_databricks_metrics.py +166 -0
  614. rivetsql-0.1.0/tests/unity/test_databricks_plugin_properties.py +350 -0
  615. rivetsql-0.1.0/tests/unity/test_databricks_plugin_registration_verify_3_4.py +95 -0
  616. rivetsql-0.1.0/tests/unity/test_databricks_sink_plugin.py +553 -0
  617. rivetsql-0.1.0/tests/unity/test_databricks_source_plugin.py +249 -0
  618. rivetsql-0.1.0/tests/unity/test_databricks_statement_api.py +534 -0
  619. rivetsql-0.1.0/tests/unity/test_databricks_validation_sql_properties.py +266 -0
  620. rivetsql-0.1.0/tests/unity/test_unity_auth.py +224 -0
  621. rivetsql-0.1.0/tests/unity/test_unity_catalog_plugin.py +1069 -0
  622. rivetsql-0.1.0/tests/unity/test_unity_catalog_verify_3_2.py +119 -0
  623. rivetsql-0.1.0/tests/unity/test_unity_client.py +349 -0
  624. rivetsql-0.1.0/tests/unity/test_unity_sink_plugin.py +462 -0
  625. rivetsql-0.1.0/tests/unity/test_unity_source_plugin.py +325 -0
@@ -0,0 +1,25 @@
1
+ .DS_Store
2
+ .env
3
+ .env.*
4
+ *.pem
5
+ *.key
6
+ secrets/
7
+ target/
8
+ build/
9
+ dist/
10
+ out/
11
+ .next/
12
+ node_modules/
13
+ __pycache__/
14
+ *.pyc
15
+ .pytest_cache/
16
+ .hypothesis/
17
+ .cargo/
18
+ *.class
19
+ bin/
20
+ obj/
21
+ .ralph-logs/
22
+ mcp.json
23
+ docs/reference/
24
+ docs/_build/
25
+ *.zip
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: rivetsql
3
+ Version: 0.1.0
4
+ Summary: SQL pipeline framework — declare what, not how
5
+ Project-URL: Homepage, https://github.com/rivetsql/rivet
6
+ Project-URL: Documentation, https://rivetsql.github.io/rivet
7
+ Project-URL: Repository, https://github.com/rivetsql/rivet
8
+ Project-URL: Changelog, https://github.com/rivetsql/rivet/blob/main/CHANGELOG.md
9
+ Author: Rivet Contributors
10
+ License-Expression: MIT
11
+ Keywords: cli,data-pipeline,dbt-alternative,elt,etl,sql
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Database
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: rivetsql-core>=0.1.0
20
+ Requires-Dist: textual>=1.0
21
+ Provides-Extra: all
22
+ Requires-Dist: rivetsql-aws>=0.1.0; extra == 'all'
23
+ Requires-Dist: rivetsql-databricks>=0.1.0; extra == 'all'
24
+ Requires-Dist: rivetsql-duckdb>=0.1.0; extra == 'all'
25
+ Requires-Dist: rivetsql-polars>=0.1.0; extra == 'all'
26
+ Requires-Dist: rivetsql-postgres>=0.1.0; extra == 'all'
27
+ Requires-Dist: rivetsql-pyspark>=0.1.0; extra == 'all'
28
+ Provides-Extra: aws
29
+ Requires-Dist: rivetsql-aws>=0.1.0; extra == 'aws'
30
+ Provides-Extra: databricks
31
+ Requires-Dist: rivetsql-databricks>=0.1.0; extra == 'databricks'
32
+ Provides-Extra: duckdb
33
+ Requires-Dist: rivetsql-duckdb>=0.1.0; extra == 'duckdb'
34
+ Provides-Extra: polars
35
+ Requires-Dist: rivetsql-polars>=0.1.0; extra == 'polars'
36
+ Provides-Extra: postgres
37
+ Requires-Dist: rivetsql-postgres>=0.1.0; extra == 'postgres'
38
+ Provides-Extra: pyspark
39
+ Requires-Dist: rivetsql-pyspark>=0.1.0; extra == 'pyspark'
40
+ Description-Content-Type: text/markdown
41
+
42
+ <!-- Logo / Banner -->
43
+ <p align="center">
44
+ <img src="logo.png" alt="Rivet SQL" width="400">
45
+ </p>
46
+
47
+ <!-- Badges -->
48
+ <p align="center">
49
+ <a href="https://pypi.org/project/rivetsql/"><img src="https://img.shields.io/pypi/v/rivetsql" alt="PyPI version"></a>
50
+ <a href="https://pypi.org/project/rivetsql/"><img src="https://img.shields.io/pypi/pyversions/rivetsql" alt="Python versions"></a>
51
+ <a href="https://github.com/rivetsql/rivet/blob/main/LICENSE"><img src="https://img.shields.io/github/license/rivetsql/rivet" alt="License"></a>
52
+ <a href="https://github.com/rivetsql/rivet/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/rivetsql/rivet/ci.yml?branch=main&label=CI" alt="CI status"></a>
53
+ <a href="https://codecov.io/gh/rivetsql/rivet"><img src="https://codecov.io/gh/rivetsql/rivet/branch/main/graph/badge.svg" alt="Coverage"></a>
54
+ </p>
55
+
56
+ <p align="center"><strong>Declarative SQL pipelines — define what, not how.</strong></p>
57
+
58
+ ---
59
+
60
+ Rivet separates *what* to compute (joints) from *how* to compute (engines) and *where* data lives (catalogs). Define your pipeline once — run it on DuckDB, Polars, PySpark, or Postgres without changing your logic.
61
+
62
+ ## Features
63
+
64
+ - **Multi-engine execution** — swap between DuckDB, Polars, PySpark, and Postgres without rewriting pipelines
65
+ - **Declarative pipelines** — define joints in SQL, YAML, or Python
66
+ - **Quality checks** — assertions before write, audits after write
67
+ - **Built-in testing** — offline fixture-based tests with `rivet test`
68
+ - **Plugin architecture** — install only the engines you need
69
+ - **Interactive REPL** — explore and debug pipelines interactively
70
+
71
+ ## Quick Start
72
+
73
+ Install Rivet and the DuckDB plugin:
74
+
75
+ ```bash
76
+ pip install rivetsql[duckdb]
77
+ ```
78
+
79
+ Create and run a pipeline:
80
+
81
+ ```bash
82
+ mkdir my_pipeline && cd my_pipeline
83
+ rivet init
84
+ rivet run
85
+ ```
86
+
87
+ A minimal SQL joint (`joints/transform_orders.sql`):
88
+
89
+ ```sql
90
+ SELECT
91
+ order_id,
92
+ customer_name,
93
+ amount * 1.1 AS amount_with_tax
94
+ FROM {{ ref('raw_orders') }}
95
+ ```
96
+
97
+ ## Installation
98
+
99
+ ```bash
100
+ # Full CLI + core
101
+ pip install rivetsql
102
+
103
+ # Core library only (no CLI)
104
+ pip install rivetsql-core
105
+
106
+ # With a specific plugin
107
+ pip install rivetsql[duckdb]
108
+
109
+ # All plugins
110
+ pip install rivetsql[all]
111
+ ```
112
+
113
+ ## Plugins
114
+
115
+ | Plugin | Install | Engine |
116
+ |--------|---------|--------|
117
+ | DuckDB | `pip install rivetsql[duckdb]` | In-process analytical SQL |
118
+ | Postgres | `pip install rivetsql[postgres]` | PostgreSQL databases |
119
+ | Polars | `pip install rivetsql[polars]` | DataFrame-based compute |
120
+ | PySpark | `pip install rivetsql[pyspark]` | Distributed Spark execution |
121
+ | Databricks | `pip install rivetsql[databricks]` | Databricks SQL warehouses |
122
+ | AWS | `pip install rivetsql[aws]` | S3 + Glue catalog integration |
123
+
124
+ ## Pipeline Visualization
125
+
126
+ ```mermaid
127
+ graph LR
128
+ subgraph Joints["Joints (What)"]
129
+ S[Source] --> T[Transform]
130
+ T --> K[Sink]
131
+ end
132
+
133
+ subgraph Engines["Engines (How)"]
134
+ DK[DuckDB]
135
+ PL[Polars]
136
+ PS[PySpark]
137
+ PG[Postgres]
138
+ end
139
+
140
+ subgraph Catalogs["Catalogs (Where)"]
141
+ FS[Filesystem]
142
+ DB[Database]
143
+ S3[Object Store]
144
+ end
145
+
146
+ T --> DK
147
+ T --> PL
148
+ T --> PS
149
+ T --> PG
150
+
151
+ K --> FS
152
+ K --> DB
153
+ K --> S3
154
+ ```
155
+
156
+ ## Links
157
+
158
+ - [Documentation](https://rivetsql.github.io/rivet)
159
+ - [Contributing Guide](CONTRIBUTING.md)
160
+ - [License (MIT)](LICENSE)
161
+ - [Changelog](CHANGELOG.md)
@@ -0,0 +1,120 @@
1
+ <!-- Logo / Banner -->
2
+ <p align="center">
3
+ <img src="logo.png" alt="Rivet SQL" width="400">
4
+ </p>
5
+
6
+ <!-- Badges -->
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/rivetsql/"><img src="https://img.shields.io/pypi/v/rivetsql" alt="PyPI version"></a>
9
+ <a href="https://pypi.org/project/rivetsql/"><img src="https://img.shields.io/pypi/pyversions/rivetsql" alt="Python versions"></a>
10
+ <a href="https://github.com/rivetsql/rivet/blob/main/LICENSE"><img src="https://img.shields.io/github/license/rivetsql/rivet" alt="License"></a>
11
+ <a href="https://github.com/rivetsql/rivet/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/rivetsql/rivet/ci.yml?branch=main&label=CI" alt="CI status"></a>
12
+ <a href="https://codecov.io/gh/rivetsql/rivet"><img src="https://codecov.io/gh/rivetsql/rivet/branch/main/graph/badge.svg" alt="Coverage"></a>
13
+ </p>
14
+
15
+ <p align="center"><strong>Declarative SQL pipelines — define what, not how.</strong></p>
16
+
17
+ ---
18
+
19
+ Rivet separates *what* to compute (joints) from *how* to compute (engines) and *where* data lives (catalogs). Define your pipeline once — run it on DuckDB, Polars, PySpark, or Postgres without changing your logic.
20
+
21
+ ## Features
22
+
23
+ - **Multi-engine execution** — swap between DuckDB, Polars, PySpark, and Postgres without rewriting pipelines
24
+ - **Declarative pipelines** — define joints in SQL, YAML, or Python
25
+ - **Quality checks** — assertions before write, audits after write
26
+ - **Built-in testing** — offline fixture-based tests with `rivet test`
27
+ - **Plugin architecture** — install only the engines you need
28
+ - **Interactive REPL** — explore and debug pipelines interactively
29
+
30
+ ## Quick Start
31
+
32
+ Install Rivet and the DuckDB plugin:
33
+
34
+ ```bash
35
+ pip install rivetsql[duckdb]
36
+ ```
37
+
38
+ Create and run a pipeline:
39
+
40
+ ```bash
41
+ mkdir my_pipeline && cd my_pipeline
42
+ rivet init
43
+ rivet run
44
+ ```
45
+
46
+ A minimal SQL joint (`joints/transform_orders.sql`):
47
+
48
+ ```sql
49
+ SELECT
50
+ order_id,
51
+ customer_name,
52
+ amount * 1.1 AS amount_with_tax
53
+ FROM {{ ref('raw_orders') }}
54
+ ```
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ # Full CLI + core
60
+ pip install rivetsql
61
+
62
+ # Core library only (no CLI)
63
+ pip install rivetsql-core
64
+
65
+ # With a specific plugin
66
+ pip install rivetsql[duckdb]
67
+
68
+ # All plugins
69
+ pip install rivetsql[all]
70
+ ```
71
+
72
+ ## Plugins
73
+
74
+ | Plugin | Install | Engine |
75
+ |--------|---------|--------|
76
+ | DuckDB | `pip install rivetsql[duckdb]` | In-process analytical SQL |
77
+ | Postgres | `pip install rivetsql[postgres]` | PostgreSQL databases |
78
+ | Polars | `pip install rivetsql[polars]` | DataFrame-based compute |
79
+ | PySpark | `pip install rivetsql[pyspark]` | Distributed Spark execution |
80
+ | Databricks | `pip install rivetsql[databricks]` | Databricks SQL warehouses |
81
+ | AWS | `pip install rivetsql[aws]` | S3 + Glue catalog integration |
82
+
83
+ ## Pipeline Visualization
84
+
85
+ ```mermaid
86
+ graph LR
87
+ subgraph Joints["Joints (What)"]
88
+ S[Source] --> T[Transform]
89
+ T --> K[Sink]
90
+ end
91
+
92
+ subgraph Engines["Engines (How)"]
93
+ DK[DuckDB]
94
+ PL[Polars]
95
+ PS[PySpark]
96
+ PG[Postgres]
97
+ end
98
+
99
+ subgraph Catalogs["Catalogs (Where)"]
100
+ FS[Filesystem]
101
+ DB[Database]
102
+ S3[Object Store]
103
+ end
104
+
105
+ T --> DK
106
+ T --> PL
107
+ T --> PS
108
+ T --> PG
109
+
110
+ K --> FS
111
+ K --> DB
112
+ K --> S3
113
+ ```
114
+
115
+ ## Links
116
+
117
+ - [Documentation](https://rivetsql.github.io/rivet)
118
+ - [Contributing Guide](CONTRIBUTING.md)
119
+ - [License (MIT)](LICENSE)
120
+ - [Changelog](CHANGELOG.md)
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "rivetsql"
7
+ version = "0.1.0"
8
+ description = "SQL pipeline framework — declare what, not how"
9
+ requires-python = ">=3.11"
10
+ license = "MIT"
11
+ readme = "README.md"
12
+ authors = [{ name = "Rivet Contributors" }]
13
+ keywords = ["sql", "data-pipeline", "etl", "elt", "dbt-alternative", "cli"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Topic :: Database",
21
+ ]
22
+ dependencies = [
23
+ "rivetsql-core>=0.1.0",
24
+ "textual>=1.0",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/rivetsql/rivet"
29
+ Documentation = "https://rivetsql.github.io/rivet"
30
+ Repository = "https://github.com/rivetsql/rivet"
31
+ Changelog = "https://github.com/rivetsql/rivet/blob/main/CHANGELOG.md"
32
+
33
+ [project.scripts]
34
+ rivet = "rivet_cli:main"
35
+
36
+ [project.optional-dependencies]
37
+ duckdb = ["rivetsql-duckdb>=0.1.0"]
38
+ postgres = ["rivetsql-postgres>=0.1.0"]
39
+ polars = ["rivetsql-polars>=0.1.0"]
40
+ pyspark = ["rivetsql-pyspark>=0.1.0"]
41
+ databricks = ["rivetsql-databricks>=0.1.0"]
42
+ aws = ["rivetsql-aws>=0.1.0"]
43
+ all = [
44
+ "rivetsql-duckdb>=0.1.0",
45
+ "rivetsql-postgres>=0.1.0",
46
+ "rivetsql-polars>=0.1.0",
47
+ "rivetsql-pyspark>=0.1.0",
48
+ "rivetsql-databricks>=0.1.0",
49
+ "rivetsql-aws>=0.1.0",
50
+ ]
51
+
52
+ [tool.hatch.build.targets.wheel]
53
+ packages = ["src/rivet_cli"]
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "rivetsql"
7
+ version = "0.1.0"
8
+ description = "SQL pipeline framework — declare what, not how"
9
+ requires-python = ">=3.11"
10
+ license = "MIT"
11
+ readme = "README.md"
12
+ authors = [{ name = "Rivet Contributors" }]
13
+ keywords = ["sql", "data-pipeline", "etl", "elt", "dbt-alternative", "cli"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Topic :: Database",
21
+ ]
22
+ dependencies = [
23
+ "rivetsql-core>=0.1.0",
24
+ "textual>=1.0",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/rivetsql/rivet"
29
+ Documentation = "https://rivetsql.github.io/rivet"
30
+ Repository = "https://github.com/rivetsql/rivet"
31
+ Changelog = "https://github.com/rivetsql/rivet/blob/main/CHANGELOG.md"
32
+
33
+ [project.scripts]
34
+ rivet = "rivet_cli:main"
35
+
36
+ [project.optional-dependencies]
37
+ duckdb = ["rivetsql-duckdb>=0.1.0"]
38
+ postgres = ["rivetsql-postgres>=0.1.0"]
39
+ polars = ["rivetsql-polars>=0.1.0"]
40
+ pyspark = ["rivetsql-pyspark>=0.1.0"]
41
+ databricks = ["rivetsql-databricks>=0.1.0"]
42
+ aws = ["rivetsql-aws>=0.1.0"]
43
+ all = [
44
+ "rivetsql-duckdb>=0.1.0",
45
+ "rivetsql-postgres>=0.1.0",
46
+ "rivetsql-polars>=0.1.0",
47
+ "rivetsql-pyspark>=0.1.0",
48
+ "rivetsql-databricks>=0.1.0",
49
+ "rivetsql-aws>=0.1.0",
50
+ ]
51
+
52
+ [tool.hatch.build.targets.wheel]
53
+ packages = ["src/rivet_cli"]
@@ -0,0 +1,176 @@
1
+ """Cross-reference declared dependencies against actual imports.
2
+
3
+ Scans all pyproject.toml files and verifies each declared dependency
4
+ has at least one corresponding import in the relevant source scope.
5
+ """
6
+
7
+ import re
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ # Map from PyPI package name to Python import name(s)
12
+ PACKAGE_TO_IMPORT = {
13
+ "pyarrow": ["pyarrow"],
14
+ "sqlglot": ["sqlglot"],
15
+ "pyyaml": ["yaml"],
16
+ "textual": ["textual"],
17
+ "textual-textarea": ["textual_textarea"],
18
+ "textual-fastdatatable": ["textual_fastdatatable"],
19
+ "pytest": ["pytest"],
20
+ "ruff": ["ruff"],
21
+ "mypy": ["mypy"],
22
+ "hypothesis": ["hypothesis"],
23
+ "rivet-core": ["rivet_core"],
24
+ "duckdb": ["duckdb"],
25
+ "psycopg": ["psycopg"],
26
+ "polars": ["polars"],
27
+ "deltalake": ["deltalake"],
28
+ "pyspark": ["pyspark"],
29
+ "boto3": ["boto3", "botocore"],
30
+ "requests": ["requests"],
31
+ "hatchling": [], # build-system only
32
+ }
33
+
34
+ IMPORT_RE = re.compile(r"^\s*(?:import|from)\s+([\w.]+)", re.MULTILINE)
35
+ # Match quoted dependency strings like "pkg>=1.0" or "pkg[extra]>=1.0"
36
+ DEP_STR_RE = re.compile(r'"([^"]+)"')
37
+ PKG_NAME_RE = re.compile(r'^([a-zA-Z0-9_-]+)')
38
+
39
+
40
+ def extract_imports(src_dir: Path) -> set[str]:
41
+ """Extract all top-level import names from .py files under src_dir."""
42
+ imports = set()
43
+ for py_file in src_dir.rglob("*.py"):
44
+ text = py_file.read_text(errors="ignore")
45
+ for m in IMPORT_RE.finditer(text):
46
+ imports.add(m.group(1).split(".")[0])
47
+ return imports
48
+
49
+
50
+ def parse_dep_strings(text: str) -> list[str]:
51
+ """Extract package names from a TOML array of dependency strings."""
52
+ names = []
53
+ for dep_str in DEP_STR_RE.findall(text):
54
+ m = PKG_NAME_RE.match(dep_str)
55
+ if m:
56
+ names.append(m.group(1))
57
+ return names
58
+
59
+
60
+ def find_toml_array(text: str, start: int) -> str:
61
+ """Extract content of a TOML array starting at '[', handling nested brackets."""
62
+ depth = 0
63
+ i = start
64
+ while i < len(text):
65
+ if text[i] == "[":
66
+ depth += 1
67
+ elif text[i] == "]":
68
+ depth -= 1
69
+ if depth == 0:
70
+ return text[start + 1 : i]
71
+ elif text[i] == '"':
72
+ i += 1
73
+ while i < len(text) and text[i] != '"':
74
+ i += 1
75
+ i += 1
76
+ return text[start + 1 :]
77
+
78
+
79
+ def parse_deps_from_toml(text: str) -> dict[str, list[str]]:
80
+ """Parse dependencies from pyproject.toml text."""
81
+ result: dict[str, list[str]] = {}
82
+
83
+ # Core dependencies
84
+ dep_match = re.search(r'\[project\].*?(?:^|\n)dependencies\s*=\s*(\[)', text, re.DOTALL)
85
+ if dep_match:
86
+ array_content = find_toml_array(text, dep_match.start(1))
87
+ result["dependencies"] = parse_dep_strings(array_content)
88
+
89
+ # Optional dependencies sections
90
+ opt_section = re.search(
91
+ r'\[project\.optional-dependencies\]\s*\n(.*?)(?=\n\[(?!^\s)|\Z)', text, re.DOTALL
92
+ )
93
+ if opt_section:
94
+ section_text = opt_section.group(1)
95
+ for m in re.finditer(r'(\w+)\s*=\s*(\[)', section_text):
96
+ section_name = m.group(1)
97
+ abs_start = opt_section.start(1) + m.start(2)
98
+ array_content = find_toml_array(text, abs_start)
99
+ result[f"optional[{section_name}]"] = parse_dep_strings(array_content)
100
+
101
+ return result
102
+
103
+
104
+ def main() -> int:
105
+ rivet_root = Path(__file__).resolve().parent.parent
106
+ src_root = rivet_root / "src"
107
+ all_findings: list[str] = []
108
+
109
+ # 1. Root pyproject.toml
110
+ root_pyproject = rivet_root / "pyproject.toml"
111
+ print(f"=== Auditing {root_pyproject.relative_to(rivet_root)} against src/ ===")
112
+ deps = parse_deps_from_toml(root_pyproject.read_text())
113
+ all_imports = extract_imports(src_root)
114
+
115
+ for section, pkg_names in deps.items():
116
+ for pkg in pkg_names:
117
+ pkg_lower = pkg.lower()
118
+ import_names = PACKAGE_TO_IMPORT.get(pkg_lower, [pkg_lower.replace("-", "_")])
119
+ if not import_names:
120
+ continue
121
+ if section == "optional[cli]":
122
+ scope_imports = extract_imports(src_root / "rivet_cli")
123
+ scope = "rivet_cli"
124
+ elif section == "optional[dev]":
125
+ continue # dev deps used in tests, not src
126
+ else:
127
+ scope_imports = all_imports
128
+ scope = "all src"
129
+ found = any(name in scope_imports for name in import_names)
130
+ status = "OK" if found else "UNUSED"
131
+ print(f" [{status}] {section} :: {pkg} (imports: {import_names}, scope: {scope})")
132
+ if status == "UNUSED":
133
+ all_findings.append(
134
+ f"root :: {section} :: {pkg} (imports: {import_names}, scope: {scope})"
135
+ )
136
+
137
+ # 2. Per-plugin pyproject.toml files
138
+ for plugin_dir in sorted(src_root.iterdir()):
139
+ plugin_pyproject = plugin_dir / "pyproject.toml"
140
+ if not plugin_pyproject.exists():
141
+ continue
142
+ label = plugin_dir.name
143
+ print(f"\n=== Auditing {label}/pyproject.toml against {label}/ ===")
144
+ deps = parse_deps_from_toml(plugin_pyproject.read_text())
145
+ plugin_imports = extract_imports(plugin_dir)
146
+
147
+ for section, pkg_names in deps.items():
148
+ for pkg in pkg_names:
149
+ pkg_lower = pkg.lower()
150
+ import_names = PACKAGE_TO_IMPORT.get(
151
+ pkg_lower, [pkg_lower.replace("-", "_")]
152
+ )
153
+ if not import_names:
154
+ continue
155
+ if pkg_lower == "rivet-core":
156
+ continue # self-reference
157
+ found = any(name in plugin_imports for name in import_names)
158
+ status = "OK" if found else "UNUSED"
159
+ print(f" [{status}] {section} :: {pkg} (imports: {import_names})")
160
+ if status == "UNUSED":
161
+ all_findings.append(f"{label} :: {section} :: {pkg}")
162
+
163
+ # Summary
164
+ print("\n" + "=" * 60)
165
+ if all_findings:
166
+ print(f"FINDINGS: {len(all_findings)} dependency(ies) with zero import references:")
167
+ for f in all_findings:
168
+ print(f" - {f}")
169
+ return 1
170
+ else:
171
+ print("All declared dependencies have matching imports. No issues found.")
172
+ return 0
173
+
174
+
175
+ if __name__ == "__main__":
176
+ sys.exit(main())
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env python3
2
+ """Scan all `from rivet_*` / `import rivet_*` imports under rivet/src/ and verify
3
+ boundary compliance.
4
+
5
+ Exit code 0 means no violations; exit code 1 means violations found.
6
+
7
+ Boundary rules (from rivet steering doc):
8
+ - rivet_core: only stdlib + pyarrow + sqlglot (no rivet_* imports)
9
+ - rivet_config: only rivet_core
10
+ - rivet_bridge: only rivet_core + rivet_config
11
+ - rivet_cli: only rivet_core + rivet_config + rivet_bridge
12
+ - Plugins (rivet_duckdb, rivet_postgres, rivet_polars, rivet_pyspark,
13
+ rivet_aws, rivet_databricks): only rivet_core
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import re
19
+ import sys
20
+ from dataclasses import dataclass
21
+ from pathlib import Path
22
+
23
+ ALLOWED_RIVET_IMPORTS: dict[str, set[str]] = {
24
+ "rivet_core": set(),
25
+ "rivet_config": {"rivet_core"},
26
+ "rivet_bridge": {"rivet_core", "rivet_config"},
27
+ "rivet_cli": {"rivet_core", "rivet_config", "rivet_bridge"},
28
+ # Plugins — only rivet_core
29
+ "rivet_duckdb": {"rivet_core"},
30
+ "rivet_postgres": {"rivet_core"},
31
+ "rivet_polars": {"rivet_core"},
32
+ "rivet_pyspark": {"rivet_core"},
33
+ "rivet_aws": {"rivet_core"},
34
+ "rivet_databricks": {"rivet_core"},
35
+ }
36
+
37
+ _IMPORT_RE = re.compile(r"(?:from|import)\s+(rivet_[a-z_]+)")
38
+
39
+
40
+ @dataclass(frozen=True)
41
+ class Violation:
42
+ file: str
43
+ line_no: int
44
+ source_module: str
45
+ imported_module: str
46
+ line_text: str
47
+
48
+
49
+ def scan_boundary_violations(src_dir: str | Path) -> list[Violation]:
50
+ """Return all boundary violations found under *src_dir*."""
51
+ src_dir = Path(src_dir)
52
+ violations: list[Violation] = []
53
+
54
+ for module_dir in sorted(src_dir.iterdir()):
55
+ if not module_dir.is_dir() or not module_dir.name.startswith("rivet_"):
56
+ continue
57
+ module_name = module_dir.name
58
+ allowed = ALLOWED_RIVET_IMPORTS.get(module_name, {"rivet_core"})
59
+
60
+ for py_file in sorted(module_dir.rglob("*.py")):
61
+ rel = str(py_file.relative_to(src_dir))
62
+ for line_no, raw_line in enumerate(py_file.read_text().splitlines(), 1):
63
+ stripped = raw_line.strip()
64
+ if stripped.startswith("#"):
65
+ continue
66
+ m = _IMPORT_RE.search(stripped)
67
+ if not m:
68
+ continue
69
+ imported = m.group(1)
70
+ if imported == module_name:
71
+ continue
72
+ if imported.startswith("rivet_") and imported not in allowed:
73
+ violations.append(
74
+ Violation(rel, line_no, module_name, imported, stripped)
75
+ )
76
+
77
+ return violations
78
+
79
+
80
+ def main() -> int:
81
+ src_dir = Path(__file__).resolve().parent.parent / "src"
82
+ violations = scan_boundary_violations(src_dir)
83
+
84
+ if not violations:
85
+ print("✅ No module boundary violations found.")
86
+ return 0
87
+
88
+ print(f"❌ Found {len(violations)} module boundary violation(s):\n")
89
+ for v in violations:
90
+ print(f" {v.file}:{v.line_no} [{v.source_module} → {v.imported_module}]")
91
+ print(f" {v.line_text}\n")
92
+ return 1
93
+
94
+
95
+ if __name__ == "__main__":
96
+ sys.exit(main())