-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (40 loc) · 1.11 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
44
45
46
47
48
49
50
51
52
53
SHELL := /bin/bash
.PHONY: all clean deps dist docs upgrade lint test integration help
RUN=poetry run
help:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
all: clean lint test
lint:
@${RUN} ruff check .
test_only:
@${RUN} pytest -m "not integration" -v --cov-config .coveragerc --cov=i18web -l --tb=short --maxfail=1 tests/
@${RUN} coverage xml
test: test_only
integration:
@${RUN} behave
upgrade:
@poetry update
build: clean
@poetry build
deps:
@poetry export -f requirements.txt > requirements.txt
@poetry export --with dev -f requirements.txt > requirements_dev.txt
dist: build
# @poetry run python setup.py sdist bdist_wheel
docs:
cd docs
@${RUN} mkdocs build
cd ..
clean:
@find ./ -name '*.pyc' -exec rm -f {} \;
@find ./ -name 'Thumbs.db' -exec rm -f {} \;
@find ./ -name '*~' -exec rm -f {} \;
rm -rf .cache
rm -rf .pytest_cache
rm -rf .ruff_cache
rm -rf docs/build
rm -rf dist
rm -rf *.egg-info
rm -rf htmlcov
rm -rf .tox/
rm -rf docs/_build