Showing with 18,913 additions and 10,276 deletions.
  1. +126 −0 .commitlintrc.json
  2. +3 −0 .czrc
  3. +3 −0 .envrc
  4. +5 −1 .gitattributes
  5. +10 −0 .github/renovate.json
  6. +1 −0 .github/rotate-key-template.md
  7. +8 −9 .github/workflows/assign.yml
  8. +25 −0 .github/workflows/auto-rebase.yml
  9. +111 −0 .github/workflows/check-setup-py.yml
  10. +57 −0 .github/workflows/ci-data.yml
  11. +31 −0 .github/workflows/codeql-analysis.yml
  12. +26 −0 .github/workflows/conda-lock-dispatch.yml
  13. +32 −0 .github/workflows/conda-lock-pr.yml
  14. +133 −0 .github/workflows/conda-lock.yml
  15. +29 −0 .github/workflows/create-rotate-key-issue.yml
  16. +557 −0 .github/workflows/ibis-backends.yml
  17. +172 −0 .github/workflows/ibis-docs-lint.yml
  18. +145 −0 .github/workflows/ibis-main.yml
  19. +0 −524 .github/workflows/main.yml
  20. +43 −0 .github/workflows/release.yml
  21. +8 −4 .github/workflows/test-report.yml
  22. +111 −0 .github/workflows/update-deps.yml
  23. +63 −0 .github/workflows/update-setup-py.yml
  24. +18 −0 .gitignore
  25. +4 −0 .pep8speaks.yml
  26. +0 −24 .pre-commit-config.yaml
  27. +36 −0 .releaserc.json
  28. +1 −0 .rgignore
  29. +0 −24 MANIFEST.in
  30. +2 −1 README.md
  31. +25 −29 ci/datamgr.py
  32. +0 −7 ci/deps/clickhouse.yml
  33. +0 −4 ci/deps/dask-min.yml
  34. +0 −6 ci/deps/dask.yml
  35. +0 −3 ci/deps/hdf5.yml
  36. +0 −8 ci/deps/impala.yml
  37. +0 −4 ci/deps/mysql.yml
  38. +0 −3 ci/deps/parquet.yml
  39. +0 −7 ci/deps/postgres-min.yml
  40. +0 −7 ci/deps/postgres.yml
  41. +0 −6 ci/deps/pyspark-min.yml
  42. +0 −3 ci/deps/pyspark.yml
  43. +0 −28 ci/merge_and_update_env.sh
  44. +2 −1 ci/recipe/meta.yaml
  45. +40 −0 ci/release/dry_run.sh
  46. +11 −0 ci/release/prepare.sh
  47. +7 −0 ci/release/publish.sh
  48. +15 −0 ci/release/run.sh
  49. +15 −0 ci/release/verify.sh
  50. +15 −11 ci/run_tests.sh
  51. +351 −0 conda-lock/linux-64-3.7.lock
  52. +351 −0 conda-lock/linux-64-3.8.lock
  53. +349 −0 conda-lock/linux-64-3.9.lock
  54. +330 −0 conda-lock/osx-64-3.7.lock
  55. +330 −0 conda-lock/osx-64-3.8.lock
  56. +328 −0 conda-lock/osx-64-3.9.lock
  57. +326 −0 conda-lock/win-64-3.7.lock
  58. +326 −0 conda-lock/win-64-3.8.lock
  59. +324 −0 conda-lock/win-64-3.9.lock
  60. +42 −0 default.nix
  61. +14 −0 dev/poetry2setup
  62. +56 −0 dev/poetry2setup.py
  63. +4 −3 docs/Makefile
  64. +0 −1 docs/_config.yml
  65. +82 −0 docs/mkdocs.yml
  66. +0 −1 docs/source/api.rst
  67. +14 −2 docs/source/backends/clickhouse.rst
  68. +56 −0 docs/source/backends/datafusion.rst
  69. +15 −6 docs/source/backends/impala.rst
  70. +1 −0 docs/source/backends/index.rst
  71. +13 −0 docs/source/backends/mysql.rst
  72. +1 −1 docs/source/backends/pandas.rst
  73. +12 −0 docs/source/backends/postgres.rst
  74. +15 −6 docs/source/backends/pyspark.rst
  75. +12 −0 docs/source/backends/sqlite.rst
  76. +16 −17 docs/source/conf.py
  77. +3 −4 docs/source/index.rst
  78. +0 −384 docs/source/release/index.rst
  79. +0 −665 docs/source/release/release-pre-1.0.rst
  80. +1 −1 docs/source/tutorial/01-Introduction-to-Ibis.ipynb
  81. +1 −1 docs/source/tutorial/03-Expressions-Lazy-Mode-Logging.ipynb
  82. +2 −1 docs/source/user_guide/extending/extending_elementwise_expr.ipynb
  83. +2 −1 docs/source/user_guide/extending/extending_reduce_expr.ipynb
  84. +7 −32 docs/web/about/team.md
  85. +15 −14 docs/web/community/coc.md
  86. +0 −2 docs/web/community/ecosystem.md
  87. +0 −68 docs/web/config.yml
  88. +339 −117 docs/web/contribute.md
  89. +13 −22 docs/web/getting_started.md
  90. +4 −9 docs/web/index.md
  91. +1,121 −0 docs/web/release_notes.md
  92. +0 −69 docs/web/static/css/codehilite.css
  93. +0 −104 docs/web/static/css/ibis.css
  94. BIN docs/web/static/img/install/anaconda_prompt.png
  95. BIN docs/web/static/img/install/jupyterlab_home.png
  96. +0 −59 environment.yml
  97. +23 −12 ibis/__init__.py
  98. +0 −520 ibis/_version.py
  99. +62 −46 ibis/backends/base/__init__.py
  100. +8 −11 ibis/backends/base/file/__init__.py
  101. +1 −1 ibis/backends/base/sql/__init__.py
  102. +6 −12 ibis/backends/base/sql/alchemy/__init__.py
  103. +5 −0 ibis/backends/base/sql/alchemy/database.py
  104. +14 −16 ibis/backends/base/sql/alchemy/query_builder.py
  105. +3 −3 ibis/backends/base/sql/alchemy/registry.py
  106. +4 −26 ibis/backends/base/sql/alchemy/translator.py
  107. +1 −25 ibis/backends/base/sql/compiler/select_builder.py
  108. +48 −59 ibis/backends/base/sql/compiler/translator.py
  109. +1 −4 ibis/backends/base/sql/registry/window.py
  110. +2 −4 ibis/backends/clickhouse/__init__.py
  111. +28 −0 ibis/backends/clickhouse/compiler.py
  112. +8 −0 ibis/backends/clickhouse/registry.py
  113. +3 −1 ibis/backends/clickhouse/tests/test_aggregations.py
  114. +0 −16 ibis/backends/clickhouse/tests/test_client.py
  115. +28 −15 ibis/backends/clickhouse/tests/test_functions.py
  116. +3 −2 ibis/backends/clickhouse/tests/test_operators.py
  117. +3 −17 ibis/backends/clickhouse/tests/test_select.py
  118. +6 −4 ibis/backends/dask/__init__.py
  119. +0 −30 ibis/backends/dask/client.py
  120. +1 −1 ibis/backends/dask/core.py
  121. +8 −0 ibis/backends/dask/execution/generic.py
  122. +7 −2 ibis/backends/dask/execution/join.py
  123. +0 −17 ibis/backends/dask/execution/reductions.py
  124. +0 −3 ibis/backends/dask/execution/selection.py
  125. +36 −2 ibis/backends/dask/tests/execution/test_join.py
  126. +100 −1 ibis/backends/dask/tests/execution/test_timecontext.py
  127. +0 −6 ibis/backends/dask/tests/test_udf.py
  128. +1 −1 ibis/backends/dask/trace.py
  129. +11 −13 ibis/backends/dask/udf.py
  130. +173 −0 ibis/backends/datafusion/__init__.py
  131. +396 −0 ibis/backends/datafusion/compiler.py
  132. +90 −0 ibis/backends/datafusion/datatypes.py
  133. 0 ibis/backends/datafusion/tests/__init__.py
  134. +77 −0 ibis/backends/datafusion/tests/conftest.py
  135. +6 −0 ibis/backends/datafusion/tests/test_client.py
  136. +20 −0 ibis/backends/datafusion/tests/test_select.py
  137. +43 −0 ibis/backends/datafusion/tests/test_udf.py
  138. +5 −7 ibis/backends/hdf5/__init__.py
  139. +3 −12 ibis/backends/impala/__init__.py
  140. +2 −9 ibis/backends/impala/hdfs.py
  141. +6 −5 ibis/backends/impala/tests/test_client.py
  142. +43 −55 ibis/backends/impala/tests/test_exprs.py
  143. +21 −52 ibis/backends/impala/udf.py
  144. +3 −5 ibis/backends/mysql/__init__.py
  145. +14 −0 ibis/backends/mysql/registry.py
  146. +2 −4 ibis/backends/pandas/__init__.py
  147. +86 −113 ibis/backends/pandas/aggcontext.py
  148. +0 −45 ibis/backends/pandas/client.py
  149. +1 −1 ibis/backends/pandas/core.py
  150. +16 −10 ibis/backends/pandas/execution/generic.py
  151. +6 −1 ibis/backends/pandas/execution/join.py
  152. +18 −7 ibis/backends/pandas/tests/execution/test_functions.py
  153. +25 −0 ibis/backends/pandas/tests/execution/test_join.py
  154. +13 −0 ibis/backends/pandas/tests/execution/test_operations.py
  155. +63 −1 ibis/backends/pandas/tests/execution/test_timecontext.py
  156. +0 −10 ibis/backends/pandas/tests/test_datatypes.py
  157. +0 −6 ibis/backends/pandas/tests/test_udf.py
  158. +1 −1 ibis/backends/pandas/trace.py
  159. +3 −4 ibis/backends/postgres/__init__.py
  160. +3 −1 ibis/backends/postgres/tests/test_functions.py
  161. +7 −16 ibis/backends/pyspark/__init__.py
  162. +22 −2 ibis/backends/pyspark/compiler.py
  163. +42 −6 ibis/backends/sqlite/__init__.py
  164. +1 −1 ibis/backends/sqlite/tests/test_client.py
  165. +21 −15 ibis/backends/tests/conftest.py
  166. +1 −1 ibis/backends/tests/test_aggregation.py
  167. +80 −1 ibis/backends/tests/test_generic.py
  168. +1 −1 ibis/backends/tests/test_numeric.py
  169. +9 −14 ibis/backends/tests/test_string.py
  170. +1 −1 ibis/backends/tests/test_temporal.py
  171. +1 −1 ibis/backends/tests/test_union.py
  172. +4 −8 ibis/config.py
  173. +2 −2 ibis/expr/analysis.py
  174. +4 −166 ibis/expr/analytics.py
  175. +281 −147 ibis/expr/api.py
  176. +128 −0 ibis/expr/builders.py
  177. +53 −0 ibis/expr/datatypes.py
  178. +1 −6 ibis/expr/format.py
  179. +1 −1 ibis/expr/groupby.py
  180. +0 −3,713 ibis/expr/operations.py
  181. +15 −0 ibis/expr/operations/__init__.py
  182. +255 −0 ibis/expr/operations/analytic.py
  183. +71 −0 ibis/expr/operations/arrays.py
  184. +197 −0 ibis/expr/operations/core.py
  185. +509 −0 ibis/expr/operations/generic.py
  186. +500 −0 ibis/expr/operations/geospatial.py
  187. +78 −0 ibis/expr/operations/histograms.py
  188. +167 −0 ibis/expr/operations/logical.py
  189. +70 −0 ibis/expr/operations/maps.py
  190. +309 −0 ibis/expr/operations/numeric.py
  191. +279 −0 ibis/expr/operations/reductions.py
  192. +821 −0 ibis/expr/operations/relations.py
  193. +108 −0 ibis/expr/operations/sortkeys.py
  194. +227 −0 ibis/expr/operations/strings.py
  195. +365 −0 ibis/expr/operations/temporal.py
  196. +47 −0 ibis/expr/operations/vectorized.py
  197. +265 −61 ibis/expr/rules.py
  198. +130 −145 ibis/expr/signature.py
  199. +25 −91 ibis/expr/types.py
  200. +2 −3 ibis/expr/visualize.py
  201. +11 −2 ibis/expr/window.py
  202. +2 −0 ibis/tests/expr/conftest.py
  203. +2 −1 ibis/tests/expr/mocks.py
  204. +83 −55 ibis/tests/expr/test_analytics.py
  205. +1 −0 ibis/tests/expr/test_datatypes.py
  206. +0 −24 ibis/tests/expr/test_format.py
  207. +81 −83 ibis/tests/expr/test_interactive.py
  208. +32 −0 ibis/tests/expr/test_literal.py
  209. +75 −16 ibis/tests/expr/test_rules.py
  210. +171 −99 ibis/tests/expr/test_signature.py
  211. +79 −8 ibis/tests/expr/test_table.py
  212. +81 −0 ibis/tests/expr/test_udf.py
  213. +7 −44 ibis/tests/expr/test_value_exprs.py
  214. +2 −2 ibis/tests/expr/test_visualize.py
  215. +17 −30 ibis/tests/sql/test_compiler.py
  216. +105 −25 ibis/tests/sql/test_sqlalchemy.py
  217. +49 −6 ibis/tests/test_api.py
  218. +36 −0 ibis/tests/test_util.py
  219. +2 −2 ibis/udf/vectorized.py
  220. +42 −0 ibis/util.py
  221. +49 −0 nix/default.nix
  222. +50 −0 nix/sources.json
  223. +174 −0 nix/sources.nix
  224. +78 −0 patches/Cargo.lock.patch
  225. +108 −0 poetry-overrides.nix
  226. +3,737 −0 poetry.lock
  227. +68 −0 pre-commit.nix
  228. +141 −2 pyproject.toml
  229. +0 −9 requirements.txt
  230. +5 −10 setup.cfg
  231. +140 −109 setup.py
  232. +59 −0 shell.nix
  233. +0 −1,824 versioneer.py
