-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (35 loc) · 798 Bytes
/
Makefile
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
# Set up a new development environment
init:
python -m pip install --upgrade pip
pip install pip-tools
$(MAKE) install
pip install -e .
pip check
python -c "import nltk; nltk.download('punkt')"
# Install all dependencies
install:
pip install -r requirements.txt
# Pin all dependencies
pin:
pip-compile pyproject.toml -q --resolver=backtracking --no-emit-index-url -o requirements.txt
# Upgrade all dependencies
upgrade:
pip-compile pyproject.toml -q --resolver=backtracking --no-emit-index-url --upgrade -o requirements.txt
$(MAKE) install
# Run all code checks
checks: format lint type
# Check code formatting
format:
black --check .
# Run linting
lint:
ruff check .
# Run type checking
type:
mypy .
reformat:
black .
ruff --fix .
# Run tests
test:
python -m pytest tests