-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
43 lines (32 loc) · 1.26 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
42
43
SHELL=/bin/bash -eo pipefail
constants: aegea/constants.json
aegea/constants.json:
python3 -c "import aegea; aegea.initialize(); from aegea.util.constants import write; write()"
lint:
for dir in $$(dirname */__init__.py); do ruff check $$dir; done
for script in $$(grep -r -l '/usr/bin/env python3' aegea/missions aegea/rootfs.skel scripts); do ruff check $$script; done
mypy --install-types --non-interactive
test:
coverage run --source=$$(python3 setup.py --name) -m unittest discover --start-directory test --top-level-directory . --verbose
init_docs:
cd docs; sphinx-quickstart
docs:
$(MAKE) -C docs html
install: clean
python3 -m pip install build
python3 -m build
python3 -m pip install --upgrade $$(echo dist/*.whl)[test]
install_venv: clean
virtualenv --prompt "(aegea-venv) " .venv
source .venv/bin/activate; pip install --upgrade pip
source .venv/bin/activate; pip install --upgrade setuptools
source .venv/bin/activate; pip install --upgrade build
source .venv/bin/activate; python -m build
source .venv/bin/activate; pip install --upgrade dist/*.whl
@echo "Run \". $$(pwd)/.venv/bin/activate\" to activate the aegea installation"
clean:
-rm -rf build dist
-rm -rf *.egg-info
-rm -rf .venv
.PHONY: lint test docs install clean
include common.mk