Showing with 13,930 additions and 5,651 deletions.
  1. +15 −17 .github/workflows/conda-lock.yml
  2. +110 −31 .github/workflows/ibis-backends.yml
  3. +0 −52 .github/workflows/ibis-docs-release.yml
  4. +4 −1 .github/workflows/nix.yml
  5. +3 −3 .github/workflows/update-deps.yml
  6. +21 −5 .pre-commit-config.yaml
  7. +9 −7 .prettierignore
  8. +2 −1 .releaserc.js
  9. +1 −0 .taplo.toml
  10. +4 −0 ci/conda-lock/condarc
  11. +10 −3 ci/conda-lock/generate.sh
  12. +5 −0 ci/schema/duckdb.sql
  13. +6 −7 ci/schema/postgresql.sql
  14. +1 −1 ci/schema/sqlite.sql
  15. +181 −183 conda-lock/linux-64-3.10.lock
  16. +440 −0 conda-lock/linux-64-3.11.lock
  17. +181 −183 conda-lock/linux-64-3.8.lock
  18. +181 −183 conda-lock/linux-64-3.9.lock
  19. +178 −164 conda-lock/osx-64-3.10.lock
  20. +420 −0 conda-lock/osx-64-3.11.lock
  21. +178 −182 conda-lock/osx-64-3.8.lock
  22. +178 −165 conda-lock/osx-64-3.9.lock
  23. +178 −164 conda-lock/osx-arm64-3.10.lock
  24. +420 −0 conda-lock/osx-arm64-3.11.lock
  25. +178 −164 conda-lock/osx-arm64-3.8.lock
  26. +178 −164 conda-lock/osx-arm64-3.9.lock
  27. +161 −146 conda-lock/win-64-3.10.lock
  28. +421 −0 conda-lock/win-64-3.11.lock
  29. +161 −146 conda-lock/win-64-3.8.lock
  30. +161 −146 conda-lock/win-64-3.9.lock
  31. +37 −17 docker-compose.yml
  32. +6 −1 docker/postgres/Dockerfile
  33. +3 −0 docs/SUMMARY.md
  34. +1 −1 docs/api/selectors.md
  35. +1 −1 docs/blog/ibis-examples.md
  36. +1,814 −0 docs/blog/rendered/campaign-finance.ipynb
  37. +15 −15 docs/blog/selectors.md
  38. +63 −61 docs/community/contribute/01_environment.md
  39. +655 −0 docs/getting_started.md
  40. +1 −1 docs/ibis-for-sql-programmers.ipynb
  41. +3 −4 docs/index.md
  42. +104 −0 docs/release_notes.md
  43. +2 −2 docs/stylesheets/extra.css
  44. +80 −0 docs/why_ibis.md
  45. +9 −9 flake.lock
  46. +6 −3 flake.nix
  47. +1 −1 ibis/__init__.py
  48. +24 −35 ibis/backends/base/__init__.py
  49. +9 −4 ibis/backends/base/sql/__init__.py
  50. +16 −8 ibis/backends/base/sql/alchemy/__init__.py
  51. +16 −3 ibis/backends/base/sql/alchemy/datatypes.py
  52. +24 −27 ibis/backends/base/sql/alchemy/query_builder.py
  53. +8 −8 ibis/backends/base/sql/alchemy/registry.py
  54. +16 −5 ibis/backends/base/sql/alchemy/translator.py
  55. +1 −1 ibis/backends/base/sql/compiler/select_builder.py
  56. +7 −10 ibis/backends/base/sql/compiler/translator.py
  57. +2 −2 ibis/backends/base/sql/registry/main.py
  58. +37 −29 ibis/backends/bigquery/__init__.py
  59. +19 −6 ibis/backends/bigquery/tests/system/test_client.py
  60. +8 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_set_operation/difference/out.sql
  61. +8 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_set_operation/intersect/out.sql
  62. +8 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_set_operation/union_all/out.sql
  63. +8 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_set_operation/union_distinct/out.sql
  64. +11 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union/False/out.sql
  65. +11 −5 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union/True/out.sql
  66. +32 −12 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union_cte/False-False/out.sql
  67. +32 −12 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union_cte/False-True/out.sql
  68. +32 −12 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union_cte/True-False/out.sql
  69. +32 −12 ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_union_cte/True-True/out.sql
  70. +100 −49 ibis/backends/clickhouse/__init__.py
  71. +5 −4 ibis/backends/clickhouse/compiler/relations.py
  72. +49 −29 ibis/backends/clickhouse/compiler/values.py
  73. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_functions/test_column_regexp_extract/out.sql
  74. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_complex_array_expr_projection/out.sql
  75. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_isin_notin_in_select/out1.sql
  76. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_isin_notin_in_select/out2.sql
  77. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_isnull_case_expr_rewrite_failure/out.sql
  78. +2 −2 ibis/backends/clickhouse/tests/snapshots/test_select/test_join_self_reference/out.sql
  79. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_physical_table_reference_translate/out.sql
  80. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_self_reference_simple/out.sql
  81. +2 −2 .../clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-awardID-any_inner_join/out.sql
  82. +2 −2 ...s/clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-awardID-any_left_join/out.sql
  83. +2 −2 ...ends/clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-awardID-inner_join/out.sql
  84. +2 −2 ...kends/clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-awardID-left_join/out.sql
  85. +2 −2 ...clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-playerID-any_inner_join/out.sql
  86. +2 −2 .../clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-playerID-any_left_join/out.sql
  87. +2 −2 ...nds/clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-playerID-inner_join/out.sql
  88. +2 −2 ...ends/clickhouse/tests/snapshots/test_select/test_simple_joins/playerID-playerID-left_join/out.sql
  89. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_simple_scalar_aggregates/out.sql
  90. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_table_column_unbox/out.sql
  91. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_timestamp_extract_field/out.sql
  92. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_where_simple_comparisons/out.sql
  93. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_where_with_between/out.sql
  94. +1 −1 ibis/backends/clickhouse/tests/snapshots/test_select/test_where_with_timestamp/out.sql
  95. +83 −0 ibis/backends/clickhouse/tests/test_client.py
  96. +1 −1 ibis/backends/clickhouse/tests/test_operators.py
  97. +1 −1 ibis/backends/clickhouse/tests/test_select.py
  98. +74 −40 ibis/backends/conftest.py
  99. +1 −4 ibis/backends/dask/__init__.py
  100. +23 −10 ibis/backends/dask/client.py
  101. +13 −10 ibis/backends/dask/execution/generic.py
  102. +7 −4 ibis/backends/dask/execution/temporal.py
  103. +10 −8 ibis/backends/dask/tests/execution/test_arrays.py
  104. +6 −4 ibis/backends/dask/tests/execution/test_operations.py
  105. +12 −11 ibis/backends/dask/tests/execution/test_temporal.py
  106. +1 −1 ibis/backends/dask/tests/test_schema.py
  107. +2 −2 ibis/backends/dask/trace.py
  108. +3 −9 ibis/backends/datafusion/__init__.py
  109. +1 −0 ibis/backends/druid/registry.py
  110. +146 −93 ibis/backends/duckdb/__init__.py
  111. +1 −28 ibis/backends/duckdb/compiler.py
  112. +42 −7 ibis/backends/duckdb/datatypes.py
  113. +0 −32 ibis/backends/duckdb/pyarrow.py
  114. +71 −21 ibis/backends/duckdb/registry.py
  115. +33 −28 ibis/backends/duckdb/tests/conftest.py
  116. +55 −19 ibis/backends/duckdb/tests/test_register.py
  117. +1 −1 ibis/backends/impala/client.py
  118. +3 −3 ibis/backends/impala/metadata.py
  119. +63 −70 ibis/backends/impala/tests/conftest.py
  120. +0 −1 ibis/backends/impala/tests/snapshots/test_analytic_functions/test_analytic_exprs/row_number/out.sql
  121. +0 −1 ibis/backends/impala/tests/snapshots/test_value_exprs/test_decimal_builtins/precision/out.sql
  122. +0 −1 ibis/backends/impala/tests/snapshots/test_value_exprs/test_decimal_builtins/scale/out.sql
  123. +1 −1 ibis/backends/impala/tests/test_client.py
  124. +1 −1 ibis/backends/impala/tests/test_ddl.py
  125. +3 −4 ibis/backends/impala/tests/test_exprs.py
  126. +5 −5 ibis/backends/impala/tests/test_sql.py
  127. +7 −7 ibis/backends/impala/tests/test_window.py
  128. +6 −1 ibis/backends/mssql/compiler.py
  129. +15 −3 ibis/backends/mssql/registry.py
  130. +1 −1 ibis/backends/mysql/compiler.py
  131. +5 −6 ibis/backends/pandas/__init__.py
  132. +27 −28 ibis/backends/pandas/client.py
  133. +17 −5 ibis/backends/pandas/execution/generic.py
  134. +4 −1 ibis/backends/pandas/execution/temporal.py
  135. +4 −6 ibis/backends/pandas/tests/execution/test_arrays.py
  136. +4 −4 ibis/backends/pandas/tests/execution/test_operations.py
  137. +12 −9 ibis/backends/pandas/tests/execution/test_temporal.py
  138. +4 −3 ibis/backends/pandas/tests/test_schema.py
  139. +2 −2 ibis/backends/pandas/trace.py
  140. +4 −11 ibis/backends/polars/__init__.py
  141. +1 −0 ibis/backends/polars/compiler.py
  142. +10 −2 ibis/backends/polars/datatypes.py
  143. +55 −1 ibis/backends/postgres/__init__.py
  144. +3 −0 ibis/backends/postgres/compiler.py
  145. +6 −2 ibis/backends/postgres/datatypes.py
  146. +69 −1 ibis/backends/postgres/registry.py
  147. +1 −1 ibis/backends/postgres/tests/snapshots/test_functions/test_union_cte/False/out.sql
  148. +1 −1 ibis/backends/postgres/tests/snapshots/test_functions/test_union_cte/True/out.sql
  149. +8 −2 ibis/backends/postgres/tests/test_client.py
  150. +18 −22 ibis/backends/postgres/tests/test_functions.py
  151. +1 −1 ibis/backends/postgres/tests/test_geospatial.py
  152. +0 −7 ibis/backends/postgres/tests/test_string.py
  153. +28 −0 ibis/backends/pyarrow/__init__.py
  154. +2 −0 ibis/backends/pyarrow/datatypes.py
  155. +151 −2 ibis/backends/pyspark/__init__.py
  156. +85 −5 ibis/backends/pyspark/compiler.py
  157. +22 −0 ibis/backends/pyspark/datatypes.py
  158. +58 −1 ibis/backends/pyspark/tests/conftest.py
  159. +15 −1 ibis/backends/pyspark/tests/test_array.py
  160. +31 −0 ibis/backends/pyspark/tests/test_basic.py
  161. +147 −22 ibis/backends/snowflake/__init__.py
  162. +7 −0 ibis/backends/snowflake/datatypes.py
  163. +20 −2 ibis/backends/snowflake/registry.py
  164. +1 −1 ibis/backends/sqlite/__init__.py
  165. +10 −0 ibis/backends/sqlite/registry.py
  166. +39 −58 ibis/backends/sqlite/tests/conftest.py
  167. +8 −8 ibis/backends/sqlite/tests/test_client.py
  168. +6 −23 ibis/backends/sqlite/tests/test_functions.py
  169. +3 −1 ibis/backends/sqlite/tests/test_types.py
  170. +27 −0 ibis/backends/sqlite/udf.py
  171. +13 −13 ibis/backends/tests/snapshots/test_generic/test_many_subqueries/snowflake/out.sql
  172. +7 −7 ibis/backends/tests/snapshots/test_sql/test_cte_refs_in_topo_order/snowflake/out.sql
  173. +4 −4 ibis/backends/tests/snapshots/test_sql/test_group_by_has_index/snowflake/out.sql
  174. +6 −6 ibis/backends/tests/snapshots/test_sql/test_isin_bug/snowflake/out.sql
  175. +132 −0 ibis/backends/tests/snapshots/test_sql/test_union_aliasing/clickhouse/out.sql
  176. +94 −0 ibis/backends/tests/snapshots/test_sql/test_union_aliasing/duckdb/out.sql
  177. +79 −0 ibis/backends/tests/snapshots/test_sql/test_union_aliasing/postgres/out.sql
  178. +75 −0 ibis/backends/tests/snapshots/test_sql/test_union_aliasing/trino/out.sql
  179. +5 −0 ibis/backends/tests/snapshots/test_string/test_rlike/bigquery/out.sql
  180. +5 −0 ibis/backends/tests/snapshots/test_string/test_rlike/clickhouse/out.sql
  181. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/duckdb/out.sql
  182. +5 −0 ibis/backends/tests/snapshots/test_string/test_rlike/impala/out.sql
  183. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/mysql/out.sql
  184. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/postgres/out.sql
  185. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/snowflake/out.sql
  186. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/sqlite/out.sql
  187. +19 −0 ibis/backends/tests/snapshots/test_string/test_rlike/trino/out.sql
  188. +19 −141 ibis/backends/tests/test_aggregation.py
  189. +18 −5 ibis/backends/tests/test_api.py
  190. +256 −33 ibis/backends/tests/test_array.py
  191. +61 −146 ibis/backends/tests/test_client.py
  192. +6 −3 ibis/backends/tests/test_export.py
  193. +204 −9 ibis/backends/tests/test_generic.py
  194. +2 −2 ibis/backends/tests/test_join.py
  195. +6 −2 ibis/backends/tests/test_json.py
  196. +12 −5 ibis/backends/tests/test_map.py
  197. +1 −1 ibis/backends/tests/test_param.py
  198. +118 −21 ibis/backends/tests/test_register.py
  199. +0 −1 ibis/backends/tests/test_set_ops.py
  200. +71 −1 ibis/backends/tests/test_sql.py
  201. +30 −3 ibis/backends/tests/test_string.py
  202. +17 −36 ibis/backends/tests/test_temporal.py
  203. +1 −0 ibis/backends/tests/test_timecontext.py
  204. +2 −0 ibis/backends/tests/test_vectorized_udf.py
  205. +301 −146 ibis/backends/tests/test_window.py
  206. +0 −1 ibis/backends/trino/__init__.py
  207. +2 −1 ibis/backends/trino/compiler.py
  208. +4 −4 ibis/backends/trino/datatypes.py
  209. +42 −13 ibis/backends/trino/registry.py
  210. +78 −1 ibis/common/caching.py
  211. +1 −1 ibis/common/tests/test_grounds.py
  212. +8 −2 ibis/conftest.py
  213. +4 −0 ibis/examples/CITATIONS.md
  214. +23 −11 ibis/examples/tests/test_examples.py
  215. +13 −2 ibis/expr/analysis.py
  216. +60 −27 ibis/expr/api.py
  217. +16 −0 ibis/expr/datatypes/core.py
  218. +9 −0 ibis/expr/datatypes/parse.py
  219. +15 −0 ibis/expr/datatypes/tests/test_parse.py
  220. +3 −4 ibis/expr/deferred.py
  221. +51 −0 ibis/expr/operations/arrays.py
  222. +32 −6 ibis/expr/operations/relations.py
  223. +6 −0 ibis/expr/rules.py
  224. +6 −457 ibis/expr/selectors.py
  225. +0 −7 ibis/expr/sql.py
  226. +12 −0 ibis/expr/tests/test_deferred.py
  227. +302 −14 ibis/expr/types/arrays.py
  228. +24 −5 ibis/expr/types/generic.py
  229. +4 −2 ibis/expr/types/groupby.py
  230. +4 −4 ibis/expr/types/json.py
  231. +11 −12 ibis/expr/types/pretty.py
  232. +821 −114 ibis/expr/types/relations.py
  233. +3 −3 ibis/expr/types/strings.py
  234. +1 −1 ibis/interactive.py
  235. +491 −0 ibis/selectors.py
  236. +6 −0 ibis/tests/expr/mocks.py
  237. +1 −1 ibis/tests/expr/test_analysis.py
  238. +5 −5 ibis/tests/expr/test_pretty_repr.py
  239. +8 −5 ibis/tests/expr/test_set_operations.py
  240. +1 −1 ibis/tests/expr/test_struct.py
  241. +80 −28 ibis/tests/expr/test_table.py
  242. +2 −2 ibis/tests/expr/test_value_exprs.py
  243. +1 −1 ibis/tests/expr/test_window_frames.py
  244. +1 −1 ibis/tests/sql/conftest.py
  245. +2 −1 ibis/tests/sql/snapshots/test_compiler/test_difference_project_column/decompiled.py
  246. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_difference_project_column/out.sql
  247. +2 −1 ibis/tests/sql/snapshots/test_compiler/test_intersect_project_column/decompiled.py
  248. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_intersect_project_column/out.sql
  249. +3 −2 ibis/tests/sql/snapshots/test_compiler/test_table_difference/decompiled.py
  250. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_table_difference/out.sql
  251. +3 −2 ibis/tests/sql/snapshots/test_compiler/test_table_intersect/decompiled.py
  252. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_table_intersect/out.sql
  253. +3 −2 ibis/tests/sql/snapshots/test_compiler/test_union/decompiled.py
  254. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_union/out.sql
  255. +2 −1 ibis/tests/sql/snapshots/test_compiler/test_union_order_by/decompiled.py
  256. +13 −10 ibis/tests/sql/snapshots/test_compiler/test_union_order_by/out.sql
  257. +2 −1 ibis/tests/sql/snapshots/test_compiler/test_union_project_column/decompiled.py
  258. +18 −15 ibis/tests/sql/snapshots/test_compiler/test_union_project_column/out.sql
  259. +36 −17 ibis/tests/sql/snapshots/test_select_sql/test_complex_union/result.sql
  260. +2 −1 ibis/tests/sql/snapshots/test_select_sql/test_subquery_in_union/decompiled.py
  261. +25 −11 ibis/tests/sql/snapshots/test_select_sql/test_subquery_in_union/out.sql
  262. +8 −8 ibis/tests/sql/test_compiler.py
  263. +10 −10 ibis/tests/sql/test_select_sql.py
  264. +1 −1 ibis/tests/sql/test_sqlalchemy.py
  265. +2 −2 ibis/tests/test_api.py
  266. +2 −0 ibis/tests/util.py
  267. +2 −24 ibis/util.py
  268. +2 −1 justfile
  269. +6 −4 mkdocs.yml
  270. +1 −0 nix/ibis.nix
  271. +21 −9 nix/overlay.nix
  272. +0 −2 poetry-overrides.nix
  273. +800 −777 poetry.lock
  274. +53 −55 pyproject.toml
  275. +65 −63 requirements.txt
