Skip to content

Commit

Permalink
Chore: Fix software tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 19, 2025
1 parent 649feba commit 8954fae
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion cratedb_toolkit/api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ClientBundle:

adapter: DatabaseAdapter
dbapi: crate.client.connection.Connection
sqlalchemy: sa.Engine
sqlalchemy: sa.engine.Engine


class ClusterBase(abc.ABC):
Expand Down
4 changes: 2 additions & 2 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/cluster/test_examples_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import pytest
import responses
from pytest_notebook.nb_regression import NBRegressionFixture

import cratedb_toolkit

Expand Down Expand Up @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions tests/io/dynamodb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
import pytest

pytest.importorskip("boto3", reason="Skipping DynamoDB tests because 'boto3' package is not installed")
6 changes: 5 additions & 1 deletion tests/io/dynamodb/conftest.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8954fae

Please sign in to comment.