Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test ci #1017

Merged
merged 13 commits into from
Jun 26, 2024
Merged

test ci #1017

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 0.10.11dev

* [Feature] Test CI

## 0.10.10 (2024-02-07)

* [Feature] Adds `ploomber-extension` as a dependency
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"twine",
# tests
# DuckDB 0.10.1 breaking Sqlalchemy v1 tests: https://github.com/ploomber/jupysql/issues/1001 # noqa
"duckdb<0.10.1",
"duckdb",
"duckdb-engine",
"pyodbc",
# sql.plot module tests
Expand Down
2 changes: 1 addition & 1 deletion src/sql/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_tmp_dir():
"alias": "mySQLTest",
"docker_ct": {
"name": "mysql",
"image": "mysql",
"image": "mysql:8.0",
"ports": {3306: 33306},
},
"query": {},
Expand Down
22 changes: 11 additions & 11 deletions src/tests/test_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2296,11 +2296,11 @@ def test_get_query_type(query, query_type):
[
(
"%sql select '{\"a\": 1}'::json -> 'a';",
"1",
1,
),
(
'%sql select \'[{"b": "c"}]\'::json -> 0;',
'{"b":"c"}',
{"b": "c"},
),
(
"%sql select '{\"a\": 1}'::json ->> 'a';",
Expand All @@ -2314,13 +2314,13 @@ def test_get_query_type(query, query_type):
"""%%sql select '{\"a\": 1}'::json
->
'a';""",
"1",
1,
),
(
"""%%sql select '[{\"b\": \"c\"}]'::json
->
0;""",
'{"b":"c"}',
{"b": "c"},
),
(
"""%%sql select '{\"a\": 1}'::json
Expand All @@ -2338,15 +2338,15 @@ def test_get_query_type(query, query_type):
),
(
"%sql SELECT '{\"a\": 1}'::json -> 'a';",
"1",
1,
),
(
"%sql SELect '{\"a\": 1}'::json -> 'a';",
"1",
1,
),
(
"%sql SELECT json('{\"a\": 1}') -> 'a';",
"1",
1,
),
],
ids=[
Expand Down Expand Up @@ -2377,7 +2377,7 @@ def test_json_arrow_operators(ip, query, expected):
"""%%sql --save snippet
select '{\"a\": 1}'::json -> 'a';""",
"%sql select * from snippet",
"1",
1,
),
(
"""%sql --save snippet select '[{\"b\": \"c\"}]'::json ->> 0;""",
Expand All @@ -2390,7 +2390,7 @@ def test_json_arrow_operators(ip, query, expected):
-> 2
as number""",
"%sql select number from snippet",
"3",
3,
),
],
ids=["cell-magic-key", "line-magic-index", "cell-magic-multi-line-as-column"],
Expand Down Expand Up @@ -2737,11 +2737,11 @@ def test_var_substitution_section(ip_empty, tmp_empty):
[
(
'%sql select json(\'[{"a":1}, {"b":2}]\')',
'[{"a":1},{"b":2}]',
"[{'a': 1}, {'b': 2}]",
),
(
'%sql select \'[{"a":1}, {"b":2}]\'::json',
'[{"a":1}, {"b":2}]',
"[{'a': 1}, {'b': 2}]",
),
],
)
Expand Down
8 changes: 4 additions & 4 deletions src/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __repr__(self) -> str:


def test_boxplot_stats(chinook_db, ip_empty):
# there's some werid behavior in duckdb-engine that will cause the
# there's some weird behavior in duckdb-engine that will cause the
# table not to be found if we call commit
ip_empty.run_cell("%config SqlMagic.autocommit=False")
ip_empty.run_cell("%sql duckdb://")
Expand All @@ -65,7 +65,7 @@ def test_boxplot_stats(chinook_db, ip_empty):


def test_boxplot_stats_exception(chinook_db, ip_empty):
# there's some werid behavior in duckdb-engine that will cause the
# there's some weird behavior in duckdb-engine that will cause the
# table not to be found if we call commit
ip_empty.run_cell("%config SqlMagic.autocommit=False")
ip_empty.run_cell("%sql duckdb://")
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_summary_stats(chinook_db, ip_empty, tmp_empty):
"""
)

# there's some werid behavior in duckdb-engine that will cause the
# there's some weird behavior in duckdb-engine that will cause the
# table not to be found if we call commit
ip_empty.run_cell("%config SqlMagic.autocommit=False")
ip_empty.run_cell("%sql duckdb://")
Expand All @@ -114,7 +114,7 @@ def test_summary_stats(chinook_db, ip_empty, tmp_empty):


def test_summary_stats_missing_file(chinook_db, ip_empty):
# there's some werid behavior in duckdb-engine that will cause the
# there's some weird behavior in duckdb-engine that will cause the
# table not to be found if we call commit
ip_empty.run_cell("%config SqlMagic.autocommit=False")
ip_empty.run_cell("%sql duckdb://")
Expand Down
Loading