Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@ repos:
- id: check-pre-commit-ci-config

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.3
rev: 0.11.14
hooks:
- id: uv-lock

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
rev: v0.15.12
hooks:
- id: ruff-check
args: ["--fix"]
- id: ruff-format

- repo: https://github.com/billwallis/bills-hooks
rev: v0.0.13
rev: v0.0.15
hooks:
- id: banned-python-code
- id: check-no-commit-comment
- id: tidy-gitkeep

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
rev: 0.37.2
hooks:
- id: check-github-workflows
- id: check-compose-spec
51 changes: 48 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ version = "0.0.0"
description = "SQL scripts that demonstrate various features and concepts."
authors = [{name = "billwallis"}]
readme = "README.md"
license-files = ["LICENSE"]
keywords = ["sql", "sql-server", "postgres", "sqlite", "duckdb"]
urls = { Repository = "https://github.com/billwallis/sql-learning-materials" }
urls = {Repository = "https://github.com/billwallis/sql-learning-materials"}
requires-python = ">=3.11"
dependencies = [
"db-query-profiler>=0.0.6",
Expand All @@ -25,10 +26,11 @@ dependencies = [

[dependency-groups]
dev = [
"poethepoet>=0.42.1",
"pre-commit>=4.5.1",
]
test = [
"pytest>=9.0.2",
"pytest>=9.0.3",
"pytest-cov>=7.0.0",
]
docs = [
Expand All @@ -44,10 +46,53 @@ docs = [
packages = ["src"]


[tool.uv]
required-version = ">=0.8"
default-groups = "all"
package = false


[tool.poe]
verbosity = -1
envfile.optional = ".env"

[tool.poe.tasks]
install.shell = """
uv sync --refresh
uv run pre-commit install --install-hooks
"""
upgrade.shell = """
uv sync --refresh --upgrade
uv run pre-commit autoupdate
"""
test = "uv run pytest -vvv"

[tool.poe.tasks.lint]
control.expr = "sys.platform"

[[tool.poe.tasks.lint.switch]]
case = "win32"
shell = """
echo '=== pre-commit checks ==='
SKIP=identity uv run pre-commit run --all-files --hook-stage pre-commit
"""

[[tool.poe.tasks.lint.switch]]
shell = """
echo '\\033[0;34mpre-commit checks\\033[0m'
SKIP=identity uv run pre-commit run --all-files --hook-stage pre-commit
"""


[tool.pytest.ini_options]
addopts = "--cov=src --cov-report term-missing"
addopts = "--cov=src"
testpaths = ["tests"]

[tool.coverage]
run.branch = true
report.fail_under = 0
report.show_missing = true


[tool.ruff]
line-length = 80
Expand Down
Loading