-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.16 KB
/
Makefile
File metadata and controls
54 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
checkfiles = asyncodbc/ examples/ tests/ conftest.py
py_warn = PYTHONDEVMODE=1
pytest_opts = -n auto --cov=asyncodbc --tb=native -q
up:
@uv lock --upgrade
deps:
@uv sync --all-extras --all-groups --no-group docs $(options)
_style:
@ruff format $(checkfiles)
@ruff check --fix $(checkfiles)
style: deps _style
_codeqc:
#mypy $(checkfiles)
bandit -c pyproject.toml -r $(checkfiles)
uvx twine check dist/*
codeqc: build _codeqc
_check: _build
@ruff format --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
@ruff check $(checkfiles)
$(MAKE) _codeqc
check: deps _check
_lint: _build _style _codeqc
lint: deps _lint
test: deps test_mssql
test_mssql:
$(py_warn) TEST_DSN="DRIVER=ODBC Driver 18 for SQL Server;SERVER=127.0.0.1,1433;UID=sa;PWD=$(TEST_MSSQL_PASS);TrustServerCertificate=YES;MARS_Connection=YES" pytest $(pytest_opts)
_testall: test_mssql
testall: deps _testall
coverage report
ci: check _testall
docs: deps
uv pip install --group docs
rm -fR ./build
sphinx-build -M html docs build
_build:
rm -fR dist/
uv build
build: deps _build
publish: deps build
echo 'Use github action instead of `twine upload dist/*`'