Skip to content

Commit

Permalink
use uv to manage development environments
Browse files Browse the repository at this point in the history
  • Loading branch information
amorison committed Aug 26, 2024
1 parent 8f6aa7e commit 47857ea
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__/
/loam/_version.py
/loam.egg-info/
/docs/_build/
/uv.lock
24 changes: 24 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# check style, typing, and run tests
check-all: lint typecheck test

# check style and format
lint:
uv run -- ruff check --extend-select I .
uv run -- ruff format --check .

# format code and sort imports
format:
uv run -- ruff check --select I --fix .
uv run -- ruff format .

# check static typing annotations
typecheck:
uv run -- mypy loam/ tests/

# run test suite
test:
uv run -- pytest --cov=./loam --cov-report term-missing

# invoke mkdocs with appropriate dependencies
mkdocs *FLAGS:
uv run --with-requirements=docs/requirements.txt -- mkdocs {{FLAGS}}
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,13 @@ module = [
"pytest.*",
]
ignore_missing_imports = true

[tool.uv]
dev-dependencies = [
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"ruff>=0.6.2",
"mypy>=1.11.1",
# type stubs for mypy
"types-toml>=0.10.8.20240310",
]

0 comments on commit 47857ea

Please sign in to comment.