Skip to content

Commit 4a5db74

Browse files
authored
chore: Add support for Python 3.13 and fix test warnings (#19)
1 parent d0f1d3a commit 4a5db74

6 files changed

Lines changed: 5267 additions & 6089 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
environment:
45-
- py311
46-
- py312
47-
database:
48-
- sqlite
49-
- mssql
44+
environment: [py311, py312, py313]
45+
database: [sqlite, mssql]
5046
steps:
5147
- name: Checkout branch
5248
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

pixi.lock

Lines changed: 5247 additions & 6077 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ test-coverage = "python -m pytest --cov=sqlcompyre --cov-report=xml --cov-report
5757
[feature.build.dependencies]
5858
python-build = "*"
5959
twine = "*"
60+
wheel = "*"
6061
[feature.build.tasks]
6162
build-wheel = "python -m build --no-isolation ."
6263
check-wheel = "twine check dist/*"
@@ -78,6 +79,8 @@ pre-commit-run = "pre-commit run -a"
7879
python = "3.11.*"
7980
[feature.py312.dependencies]
8081
python = "3.12.*"
82+
[feature.py313.dependencies]
83+
python = "3.13.*"
8184

8285
[environments]
8386
build = ["build"]
@@ -86,3 +89,4 @@ docs = ["docs"]
8689
lint = { features = ["lint"], no-default-feature = true }
8790
py311 = ["py311", "test"]
8891
py312 = ["py312", "test"]
92+
py313 = ["py313", "test"]

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ requires = ["setuptools", "setuptools-scm", "wheel"]
55
version_scheme = "post-release"
66

77
[project]
8-
name = "sqlcompyre"
9-
description = "Tool for comparing and inspecting data in SQL databases."
108
authors = [{ name = "Oliver Borchert", email = "oliver.borchert@quantco.com" }]
11-
dynamic = ["version"]
129
classifiers = [
1310
"Programming Language :: Python :: 3",
1411
"Programming Language :: Python :: 3.11",
1512
"Programming Language :: Python :: 3.12",
13+
"Programming Language :: Python :: 3.13",
1614
]
1715
dependencies = [
1816
"click",
@@ -22,6 +20,9 @@ dependencies = [
2220
"tabulate",
2321
"tqdm",
2422
]
23+
description = "Tool for comparing and inspecting data in SQL databases."
24+
dynamic = ["version"]
25+
name = "sqlcompyre"
2526
readme = "README.md"
2627
requires-python = ">=3.11"
2728

@@ -88,5 +89,8 @@ python_version = '3.11'
8889

8990
[tool.pytest.ini_options]
9091
addopts = "--import-mode=importlib --cov=sqlcompyre --cov-report term-missing --color=yes"
92+
filterwarnings = [
93+
"ignore:.*Dialect sqlite.pysqlite will not make use of SQL compilation:Warning",
94+
]
9195
markers = ["skip_dialect(dialect): skip this test for a certain dialect"]
9296
testpaths = ["tests"]

sqlcompyre/report/formatters/terminal.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) QuantCo 2024-2024
1+
# Copyright (c) QuantCo 2024-2025
22
# SPDX-License-Identifier: BSD-3-Clause
33

44
import math
@@ -136,7 +136,9 @@ def _format_table_column_matches(
136136
name,
137137
# We use math.floor here to make sure that we don't display 100.00% match
138138
# rate if the actual match rate is not exactly 100% (but e.g. 99.9999%).
139-
"n/a" if math.isnan(match) else f"{math.floor(match*10000)/10000:.2%}",
139+
"n/a"
140+
if math.isnan(match)
141+
else f"{math.floor(match * 10000) / 10000:.2%}",
140142
]
141143
for name, match in sorted(
142144
column_matches.fraction_same.items(), key=lambda x: x[0]

tests/_shared/tables.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def create_view(self, name: str, query: sa.Select) -> sa.Table:
5757
trans.execute(_CreateView(fullname, query))
5858

5959
# Return with self.schema instead of schema here to keep multi-part schemas
60-
columns = [sa.Column(name, col.type) for name, col in query.columns.items()]
60+
columns = [
61+
sa.Column(name, col.type) for name, col in query.selected_columns.items()
62+
]
6163
return sa.Table(name, self.metadata, *columns, schema=self.schema)
6264

6365

0 commit comments

Comments
 (0)