File: Makefile

package info (click to toggle)
python-holidays 0.86-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 57,296 kB
  • sloc: python: 117,830; javascript: 85; makefile: 59
file content (66 lines) | stat: -rw-r--r-- 1,761 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
help:
	@echo "Usage: make <target>"
	@echo "    check         run pre-commit and tests"
	@echo "    doc           run documentation build process"
	@echo "    help          show summary of available commands"
	@echo "    l10n          update .pot and .po files"
	@echo "    package       build package distribution"
	@echo "    pre-commit    run pre-commit against all files"
	@echo "    setup         setup development environment"
	@echo "    test          run tests (in parallel)"
	@echo "    tox           run tox (in parallel)"

check:
	make l10n
	make pre-commit
	make doc
	make test

clean:
	@for ext in mo pot pyc; do \
		find . -type f -name "*.$$ext" -delete; \
	done
	@rm -rf .mypy_cache .pytest_cache dist .tox

doc:
	mkdocs build

l10n:
	find . -type f -name "*.pot" -delete
	scripts/l10n/generate_po_files.py 2>/dev/null
	scripts/l10n/generate_mo_files.py

package:
	scripts/l10n/generate_mo_files.py
	python -m build

pre-commit:
	pre-commit run --all-files

release-notes:
	@scripts/generate_release_notes.py

sbom:
	@python -m cyclonedx_py requirements requirements/runtime.txt

setup:
	pip install --upgrade pip
	pip install --requirement requirements/dev.txt
	pip install --requirement requirements/docs.txt
	pip install --requirement requirements/runtime.txt
	pip install --requirement requirements/tests.txt
	pre-commit install --hook-type pre-commit
	pre-commit install --hook-type pre-push
	make l10n
	make package

snapshot:
	scripts/l10n/generate_mo_files.py
	scripts/generate_snapshots.py

test:
	scripts/l10n/generate_mo_files.py
	pytest --cov=. --cov-config=pyproject.toml --cov-report term-missing --cov-report xml --durations 10 --durations-min=0.75 --dist loadscope --no-cov-on-fail --numprocesses auto

tox:
	tox --parallel auto