4 changes: 2 additions & 2 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/setup-python@v3
id: install_python
with:
python-version: "3.9"
python-version: "3.10"

- name: update apt-get
run: sudo apt-get update -y -q
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: install python
uses: actions/setup-python@v3
with:
python-version: "3.x"
python-version: "3.10"

- name: install poetry
run: pip install poetry
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v1
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- uses: github/codeql-action/autobuild@v1
- uses: github/codeql-action/analyze@v1
- uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/analyze@v2
48 changes: 15 additions & 33 deletions .github/workflows/ibis-docs-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ jobs:
run: poetry run pytest --benchmark-only --benchmark-json .benchmarks/output.json ibis/tests/benchmarks

- uses: tibdex/github-app-token@v1
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name == 'push' }}
id: generate-token
with:
app_id: ${{ secrets.SQUAWK_BOT_APP_ID }}
private_key: ${{ secrets.SQUAWK_BOT_APP_PRIVATE_KEY }}

- uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name == 'push' }}
with:
tool: pytest
github-token: ${{ steps.generate-token.outputs.token }}
Expand All @@ -107,6 +107,7 @@ jobs:

docs:
runs-on: ubuntu-latest
concurrency: docs-${{ github.repository }}-${{ github.head_ref || github.sha }}
needs:
# wait on benchmarks to prevent a race condition when pushing to the
# gh-pages branch
Expand All @@ -124,33 +125,27 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: nix-community,poetry2nix

- name: checkout
uses: actions/checkout@v3
if: ${{ github.event_name != 'push' }}
with:
fetch-depth: 0

- name: Generate a GitHub token
if: ${{ github.event_name == 'push' }}
uses: tibdex/github-app-token@v1
if: ${{ github.event_name == 'push' }}
id: generate_token
with:
app_id: ${{ secrets.DOCS_BOT_APP_ID }}
private_key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}

- name: checkout
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v3
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: checkout
if: ${{ github.event_name != 'push' }}
uses: actions/checkout@v3

- name: Configure git info
if: ${{ github.event_name == 'push' }}
run: |
set -euo pipefail
git config user.name 'ibis-docs-bot[bot]'
git config user.email 'ibis-docs-bot[bot]@users.noreply.github.com'
- name: build docs
if: ${{ github.event_name != 'push' }}
run: nix develop -f shell.nix --ignore-environment --keep-going -c mkdocs build
Expand All @@ -159,16 +154,16 @@ jobs:
if: ${{ github.event_name != 'push' }}
run: nix develop -f shell.nix --ignore-environment --keep-going -c just checklinks --offline --no-progress

- name: Pull gh-pages changes
- name: Configure git info
if: ${{ github.event_name == 'push' }}
run: |
set -euo pipefail
git fetch origin gh-pages
git update-ref refs/heads/gh-pages "$(git rev-parse origin/gh-pages)"
git config user.name 'ibis-docs-bot[bot]'
git config user.email 'ibis-docs-bot[bot]@users.noreply.github.com'
- name: build and push dev docs
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
if: ${{ github.event_name == 'push' }}
run: |
set -euo pipefail
Expand All @@ -180,19 +175,6 @@ jobs:
--message 'docs(dev): ibis@${{ github.sha }}' \
dev
- name: build and push docs on tag
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: |
set -euo pipefail
nix develop -f shell.nix --keep-going -c \
mic deploy \
--push \
--rebase \
--prefix docs \
--message "docs(release): ibis@${GITHUB_REF_NAME}" \
"${GITHUB_REF_NAME}" latest
simulate_release:
runs-on: ubuntu-latest
steps:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/ibis-docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# vim: filetype=yaml
name: Docs Release Build

on:
release:
types:
- published
jobs:
docs:
concurrency: docs-${{ github.repository }}-${{ github.head_ref || github.sha }}
runs-on: ubuntu-latest
steps:
- name: install nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable-small

