File: Makefile

package info (click to toggle)
hcloud-python 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,396 kB
  • sloc: python: 15,311; makefile: 43; javascript: 3
file content (37 lines) | stat: -rw-r--r-- 707 bytes parent folder | download
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
SHELL := bash
.PHONY: test coverage docs clean

venv:
	python3 -m venv venv
	venv/bin/pip install -e .[docs,test]

lint: venv
	venv/bin/pylint hcloud
	venv/bin/mypy hcloud

test: venv
	venv/bin/pytest -v

coverage: venv
	venv/bin/coverage run -m pytest -v
	venv/bin/coverage report --show-missing
	venv/bin/coverage html
	xdg-open htmlcov/index.html

export SPHINXBUILD=../venv/bin/sphinx-build
docs: venv
	$(MAKE) -C docs clean
	$(MAKE) -C docs html
	xdg-open docs/_build/html/index.html

docs-dev: venv docs
	venv/bin/watchmedo shell-command \
		--patterns="*.py;*.rst;*.md;*.css" \
		--ignore-pattern=".git/*" \
		--recursive \
		--drop \
		--command="$(MAKE) -C docs html" \
		.

clean:
	git clean -xdf