Skip to content

Commit bcd0ce3

Browse files
ckunkitkilias
andauthored
#253: Made dependencies optional in file pyproject.toml (#254)
* 253: Made dependencies optional in file `pyproject.toml` * Added a list of all NC's dependency categories to the User Guide incl. brief explanations * Added optional dependencies for integration tests with external ITDE: docker-db, bucketfs, ibis, sqlalchemy Co-authored-by: Torsten Kilias <tkilias@users.noreply.github.com>
1 parent 415aff4 commit bcd0ce3

File tree

10 files changed

+1110
-888
lines changed

10 files changed

+1110
-888
lines changed

.github/workflows/checks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
with:
8383
python-version: ${{ matrix.python-version }}
8484

85+
- name: Install All Optional Dependencies (aka. "extras")
86+
run: poetry install --all-extras
87+
8588
- name: Run lint
8689
run: poetry run -- nox -s lint:code
8790

@@ -196,6 +199,9 @@ jobs:
196199
with:
197200
python-version: ${{ matrix.python-version }}
198201

202+
- name: Install All Optional Dependencies (aka. "extras")
203+
run: poetry install --all-extras
204+
199205
- name: Run Tests and Collect Coverage
200206
run: |
201207
poetry run -- nox -s test:unit -- --coverage \

.github/workflows/tests-gpu.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
with:
4040
poetry-version: 2.1.2
4141

42+
- name: Install All Optional Dependencies (aka. "extras")
43+
run: poetry install --all-extras
44+
4245
- name: Allow unprivileged user namespaces
4346
run: |
4447
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

.github/workflows/tests-large-runner.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
with:
4040
poetry-version: 2.1.2
4141

42+
- name: Install All Optional Dependencies (aka. "extras")
43+
run: poetry install --all-extras
44+
4245
- name: Allow unprivileged user namespaces
4346
run: |
4447
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

.github/workflows/tests-ordinary-integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
- name: Setup Python & Poetry Environment
6262
uses: exasol/python-toolbox/.github/actions/python-environment@v1
6363

64+
- name: Install All Optional Dependencies (aka. "extras")
65+
run: poetry install --all-extras
66+
6467
- name: Allow unprivileged user namespaces
6568
run: |
6669
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

.github/workflows/tests-saas.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- name: Setup Python & Poetry Environment
2121
uses: exasol/python-toolbox/.github/actions/python-environment@v1
2222

23+
- name: Install All Optional Dependencies (aka. "extras")
24+
run: poetry install --all-extras
25+
2326
- name: Allow unprivileged user namespaces
2427
run: |
2528
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

doc/changes/unreleased.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
# Unreleased
2+
3+
## Summary
4+
5+
This release marks most of the NC's dependencies in file `pyproject.toml` as _optional_. Please see updated installation instructions in the NC User Guide.
6+
7+
## Refactorings
8+
9+
* #253: Made dependencies optional in file `pyproject.toml`

doc/user_guide/user-guide.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Notebook Connector User Guide
22

3+
## Installing the Notebook Connector (NC)
4+
5+
Most of NC's dependencies are declared as "optional" in file `pyproject.toml`.
6+
7+
Here is a comprehensive list of all NC's optional dependency categories (aka. "extras"):
8+
9+
| Package | Description |
10+
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11+
| `sqlalchemy` | [SQLAlchemy dialect](https://pypi.org/project/sqlalchemy_exasol/) for Exasol databases |
12+
| `pyexasol` | Python driver for [connecting to Exasol databases](https://pypi.org/project/pyexasol/) |
13+
| `bucketfs` | [Python API](https://pypi.org/project/exasol-bucketfs/) to interact with Exasol [Bucketfs-Service(s)](https://docs.exasol.com/db/latest/database_concepts/bucketfs/bucketfs.htm) |
14+
| `docker-db` | For starting a [Docker instance of the Exasol database](https://pypi.org/project/exasol-integration-test-docker-environment/) |
15+
| `slc` | For [building](https://pypi.org/project/exasol-script-languages-container-tool/) custom [Script Language Containers](https://github.com/exasol/script-languages-release) for [Exasol UDFs](https://docs.exasol.com/db/7.1/database_concepts/udf_scripts.htm) |
16+
| `ibis` | Portable Python dataframe library [ibis-framework](https://pypi.org/project/ibis-framework/) |
17+
| `transformers` | An [Exasol extension](https://pypi.org/project/exasol-transformers-extension/) for using state-of-the-art pretrained machine learning models via the [Hugging Face Transformers API](https://github.com/huggingface/transformers) |
18+
| `sagemaker` | An [Exasol extension](https://pypi.org/project/exasol-sagemaker-extension/) to interact with [AWS SageMaker](https://pypi.org/project/sagemaker/) from inside the database |
19+
20+
You can install selected dependencies using the following syntax
21+
```shell
22+
pip install "notebook-connector [slc, docker-db]"
23+
```
24+
25+
You can also retrieve a list of all NC's dependency categories with the following command line, see [stackoverflow/64685527](https://stackoverflow.com/questions/64685527/pip-install-with-all-extras):
26+
27+
```shell
28+
pip install --dry-run --ignore-installed --quiet --report=- \
29+
exasol-notebook-connector \
30+
| jq --raw-output '.install[0].metadata.provides_extra|join(",")'
31+
```
32+
333
## Managing Script Language Containers (SLCs)
434

535
The Notebook Connector (NC) supports building different flavors of [Exasol Script Language Containers](https://github.com/exasol/script-languages-release) (SLCs) using the [script-languages-container-tool](https://github.com/exasol/script-languages-container-tool).

0 commit comments

Comments
 (0)