32 changes: 15 additions & 17 deletions .github/workflows/conda-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,27 @@ jobs:

- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
miniforge-version: latest
miniforge-variant: Mambaforge
miniconda-version: latest
activate-environment: conda-lock
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
python-version: "3.11"
condarc-file: ci/conda-lock/condarc

- name: install conda libmamba solver
run: conda install -n base conda-libmamba-solver

- name: set solver to libmamba
run: conda config --set solver libmamba

- name: install conda-lock
run: mamba install 'conda-lock>=1.4'
run: conda install conda-lock=1.4

- name: generate lock file
run: ./ci/conda-lock/generate.sh "${{ matrix.python-version }}"

- name: create conda environment
run: mamba create --name ibis${{ matrix.python-version }} --file conda-lock/linux-64-${{ matrix.python-version }}.lock
run: conda create --name ibis${{ matrix.python-version }} --file conda-lock/linux-64-${{ matrix.python-version }}.lock

- name: upload conda lock files
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -78,7 +84,7 @@ jobs:
name: conda-lock-files-${{ github.run_attempt }}
path: conda-lock

- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
id: create_pr
with:
token: ${{ steps.generate_pr_token.outputs.token }}
Expand All @@ -93,13 +99,13 @@ jobs:
labels: |
dependencies
- uses: juliangruber/approve-pull-request-action@v2.0.3
- uses: juliangruber/approve-pull-request-action@v2.0.4
if: steps.create_pr.outputs.pull-request-operation == 'created'
with:
github-token: ${{ steps.generate_pr_approval_token.outputs.token }}
number: ${{ steps.create_pr.outputs.pull-request-number }}

