Skip to content

Commit

Permalink
Chore: Clean up and refactor SQLAlchemy polyfills
Browse files Browse the repository at this point in the history
... to `cratedb_toolkit.util.sqlalchemy`.
  • Loading branch information
amotl committed Jul 6, 2024
1 parent 19c5cff commit a9192f7
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 269 deletions.
2 changes: 1 addition & 1 deletion cratedb_toolkit/adapter/pymongo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pymongo.collection

from cratedb_toolkit.adapter.pymongo.collection import collection_factory
from cratedb_toolkit.sqlalchemy.patch import patch_types_map
from cratedb_toolkit.util import DatabaseAdapter
from cratedb_toolkit.util.pandas import patch_pandas_sqltable_with_extended_mapping
from cratedb_toolkit.util.sqlalchemy import patch_types_map


class PyMongoCrateDBAdapter:
Expand Down
2 changes: 1 addition & 1 deletion cratedb_toolkit/adapter/pymongo/backlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Iteration +1
- Upstream / converge patches.
- `cratedb_toolkit/sqlalchemy/patch.py`
- `cratedb_toolkit/util/sqlalchemy.py`
- `cratedb_toolkit/util/pandas.py`
- `cratedb_toolkit/adapter/pymongo/api.py::adjust_sqlalchemy`
- `cratedb_toolkit/adapter/pymongo/collection.py::insert_returning_id`
Expand Down
2 changes: 1 addition & 1 deletion cratedb_toolkit/cfr/systable.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import sqlalchemy as sa
from tqdm import tqdm

from cratedb_toolkit.sqlalchemy.patch import patch_encoder
from cratedb_toolkit.util import DatabaseAdapter
from cratedb_toolkit.util.cli import error_logger
from cratedb_toolkit.util.sqlalchemy import patch_encoder
from cratedb_toolkit.wtf.core import InfoContainer

logger = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion cratedb_toolkit/sqlalchemy/__init__.py

This file was deleted.

113 changes: 0 additions & 113 deletions cratedb_toolkit/sqlalchemy/polyfill.py

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion tests/sqlalchemy/test_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
import sqlalchemy as sa

from cratedb_toolkit.sqlalchemy.patch import CrateJsonEncoderWithNumPy
from cratedb_toolkit.util.sqlalchemy import CrateJsonEncoderWithNumPy
from tests.conftest import TESTDRIVE_DATA_SCHEMA


Expand Down
151 changes: 0 additions & 151 deletions tests/sqlalchemy/test_polyfill.py

This file was deleted.

0 comments on commit a9192f7

Please sign in to comment.