Skip to content

Commit 57315e7

Browse files
authored
test coverage, profiling tests, and rearranging uv lock (#206)
* test coverage, profiling tests, and rearranging uv lock * try moving to dep group syntax for dev install
1 parent d625ea1 commit 57315e7

File tree

4 files changed

+260
-13
lines changed

4 files changed

+260
-13
lines changed

.github/workflows/python.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
working-directory: ./py
1515
env:
1616
TYPEGUARD: 1
17+
PROFILE: 1
1718

1819
strategy:
1920
fail-fast: false
@@ -33,9 +34,9 @@ jobs:
3334
- name: Install Python
3435
run: uv venv -p ${{ matrix.python-version }}
3536
- name: Install deps
36-
run: uv pip install -e ".[dev]"
37+
run: uv pip install -e . --group dev
3738
- name: Test
38-
run: uv run pytest
39+
run: uv run pytest --cov=mistql
3940
- name: Lint
4041
run: uv run ruff format --check
4142
- name: Typecheck

py/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ dependencies = [
1919
authors = [{ name = "Evin Sellin", email = "evinism@gmail.com" }]
2020
urls = { Repository = "https://github.com/evinism/mistql", Issues = "https://github.com/evinism/mistql/issues" }
2121

22-
[project.optional-dependencies]
22+
[dependency-groups]
2323
dev = [
2424
"pytest>=7.4.4,<8.0.0",
2525
"ruff>=0.11.12,<0.12.0",
2626
"toml>=0.10.2,<1.0.0",
2727
"mypy>=1.4.1,<2.0.0",
2828
"snakeviz>=2.2.0,<3.0.0",
29+
"pytest-cov>=5.0.0",
2930
]
3031

3132
[[tool.mypy.overrides]]

py/tests/test_performance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_performance():
3737
profiler.disable()
3838

3939
# Print profiling results
40-
s = io.StringIO()
41-
ps = pstats.Stats(profiler, stream=s).sort_stats("cumulative")
42-
ps.print_stats()
40+
ps = pstats.Stats(profiler)
4341
ps.dump_stats("profile.pstats")
42+
ps.strip_dirs()
43+
ps.sort_stats("cumulative").print_stats(20)

0 commit comments

Comments
 (0)