- uses: peter-evans/enable-pull-request-automerge@v2
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.create_pr.outputs.pull-request-operation == 'created'
with:
token: ${{ steps.generate_pr_token.outputs.token }}
Expand Down Expand Up @@ -151,11 +157,3 @@ jobs:
git pull --rebase -s recursive -X ours
git push
fi
- name: react on success
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
141 changes: 110 additions & 31 deletions .github/workflows/ibis-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ jobs:
- postgres
sys-deps:
- libgeos-dev
- name: postgres
title: PostgreSQL + PyArrow
extras:
- postgres
- geospatial
additional_deps:
- pyarrow
services:
- postgres
sys-deps:
- libgeos-dev
- name: impala
title: Impala
serial: true
Expand Down Expand Up @@ -133,30 +144,6 @@ jobs:
- druid
services:
- druid
include:
- os: ubuntu-latest
python-version: "3.8"
backend:
name: pyspark
title: PySpark
serial: true
extras:
- pyspark
- os: ubuntu-latest
python-version: "3.10"
backend:
name: pyspark
title: PySpark
serial: true
extras:
- pyspark
- os: ubuntu-latest
python-version: "3.11"
backend:
name: pyspark
title: PySpark
extras:
- pyspark
exclude:
- os: windows-latest
backend:
Expand Down Expand Up @@ -188,6 +175,19 @@ jobs:
- postgres
sys-deps:
- libgeos-dev
- os: windows-latest
backend:
name: postgres
title: PostgreSQL + PyArrow
extras:
- postgres
- geospatial
additional_deps:
- pyarrow
services:
- postgres
sys-deps:
- libgeos-dev
- os: windows-latest
backend:
name: impala
Expand Down Expand Up @@ -243,12 +243,6 @@ jobs:
if: matrix.os == 'windows-latest' && matrix.backend.name == 'sqlite'
run: choco install sqlite