- name: setup cachix
uses: cachix/cachix-action@v10
with:
name: ibis
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: nix-community,poetry2nix

- name: Generate a GitHub token
uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.DOCS_BOT_APP_ID }}
private_key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}

- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: Configure git info
run: |
set -euo pipefail
git config user.name 'ibis-docs-bot[bot]'
git config user.email 'ibis-docs-bot[bot]@users.noreply.github.com'
- name: Pull gh-pages changes
run: |
set -euo pipefail
git fetch origin gh-pages
git update-ref refs/heads/gh-pages "$(git rev-parse origin/gh-pages)"
- name: build and push docs on tag
run: |
set -euo pipefail
nix develop -f shell.nix --keep-going -c \
mic deploy \
--push \
--rebase \
--update-aliases \
--prefix docs \
--message "docs(release): ibis@${GITHUB_REF_NAME}" \
"${GITHUB_REF_NAME}" latest
46 changes: 46 additions & 0 deletions .github/workflows/ibis-tpch-queries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# vim: filetype=yaml
name: TPC-H

on:
push:
branches:
- master
pull_request:
branches:
- master

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

jobs:
tpch:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: install python
uses: actions/setup-python@v3
with:
python-version: "3.10"

- run: python -m pip install --upgrade pip click sqlparse

- name: install ibis
run: python -m pip install "ibis-framework[duckdb]"

- name: clone tpc-queries
uses: actions/checkout@v3
with:
repository: ibis-project/tpc-queries
path: ./tpc-queries
ref: master

- name: generate tpc-h data
working-directory: tpc-queries
run: python -c "import duckdb; con = duckdb.connect('tpch.ddb'); con.execute('CALL dbgen(sf=0.1);')"

- name: run tpc-h queries
working-directory: tpc-queries
run: ./runtpc -i ibis -i duckdb -d 'tpch.ddb' -b 'duckdb'
5 changes: 4 additions & 1 deletion .github/workflows/nix-skip-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ on:

jobs:
nix:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
python-version:
- "3.8"
- "3.9"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ concurrency:

jobs:
nix:
# TODO: we can't use macos-latest here until watchdog is fixed
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
python-version:
- "3.8"
- "3.9"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
app_id: ${{ secrets.PR_APPROVAL_BOT_APP_ID }}
private_key: ${{ secrets.PR_APPROVAL_BOT_APP_PRIVATE_KEY }}

