Skip to content

Commit 08aa8c0

Browse files
committed
Support Sqlalchemy 1.4 part 2
* Disable unimplemented sql_exprssion_limit_offset tests * Adjust function call to comply with latest api changes * Disable tests requiring an explicit index which isn't supported by exasol * Make sure metadata queries do not create a second connection * Fix args for report command * Make sure test schemas are in place before integration tests get executed * Fix setup of test cases * Temporarily add migration notes and todos to PR/changes * Mark test depending on driver update as xfail see also #232 * run sphinx via poetry in nox task * Update dependencies * Suppress failing turbodbc test * Disable incompatible unit tests * Disable merge tests
1 parent b0044d3 commit 08aa8c0

File tree

15 files changed

+874
-174
lines changed

15 files changed

+874
-174
lines changed

.github/workflows/ci-cd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
ITDE_TAG: "0.11.0"
118118

119119
- name: Run Test for Python ${{ matrix.python }} using ${{ matrix.connector }}
120-
run: poetry run nox -s integration-tests -- --connector ${{ matrix.connector }} --db-version ${{ matrix.exasol_version }}
120+
run: poetry run nox -s integration-tests -- -- --connector ${{ matrix.connector }} --db-version ${{ matrix.exasol_version }}
121121

122122
upload_to_pypi:
123123
runs-on: ubuntu-latest

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
ITDE_TAG: "0.11.0"
122122

123123
- name: Run Test for Python ${{ matrix.python }} using ${{ matrix.connector }}
124-
run: poetry run nox -s integration-tests -- --connector ${{ matrix.connector }} --db-version ${{ matrix.exasol_version }}
124+
run: poetry run nox -s integration-tests -- -- --connector ${{ matrix.connector }} --db-version ${{ matrix.exasol_version }}
125125

126126
build_package:
127127
runs-on: ubuntu-latest

.github/workflows/gh-pages.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
poetry run python -m nox -s build-docs
2929
touch doc/build/.nojekyll
3030
- name: Deploy
31-
uses: JamesIves/github-pages-deploy-action@v4.3.0
31+
uses: JamesIves/github-pages-deploy-action@v4.4.1
3232
with:
3333
branch: gh-pages
3434
folder: ./doc/build

Migration-Notes.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Current Status
2+
3+
```
4+
# Status Update
5+
6+
## Test(s) Status
7+
8+
### sqlalchemy
9+
* pyodbc 3 :no_entry_sign: failed, 190 :heavy_check_mark: passed , 359 :yellow_circle: skipped, 0 :boom: errors
10+
* 1 test is caused by a potentially by an escaping issue
11+
* 2 failing tests are caused by incorrectly returned rowcounts
12+
* turbodbc 6 :no_entry_sign: failed, 185 :heavy_check_mark: passed , 361 :yellow_circle: skipped, 0 :boom: errors
13+
* 1 test is caused by a potentially by an escaping issue
14+
* 5 failing tests are caused by incorrectly returned rowcounts
15+
16+
### exasol
17+
* pyodbc 9 :no_entry_sign: failed, 202 :heavy_check_mark: passed , 10 :yellow_circle: skipped, 0 :boom: errors
18+
* All the failing 9 tests, are caused by the custom merge statement.
19+
* turbodbc 9 :no_entry_sign: failed, 189 :heavy_check_mark: passed , 23 :yellow_circle: skipped, 0 :boom: errors
20+
* All the failing 9 tests, are caused by the custom merge statement.
21+
22+
## Next Steps
23+
* Investigate the escaping issue (DifficultParametersTest_*::test_round_trip[q?marks])
24+
* Investigate the invalid returned row counts
25+
* Refactor/Implement Merge statement in respect to new sqla syntax/api
26+
```
27+
28+
# TODO's:
29+
30+
* TODO: Investigate/Fix the escaping issue (DifficultParametersTest_*::test_round_trip[q?marks])
31+
* TODO: Investigate/Fix the invalid returned row counts
32+
* TODO: Refactor/Implement custom merge statement based on new sqla api
33+
* TODO: Move DB setup/preperation from noxfile to conftest.py
34+
35+
# Post Migration TODO's (tickets)
36+
37+
* TODO: Create ticket to Update to ITDE to 1.1.0
38+
* TODO: Create ticket for migrating exasol tests to non sqla based fixture setup (e.g. pyexasol)
39+
* TODO: Create ticket to additional details to developer guide
40+
# Architecture
41+
* https://www.aosabook.org/en/sqlalchemy.html
42+
# Custom SQL Constructs
43+
* https://docs.sqlalchemy.org/en/14/core/compiler.html
44+
# Other dialects with custom commands
45+
* https://github.com/SAP/sqlalchemy-hana/blob/master/sqlalchemy_hana/dialect.py
46+
* https://github.com/snowflakedb/snowflake-sqlalchemy
47+
* https://github.com/clach04/ingres_sa_dialect
48+
* https://github.com/sqlalchemy-redshift/sqlalchemy-redshift/blob/main/sqlalchemy_redshift/ddl.py
49+
* https://github.com/IBM/nzalchemy/blob/master/sqlalchemy-netezza/nzalchemy/base.py

doc/_static/data/features.csv

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sqla requirement,test case,supported by exasol db,supported by exasol sqla dialect,test status,comment
2+
sql_expression_limit_offset,FetchLimitOffsetTest*.test_expr_limit,yes,no,skipped,not implemented
3+
sql_expression_limit_offset,FetchLimitOffsetTest*.test_expr_limit_offset,yes,no,skipped,not implemented
4+
sql_expression_limit_offset,FetchLimitOffsetTest*.test_expr_limit_simple_offset,yes,no,skipped,not implemented
5+
sql_expression_limit_offset,FetchLimitOffsetTest*.test_expr_offset,partially,no,skipped,not implemented
6+
sql_expression_limit_offset,FetchLimitOffsetTest*.test_simple_limit_expr_offset,yes,no,skipped,not implemented
7+
,HasIndexTest*.*,no,no,skipped,not supported
8+
,ComponentReflectionTest*.test_get_indexes*,no,no,skipped,not supported

noxfile.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ def populate() -> None:
178178
transaction(
179179
connection,
180180
(
181-
"CREATE SCHEMA TEST_SCHEMA;",
182-
# "CREATE SCHEMA TEST_SCHEMA_2;",
181+
"CREATE SCHEMA IF NOT EXISTS TEST",
182+
"CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA;",
183+
"CREATE SCHEMA IF NOT EXISTS TEST_SCHEMA_2;",
183184
),
184185
)
185186
connection.close()
@@ -318,7 +319,15 @@ def clean(session: Session) -> None:
318319
def build(session: Session) -> None:
319320
"""Build the documentation"""
320321
session.run(
321-
"sphinx-build", "-b", "html", "-W", f"{DOC}", f"{DOC_BUILD}", external=True
322+
"poetry",
323+
"run",
324+
"sphinx-build",
325+
"-b",
326+
"html",
327+
"-W",
328+
f"{DOC}",
329+
f"{DOC_BUILD}",
330+
external=True,
322331
)
323332

324333

0 commit comments

Comments
 (0)