-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
53 lines (40 loc) · 1.34 KB
/
justfile
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
# Use PowerShell instead of sh
# set shell := ["powershell.exe", "-c"]
help:
@just --list
install:
@echo "🚀 Installing dependencies"
@poetry install --with dev
install-pre-commit:
@echo "🚀 Setting up the hooks"
@poetry run pre-commit install
check-project:
@echo "🚀 Checking consistency between poetry.lock and pyproject.toml"
@poetry check --lock
@echo "🚀 Running the hooks against all files"
@poetry run pre-commit run --all-files
ruff:
@echo "🚀 Linting the project with Ruff"
@poetry run ruff check src tests
ruff-show-violations:
@echo "🚀 Linting the project with Ruff and show violations"
@poetry run ruff check --show-source src tests
ruff-fix:
@echo "🚀 Linting the project with Ruff and autofix violations (where possible)"
@poetry run ruff check --fix src tests
black:
@echo "🚀 Formatting the code with Black"
@poetry run black src tests
black-check:
@echo "🚀 Listing files Black would reformat"
@poetry run black --check src tests
black-diff:
@echo "🚀 Checking formatting advices from Black"
@poetry run black --diff src tests
lint-and-format: ruff-fix black
test:
@echo "🚀 Testing code with pytest"
@poetry run pytest --verbose tests
test-and-report-cov:
@echo "🚀 Testing code with pytest and generating coverage report"
@poetry run pytest --cov=./ --cov-report=xml