diff --git a/.github/workflows/mongodb.yml b/.github/workflows/mongodb.yml index e47cd3ca..77778397 100644 --- a/.github/workflows/mongodb.yml +++ b/.github/workflows/mongodb.yml @@ -70,7 +70,7 @@ jobs: pip install "setuptools>=64" --upgrade # Install package in editable mode. - pip install --use-pep517 --prefer-binary --editable=.[mongodb,test-mongodb,develop] + pip install --use-pep517 --prefer-binary --upgrade --editable=.[mongodb,test-mongodb,develop] - name: Downgrade pymongo on MongoDB 2 if: matrix.mongodb-version == '2' diff --git a/cratedb_toolkit/api/model.py b/cratedb_toolkit/api/model.py index 7bb7df04..cce205ac 100644 --- a/cratedb_toolkit/api/model.py +++ b/cratedb_toolkit/api/model.py @@ -18,7 +18,7 @@ class ClientBundle: adapter: DatabaseAdapter dbapi: crate.client.connection.Connection - sqlalchemy: sa.Engine + sqlalchemy: sa.engine.Engine class ClusterBase(abc.ABC): diff --git a/doc/install.md b/doc/install.md index 99eab4fe..1e3cdf80 100644 --- a/doc/install.md +++ b/doc/install.md @@ -6,12 +6,12 @@ which is an extremely fast Python package and project manager. Install package with only [fundamental dependencies]. ```shell -uv pip install --upgrade 'cratedb-toolkit' +uv pip install --upgrade 'cratedb-toolkit' --prerelease=allow ``` Install package including [full dependencies] and [all subsystems]. ```shell -uv pip install --upgrade 'cratedb-toolkit[all]' +uv pip install --upgrade 'cratedb-toolkit[all]' --prerelease=allow ``` Verify installation. diff --git a/doc/sandbox.md b/doc/sandbox.md index 675c73f6..8affca56 100644 --- a/doc/sandbox.md +++ b/doc/sandbox.md @@ -18,7 +18,7 @@ source .venv/bin/activate Install project in sandbox mode. ```shell -pip install --editable='.[all,develop,docs,test]' +uv pip install --upgrade --editable='.[all,develop,docs,test]' --prerelease=allow ``` Run tests. `TC_KEEPALIVE` keeps the auxiliary service containers running, which diff --git a/pyproject.toml b/pyproject.toml index 6e1a9448..356b73c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -163,7 +163,7 @@ optional-dependencies.kinesis = [ "lorrystream[carabas]>=0.0.6", ] optional-dependencies.mongodb = [ - "commons-codec[mongodb,zyp]>=0.0.21", + "commons-codec[mongodb,zyp]>=0.0.22", "cratedb-toolkit[io]", "orjson>=3.3.1,<4", "pymongo>=3.10.1,<4.10", @@ -194,8 +194,8 @@ optional-dependencies.test = [ "httpx<0.29", "ipywidgets<9", "notebook<8", - "pueblo[dataframe,notebook,testing]", - "pytest<9", + "pueblo[dataframe,notebook]>=0.0.11", + "pytest>=8,<9", "pytest-cov<7", "pytest-mock<4", "responses<0.26", @@ -329,6 +329,7 @@ show_missing = true [tool.mypy] packages = [ "cratedb_toolkit" ] exclude = [ + "cratedb_toolkit/adapter/pymongo/", ] check_untyped_defs = true ignore_missing_imports = true diff --git a/tests/cluster/test_examples_python.py b/tests/cluster/test_examples_python.py index 0f321932..a0825e5d 100644 --- a/tests/cluster/test_examples_python.py +++ b/tests/cluster/test_examples_python.py @@ -4,7 +4,6 @@ import pytest import responses -from pytest_notebook.nb_regression import NBRegressionFixture import cratedb_toolkit @@ -92,6 +91,7 @@ def test_example_cloud_import_notebook(mocker, mock_cloud_cluster_exists): """ Verify the Jupyter Notebook example works. """ + from pytest_notebook.nb_regression import NBRegressionFixture # Synthesize a valid environment. mocker.patch.dict( diff --git a/tests/io/dynamodb/__init__.py b/tests/io/dynamodb/__init__.py index 933fb4a5..e69de29b 100644 --- a/tests/io/dynamodb/__init__.py +++ b/tests/io/dynamodb/__init__.py @@ -1,3 +0,0 @@ -import pytest - -pytest.importorskip("boto3", reason="Skipping DynamoDB tests because 'boto3' package is not installed") diff --git a/tests/io/dynamodb/conftest.py b/tests/io/dynamodb/conftest.py index ae74fefe..dcbe1a83 100644 --- a/tests/io/dynamodb/conftest.py +++ b/tests/io/dynamodb/conftest.py @@ -1,9 +1,13 @@ +# ruff: noqa: E402 import logging import time import typing -import botocore import pytest + +pytest.importorskip("boto3", reason="Skipping DynamoDB tests because 'boto3' package is not installed") + +import botocore from yarl import URL from cratedb_toolkit.io.dynamodb.adapter import DynamoDBAdapter