Skip to content

Commit 604ad2b

Browse files
committed
use uv to manage dev environment
1 parent 4080843 commit 604ad2b

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ stagpy.egg-info/
77
/build/
88
/stagpy/_version.py
99
/stagpy_git/
10+
/uv.lock

justfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# check style, typing, and run tests
2+
check-all: check-static test
3+
4+
# check style and typing
5+
check-static: lint typecheck
6+
7+
# check style and format
8+
lint:
9+
uv run -- ruff check --extend-select I .
10+
uv run -- ruff format --check .
11+
12+
# format code and sort imports
13+
format:
14+
uv run -- ruff check --select I --fix .
15+
uv run -- ruff format .
16+
17+
# check static typing annotations
18+
typecheck:
19+
uv run -- mypy stagpy/ tests/
20+
21+
# run test suite
22+
test:
23+
uv run -- pytest --cov=./stagpy --cov-report term-missing
24+
25+
# invoke mkdocs with appropriate dependencies
26+
mkdocs *FLAGS:
27+
uv run --with-requirements=docs/requirements.txt -- mkdocs {{FLAGS}}

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,12 @@ module = [
6868
"scipy.*",
6969
]
7070
ignore_missing_imports = true
71+
72+
[tool.uv]
73+
dev-dependencies = [
74+
"pytest>=8.3.2",
75+
"pytest-cov>=5.0.0",
76+
"mypy>=1.11.2",
77+
"ruff>=0.6.2",
78+
"pandas-stubs>=2.2.2.240807",
79+
]

0 commit comments

Comments
 (0)