-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
41 lines (31 loc) · 1.18 KB
/
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
# Makefile for simple installation of the Midgard Python Library
# Programs and directories
DOCSDIR = $(CURDIR)/documents/website
# Define phony targets (targets that are not files)
.PHONY: develop install format test typing doc
# Install in developer mode (no need to reinstall after changing source)
develop:
python -m flit install -s
# Regular install, freezes the code so must reinstall after changing source code
install:
python -m flit install --deps production
# Format code
black:
python -m black --line-length=119 .
# Run tests
test:
python -m pytest --doctest-modules --cov=midgard --cov-report=term-missing
typing:
python -m mypy --ignore-missing-imports --disallow-untyped-defs --disallow-untyped-calls midgard
# Create documentation on local web page
doc:
( cd $(DOCSDIR) && make )
# Clean all __pycache__ and other autogenerated files
clean:
rm -rf __pycache__/
rm -rf midgard/__pycache__/ midgard/*/__pycache__/ midgard/*/*/__pycache__/
rm -rf tests/__pycache__/ tests/*/__pycache__/ tests/*/*/__pycache__/
rm -rf .coverage htmlcov/
rm -rf .mypy_cache
rm -rf .pytest_cache
rm -rf documents/website/docs/api/* documents/website/__pycache__/ documents/website/mkdocs.yml