Skip to content

Commit

Permalink
Split dialect from driver, part 3: Swap in SQLAlchemy dialect and tests
Browse files Browse the repository at this point in the history
Move SQLAlchemy dialect implementation to the top level.
  • Loading branch information
amotl committed Dec 20, 2023
1 parent 8644d48 commit d71af22
Show file tree
Hide file tree
Showing 40 changed files with 169 additions and 374 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
sqla-version: ['<1.4', '<1.5', '<2.1']
pip-allow-prerelease: ['false']

# To save resources, only use the most recent Python versions on macOS.
exclude:
# To save resources, only use the most recent Python versions on macOS.
- os: 'macos-latest'
python-version: '3.7'
- os: 'macos-latest'
Expand All @@ -34,6 +34,13 @@ jobs:
python-version: '3.9'
- os: 'macos-latest'
python-version: '3.10'
# SQLAlchemy 1.3 is not supported on Python 3.12 and higher.
- os: 'ubuntu-latest'
python-version: '3.12'
sqla-version: '<1.4'
- os: 'macos-latest'
python-version: '3.12'
sqla-version: '<1.4'

# Another CI test matrix slot to test against prerelease versions of Python packages.
include:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ library [crate-python].
The package is available from [PyPI] at [sqlalchemy-cratedb].
To install the most recent version, run:
```shell
pip install --upgrade cratedb-sqlalchemy
pip install --upgrade sqlalchemy-cratedb
```

## Documentation and help
Expand Down
12 changes: 12 additions & 0 deletions backlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Backlog

## Iteration +1
From dialect split-off.
- Re-enable parameterized test cases.
```
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": None}))
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": (4, 0, 12)}))
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": (4, 1, 10)}))
```
- Re-enable doctests.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ changelog = "https://github.com/crate-workbench/sqlalchemy-cratedb/blob/main/CHA
documentation = "https://github.com/crate-workbench/sqlalchemy-cratedb"
homepage = "https://github.com/crate-workbench/sqlalchemy-cratedb"
repository = "https://github.com/crate-workbench/sqlalchemy-cratedb"
[project.entry-points."sqlalchemy.dialects"]
crate = "sqlalchemy_cratedb:CrateDialect"

[tool.black]
line-length = 80
Expand Down
50 changes: 0 additions & 50 deletions src/crate/client/sqlalchemy/__init__.py

This file was deleted.

Empty file.
69 changes: 0 additions & 69 deletions src/crate/client/test_util.py

This file was deleted.

Loading

0 comments on commit d71af22

Please sign in to comment.