- uses: cpcloud/compare-commits-action@v5.0.13
- uses: cpcloud/compare-commits-action@v5.0.14
if: ${{ fromJSON(steps.needs_pr.outputs.did_change) }}
id: compare_commits
with:
Expand Down
16 changes: 8 additions & 8 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
"changelogFile": "docs/release_notes.md"
}
],
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "ci/release/verify.sh",
"prepareCmd": "ci/release/prepare.sh ${nextRelease.version}",
"publishCmd": "ci/release/publish.sh"
}
],
[
"@google/semantic-release-replace-plugin",
{
Expand All @@ -41,6 +33,14 @@
]
}
],
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "ci/release/verify.sh",
"prepareCmd": "ci/release/prepare.sh ${nextRelease.version}",
"publishCmd": "ci/release/publish.sh"
}
],
[
"@semantic-release/github",
{
Expand Down
12 changes: 5 additions & 7 deletions docs/blog/Ibis-version-3.0.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,22 @@ For users that use jupyter notebooks, `repr_html` has been added for expressions

![pretty print repr](repr.png)

## Breaking Changes
## Other Changes

3.0.0 is a major release and according to the project's use of semantic versioning, breaking changes are on the table. The full list of these changes can be found [here](https://ibis-project.org/docs/dev/release_notes/).
3.0.0 is a major release and according to the project's use of semantic versioning, breaking changes are on the table. The full list of these changes can be found [here](https://ibis-project.org/docs/dev/release_notes/). Some of the important changes include:

1. Python 3.8 is now the minimum supported version
2. Removal of `.materialize()`
2. Deprecation of `.materialize()`

Refer to the sections below for more detail on these changes.

### The minimum supported Python version is now Python 3.8

Ibis currently follows [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html), a community policy standard that recommends Python and Numpy versions to support. NEP 29 suggests that all projects across the Scientific Python ecosystem adopt a common “time window-based” policy for support of Python and NumPy versions. Standardizing a recommendation for project support of minimum Python and NumPy versions will improve downstream project planning. As part of the 3.0.0 release, support for Python 3.7 has been dropped and the project has now adopted support for version 3.8 and higher.

### Removal of .materialize()
### Deprecation of .materialize()

This release sees the removal of the `.materialize()` method from TableExpr. In the past, the materialize method has caused a lot of confusion. Doing simple things like `t.join(s, t.foo == s.foo).select(["unambiguous_column"])` raised an exception because of it. It turns out that .materialize() isn't necessary and therefore has been removed. This is a breaking change for some code that uses materialize. The materialize method still exists, but is now a pass-through and triggers a warning.

There are also some breaking changes introduced here in the case of overlapping column names. If there are any overlapping column names, a suffix will be attached to both the left and right tables. So, in the case of `s.asof_join(t, "time")` the resulting schema will have both a `time_x` and a `time_y` column.
This release sees the deprecation of the `.materialize()` method from TableExpr. In the past, the materialize method has caused a lot of confusion. Doing simple things like `t.join(s, t.foo == s.foo).select(["unambiguous_column"])` raised an exception because of it. It turns out that .materialize() isn't necessary. The materialize method still exists, but is now a no-op and doesn't need to be used.

## Performance Improvements

Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/01_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hide:
| -----------------------------------------: | :----------------------------------------------------: | :------------------------------------------------: | :------------------------------------------------: |
| **Operating System** :material-arrow-down: | | | |
| **Linux** | {{ config.extra.support_levels.supported.icon }}[^1] | {{ config.extra.support_levels.supported.icon }} | {{ config.extra.support_levels.supported.icon }} |
| **macOS** | {{ config.extra.support_levels.bug.icon }}[^2] | {{ config.extra.support_levels.bug.icon }} | {{ config.extra.support_levels.bug.icon }} |
| **macOS (x86_64)** | {{ config.extra.support_levels.supported.icon }} | {{ config.extra.support_levels.supported.icon }} | {{ config.extra.support_levels.supported.icon }} |
| **Windows** | {{ config.extra.support_levels.unsupported.icon }}[^3] | {{ config.extra.support_levels.unsupported.icon }} | {{ config.extra.support_levels.unsupported.icon }} |

1. [Install `nix`](https://nixos.org/download.html)
Expand Down
7 changes: 7 additions & 0 deletions docs/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release Notes
---

### [3.0.1](https://github.com/ibis-project/ibis/compare/3.0.0...3.0.1) (2022-04-28)


### Bug Fixes

* **build:** replace version before exec plugin runs ([573139c](https://github.com/ibis-project/ibis/commit/573139c3569aa6c6a197910f3582c6e24593688e))

## [3.0.0](https://github.com/ibis-project/ibis/compare/2.1.1...3.0.0) (2022-04-25)


Expand Down
2 changes: 1 addition & 1 deletion ibis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__all__ = ['api', 'ir', 'util', 'IbisError', 'options']
__all__ += api.__all__

__version__ = "3.0.0"
__version__ = "3.0.1"


def __getattr__(name: str) -> BaseBackend:
Expand Down
6 changes: 6 additions & 0 deletions ibis/backends/base/sql/compiler/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,9 @@ def _rewrite_cast(expr):
if isinstance(to, dt.Interval) and isinstance(arg.type(), dt.Integer):
return arg.to_interval(unit=to.unit)
return expr


@rewrites(ops.StringContains)
def _rewrite_string_contains(expr):
op = expr.op()
return op.haystack.find(op.needle) >= 0
Loading