- uses: actions/setup-java@v3
if: matrix.backend.name == 'pyspark'
with:
distribution: microsoft
java-version: 17

- name: checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -284,6 +278,10 @@ jobs:
- name: install ibis
run: poetry install --without dev --without docs --extras "${{ join(matrix.backend.extras, ' ') }}"

- name: install other deps
if: matrix.backend.additional_deps != null
run: poetry run pip install "${{ join(matrix.backend.additional_deps, ' ') }}"

- name: "run parallel tests: ${{ matrix.backend.name }}"
if: ${{ !matrix.backend.serial }}
run: just ci-check -m ${{ matrix.backend.name }} --numprocesses auto --dist=loadgroup
Expand Down Expand Up @@ -334,6 +332,7 @@ jobs:
title: Dask
deps:
- "dask[array,dataframe]@2022.9.1"
- "pandas@1.5.3"
extras:
- dask
- name: postgres
Expand Down Expand Up @@ -439,6 +438,81 @@ jobs:
if: ${{ failure() }}
run: docker compose logs

test_pyspark:
name: PySpark ${{ matrix.os }} python-${{ matrix.python-version }} pandas-${{ matrix.pandas-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
pandas-version:
- "1.5.*"
- "2.*.*"
include:
- os: ubuntu-latest
python-version: "3.8"
pandas-version: "1.5.*"
- os: ubuntu-latest
python-version: "3.11"
pandas-version: "2.*.*"
steps:
- name: checkout
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: microsoft
java-version: 17

- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: download backend data
run: just download-data

- name: install python
uses: actions/setup-python@v4
id: install_python
with:
python-version: ${{ matrix.python-version }}

- run: python -m pip install --upgrade pip 'poetry<1.4'

- name: install minimum versions
run: poetry add --lock 'pandas@${{ matrix.pandas-version }}' 'numpy@1.23.*'

- name: checkout the lock file
run: git checkout poetry.lock

- name: lock with no updates
# poetry add is aggressive and will update other dependencies like
# numpy and pandas so we keep the pyproject.toml edits and then relock
# without updating anything except the requested versions
run: poetry lock --no-update

- name: install ibis
run: poetry install --without dev --without docs --extras pyspark

- name: run tests
run: just ci-check -m pyspark

- name: upload code coverage
if: success()
uses: codecov/codecov-action@v3
with:
flags: backend,pyspark,${{ runner.os }},python-${{ steps.install_python.outputs.python-version }},pandas-${{ matrix.pandas-version }}

- name: publish test report
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: pyspark-${{ matrix.os }}-${{ matrix.python-version }}
path: junit.xml

gen_lockfile_sqlalchemy2:
name: Generate Poetry Lockfile for SQLAlchemy 2
runs-on: ubuntu-latest
Expand All @@ -454,7 +528,7 @@ jobs:
- run: python -m pip install --upgrade pip 'poetry<1.4'

- name: remove deps that are not compatible with sqlalchemy 2
run: poetry remove duckdb-engine snowflake-sqlalchemy
run: poetry remove snowflake-sqlalchemy

- name: add sqlalchemy 2
run: poetry add --lock --optional 'sqlalchemy>=2,<3'
Expand Down Expand Up @@ -522,6 +596,10 @@ jobs:
extras:
- trino
- postgres
- name: duckdb
title: DuckDB
extras:
- duckdb
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -602,5 +680,6 @@ jobs:
- test_backends_min_version
- test_backends
- test_backends_sqlalchemy2
- test_pyspark
steps:
- run: exit 0
52 changes: 0 additions & 52 deletions .github/workflows/ibis-docs-release.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: check poetry version
run: nix run '.#check-poetry-version' -- "1.3"

- name: setup cachix
uses: cachix/cachix-action@v12
with:
Expand All @@ -64,7 +67,7 @@ jobs:
nix build ".#ibis${version//./}" --fallback --keep-going --print-build-logs
- name: nix build devShell
if: github.event_name == 'push'
if: github.event_name == 'push' && matrix.os != 'macos-latest'
run: |
set -euo pipefail
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
basehead: ${{ steps.get_current_commit.outputs.rev }}...${{ steps.get_new_commit.outputs.rev }}
include-merge-commits: false

- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
if: fromJSON(steps.needs_pr.outputs.did_change)
id: create_pr
with:
Expand All @@ -99,13 +99,13 @@ jobs:
body: ${{ steps.compare_commits.outputs.differences }}
labels: dependencies,nix

- uses: juliangruber/approve-pull-request-action@v2.0.3
- uses: juliangruber/approve-pull-request-action@v2.0.4
if: fromJSON(steps.needs_pr.outputs.did_change)
with:
github-token: ${{ steps.generate_pr_approval_token.outputs.token }}
number: ${{ steps.create_pr.outputs.pull-request-number }}

- uses: peter-evans/enable-pull-request-automerge@v2
- uses: peter-evans/enable-pull-request-automerge@v3
if: fromJSON(steps.needs_pr.outputs.did_change)
with:
token: ${{ steps.generate_pr_token.outputs.token }}
Expand Down
Loading