Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(deps): make pins an optional dependency through an examples extra #7878

Merged
merged 5 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/updateContent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# install ibis
python3 -m pip install ipython
python3 -m pip install -e '.[duckdb]'
python3 -m pip install -e '.[duckdb,examples]'
4 changes: 4 additions & 0 deletions .github/workflows/ibis-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- duckdb
- deltalake
- geospatial
- examples
additional_deps:
- torch
- name: pandas
Expand All @@ -82,6 +83,7 @@ jobs:
extras:
- polars
- deltalake
- examples
- name: mysql
title: MySQL
services:
Expand All @@ -97,6 +99,7 @@ jobs:
- clickhouse
extras:
- clickhouse
- examples
- name: postgres
title: PostgreSQL
extras:
Expand Down Expand Up @@ -191,6 +194,7 @@ jobs:
title: ClickHouse
extras:
- clickhouse
- examples
services:
- clickhouse
- os: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/_tabsets/install_default.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We recommend starting with the default (DuckDB) backend for a performant, fully-
## Using `pip`

```bash
pip install 'ibis-framework[duckdb]'
pip install 'ibis-framework[duckdb,examples]'
```

{{< include /_callouts/pypi_warning.qmd >}}
Expand Down
4 changes: 2 additions & 2 deletions docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ about:
We recommend starting with the default backend (DuckDB).

```bash
pip install 'ibis-framework[duckdb]' # <1>
pip install 'ibis-framework[duckdb,examples]' # <1>
```

1. Install Ibis with optional dependencies (DuckDB in this case).
1. Install Ibis with the DuckDB backend along with examples.

<div class="d-grid gap-2"><a class="btn btn-lg btn-primary" data-bs-toggle="collapse" href="#collapseBackends" role="button" aria-expanded="false" aria-controls="collapseBackends" margin="100px">Show supported backends</a></div>

Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/duckdb/tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def test_csv_with_slash_n_null(con, tmp_path):
reason=("nix can't hit GCS because it is sandboxed."),
)
def test_register_filesystem_gcs(con):
import fsspec
fsspec = pytest.importorskip("fsspec")

gcs = fsspec.filesystem("gcs")

Expand Down
2 changes: 2 additions & 0 deletions ibis/backends/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

pytestmark = pytest.mark.examples

pytest.importorskip("pins")


@pytest.mark.skipif(
(LINUX or MACOS) and SANDBOXED,
Expand Down
35 changes: 17 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ multipledispatch = ">=0.6,<2"
numpy = ">=1,<2"
pandas = ">=1.2.5,<3"
parsy = ">=2,<3"
pins = { version = ">=0.8.3,<1", extras = ["gcs"] }
pyarrow = ">=2,<15"
pyarrow-hotfix = ">=0.4,<1"
python-dateutil = ">=2.8.2,<3"
Expand Down Expand Up @@ -75,6 +74,7 @@ graphviz = { version = ">=0.16,<1", optional = true }
impyla = { version = ">=0.17,<1", optional = true }
oracledb = { version = ">=1.3.1,<3", optional = true }
packaging = { version = ">=21.3,<24", optional = true }
pins = { version = ">=0.8.3,<1", extras = ["gcs"], optional = true }
polars = { version = ">=0.19.3,<1", optional = true }
psycopg2 = { version = ">=2.8.4,<3", optional = true }
pydata-google-auth = { version = ">=1.4.0,<2", optional = true }
Expand Down Expand Up @@ -165,6 +165,7 @@ all = [
"impyla",
"oracledb",
"packaging",
"pins",
"polars",
"psycopg2",
"pydata-google-auth",
Expand Down Expand Up @@ -215,6 +216,7 @@ trino = ["trino", "sqlalchemy", "sqlalchemy-views"]
visualization = ["graphviz"]
decompiler = ["black"]
deltalake = ["deltalake"]
examples = ["pins"]

[tool.poetry.plugins."ibis.backends"]
bigquery = "ibis.backends.bigquery"
Expand Down