-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 803 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 803 Bytes
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
DOCS_FOLDER = "docs"
SOURCE_FOLDER = "madminer"
TESTS_FOLDER = "tests"
.PHONY: build
build:
@echo "Building package"
@python -m build --installer uv .
.PHONY: check
check:
@echo "Checking code format"
@black --check $(SOURCE_FOLDER) $(TESTS_FOLDER) examples
@isort --check $(SOURCE_FOLDER) $(TESTS_FOLDER)
.PHONY: docs
docs:
@echo "Building documentation"
@sphinx-build -W -b html $(DOCS_FOLDER) "$(DOCS_FOLDER)/_build"
.PHONY: tag
tag:
@echo "Tagging current commit"
@git tag --annotate "v$(shell python -c 'from importlib.metadata import version; print(version("madminer"))')" \
--message "Tag v$(shell python -c 'from importlib.metadata import version; print(version("madminer"))')"
@git push --follow-tags
.PHONY: test
test:
@echo "Testing code"
@pytest -p no:cacheprovider