126 changes: 126 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"rules": {
"body-leading-blank": [1, "always"],
"body-max-line-length": [2, "always", 100],
"footer-leading-blank": [1, "always"],
"footer-max-line-length": [2, "always", 100],
"header-max-length": [2, "always", 100],
"subject-case": [
2,
"never",
["sentence-case", "start-case", "pascal-case", "upper-case"]
],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", "."],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
},
"prompt": {
"questions": {
"type": {
"description": "Select the type of change that you're committing",
"enum": {
"feat": {
"description": "A new feature",
"title": "Features",
"emoji": ""
},
"fix": {
"description": "A bug fix",
"title": "Bug Fixes",
"emoji": "🐛"
},
"docs": {
"description": "Documentation only changes",
"title": "Documentation",
"emoji": "📚"
},
"style": {
"description": "Changes that do not affect the meaning of the code (whitespace, formatting, missing semi-colons, etc)",
"title": "Styles",
"emoji": "💎"
},
"refactor": {
"description": "A code change that neither fixes a bug nor adds a feature",
"title": "Code Refactoring",
"emoji": "📦"
},
"perf": {
"description": "A code change that improves performance",
"title": "Performance Improvements",
"emoji": "🚀"
},
"test": {
"description": "Adding missing tests or fixing existing tests",
"title": "Tests",
"emoji": "🚨"
},
"build": {
"description": "Changes that affect the build system or external dependencies (example scopes: poetry, nix)",
"title": "Builds",
"emoji": "🛠"
},
"ci": {
"description": "Changes to our CI configuration files and scripts (example scopes: actions, gh-actions, github-actions)",
"title": "Continuous Integrations",
"emoji": "⚙️"
},
"chore": {
"description": "Other changes that don't modify source or test files",
"title": "Chores",
"emoji": "♻️"
},
"revert": {
"description": "Reverts a previous commit",
"title": "Reverts",
"emoji": "🗑"
}
}
},
"scope": {
"description": "What is the scope of this change (e.g. component or file name)"
},
"subject": {
"description": "Write a short, imperative tense description of the change"
},
"body": {
"description": "Provide a longer description of the change"
},
"isBreaking": {
"description": "Are there any breaking changes?"
},
"breakingBody": {
"description": "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself"
},
"breaking": {
"description": "Describe the breaking changes"
},
"isIssueAffected": {
"description": "Does this change affect any open issues?"
},
"issuesBody": {
"description": "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself"
},
"issues": {
"description": "Add issue references (e.g. \"fix #123\", \"re #123\".)"
}
}
}
}
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "cz-conventional-changelog"
}
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use nix --keep-going
watch_file poetry.lock
eval "$shellHook"
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
ibis/_version.py export-subst
conda-lock/*.lock linguist-generated=true
nix/sources.json linguist-generated=true
nix/sources.nix linguist-generated=true
poetry.lock linguist-generated=true
setup.py linguist-generated=true
10 changes: 10 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"rangeStrategy": "widen",
"extends": ["config:base"],
"schedule": ["after 10pm and before 5am every weekday", "every weekend"],
"semanticCommits": "enabled",
"lockFileMaintenance": { "enabled": true },
"enabledManagers": ["github-actions", "poetry"],
"automerge": false,
"labels": ["dependencies"]
}
1 change: 1 addition & 0 deletions .github/rotate-key-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
It's time to rotate the ibis project bots' keys.
17 changes: 8 additions & 9 deletions .github/workflows/assign.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Assign
name: Assign Issue
on:
issue_comment:
types: created

types:
- created
jobs:
one:
assign_issue:
runs-on: ubuntu-latest
if: ${{ github.event.comment.body == '/take' }}
steps:
- if: github.event.comment.body == '/take'
name:
run: |
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
- uses: pozil/auto-assign-issue@v1.1.0
with:
assignees: ${{ github.event.comment.user.login }}
25 changes: 25 additions & 0 deletions .github/workflows/auto-rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Automatic Rebase
on:
push:
branches-ignore:
# Ignore branches automatically created by this action
- rebase-pull-request**
- cherry-pick-rebase-pull-request**
# Don't automatically rebase branches created by WhiteSource Renovate
- renovate**
pull_request_target:
types:
- labeled
jobs:
auto-rebase:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.SQUAWK_BOT_APP_ID }}
private_key: ${{ secrets.SQUAWK_BOT_APP_PRIVATE_KEY }}

- uses: Label305/AutoRebase@v0.1
with:
github_token: ${{ steps.generate_token.outputs.token }}
111 changes: 111 additions & 0 deletions .github/workflows/check-setup-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Check setup.py

on:
push:
paths:
- ./dev/poetry2setup
- ./dev/poetry2setup.py
- README.md
- poetry.lock
- pyproject.toml
- setup.py
- .github/workflows/check-setup-py.yml
pull_request:
paths:
- ./dev/poetry2setup
- ./dev/poetry2setup.py
- README.md
- poetry.lock
- pyproject.toml
- setup.py
- .github/workflows/check-setup-py.yml

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
check_setup_py:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable-small

- name: setup cachix
uses: cachix/cachix-action@v10
with:
name: ibis
extraPullNames: nix-community,poetry2nix

- name: generate setup.py
run: ./dev/poetry2setup -o setup.py

- name: check whether setup.py needs to be regenerated
run: git diff --exit-code setup.py

check_setuptools_install:
runs-on: ubuntu-latest
needs:
- check_setup_py
steps:
- name: checkout
uses: actions/checkout@v2

- name: install python
uses: actions/setup-python@v2
id: install_python
with:
python-version: "3.9"

- name: install system dependencies
run: sudo apt-get install -y -q build-essential cmake krb5-config python-dev libkrb5-dev libboost-all-dev graphviz

- name: install poetry
run: pip install poetry

- name: generate requirements.txt
run: poetry export --dev --extras all --without-hashes > requirements.txt

- uses: syphar/restore-virtualenv@v1
with:
requirement_files: requirements.txt
custom_cache_key_element: check-setuptools-install-${{ steps.install_python.outputs.python-version }}

- uses: syphar/restore-pip-download-cache@v1
with:
requirement_files: requirements.txt
custom_cache_key_element: check-setuptools-install-${{ steps.install_python.outputs.python-version }}

- name: install using requirements.txt
run: pip install -r requirements.txt

- name: install ibis in development mode
run: pip install -e .

- name: run simple tests
run: pytest ibis/tests --numprocesses auto

check_poetry_lock:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: install poetry
run: pip install poetry

- name: run poetry lock
run: poetry lock --no-update

- name: check whether poetry lockfile needs to be updated
run: git diff --exit-code poetry.lock
57 changes: 57 additions & 0 deletions .github/workflows/ci-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: GCS Insert

on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:

jobs:
gcs_insert:
runs-on: ubuntu-latest
steps:
- name: set date
id: set_date
run: |
set -euo pipefail
echo "::set-output name=yesterday::$(date --date=yesterday +%Y-%m-%d)"
- name: generate data
id: generate_data
run: |
set -euo pipefail
yesterday="${{ steps.set_date.outputs.yesterday }}"
[ -n "$yesterday" ] || exit 1
seconds_per_hour=3600
requests_per_hour=1000
rate_limit_sleep="$(bc <<< "scale = 1; $seconds_per_hour / $requests_per_hour" | xargs printf "%.0f")"
gh api --paginate "repos/ibis-project/ibis/actions/runs?per_page=100&created=${yesterday}" --jq '.workflow_runs[]' > workflows.json
jq -rcM '.id' < workflows.json | while read -r run_id; do
gh api --paginate "repos/ibis-project/ibis/actions/runs/${run_id}/jobs?per_page=100" --jq '.jobs[]' >> jobs.json
# sleep to avoid rate limiting
sleep "$rate_limit_sleep"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- uses: google-github-actions/setup-gcloud@v0

- run: gcloud info

- name: copy to gcs
run: |
set -euo pipefail
yesterday="${{ steps.set_date.outputs.yesterday }}"
gsutil cp -Z workflows.json "gs://ibis-workflow-data/${yesterday}/workflows.json"
gsutil cp -Z jobs.json "gs://ibis-workflow-data/${yesterday}/jobs.json"
Loading