-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 2.22 KB
/
Copy pathMakefile
File metadata and controls
63 lines (49 loc) · 2.22 KB
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
.PHONY : help clean lint test dist info test-browser test-python
help:
@echo "'clean' - remove all build/cache artifacts"
@echo "'clean-build' - remove build artifacts"
@echo "'clean-pyc' - remove Python cache files"
@echo "'clean-cov' - remove coverage files"
@echo "'clean-html' - remove built documentation"
@echo "'lint' - run pre-commit hooks"
@echo "'test' - run all tests with coverage"
@echo "'test-python' - run Python-only tests (skip browser)"
@echo "'test-browser' - run browser tests"
@echo "'dist' - build sdist + wheel"
@echo "'info' - show environment info"
clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-cov:
rm -rf coverage.xml .coverage coverage/
clean-html:
rm -rf doc/_build
rm -rf doc/source/_build
clean: clean-build clean-pyc clean-cov clean-html
lint:
pre-commit run -a -v
# Parallel test workers. Use CPU count by default, override with JOBS=N.
JOBS ?= auto
test:
pytest -v -r a --color=yes -n $(JOBS) --cov=foliplus --cov-append --cov-report=term-missing --cov-report=xml test
test-python:
pytest -v -r a --color=yes -n $(JOBS) -m "not browser" --cov=foliplus --cov-append --cov-report=term-missing --cov-report=xml test
test-browser:
pytest -v -r a --color=yes -n $(JOBS) -m "browser" --cov=foliplus --cov-append --cov-report=term-missing --cov-report=xml test
dist:
python -m build
twine check --strict dist/*
ls -l dist
html:
cd doc/source && make html
info:
@python -c "import platform,sys,os; print(f'Python: {sys.version.split()[0]}'); print(f'Platform: {platform.platform(terse=True)}')"
@python -c "from foliplus import __version__; print(f'foliplus: {__version__}')"
@python -c "import folium; print(f'folium: {folium.__version__}')"
@python -c "import folium, os, re; folium_dir = os.path.dirname(folium.__file__); fp = os.path.join(folium_dir, 'folium.py'); c = open(fp).read(); m = re.search(r'leaflet@([\d.]+)', c); print(f'Leaflet: {m.group(1)}' if m else 'Leaflet: unknown')"
@python -c "from foliplus._cdn import H3,CHROMA,GCOORD,SS; print(f'CDN: h3={H3} ss={SS} chroma={CHROMA} gcoord={GCOORD}')"