-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
63 lines (49 loc) · 1.54 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
.PHONY: clean-pyc clean-build clean docs
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
BROWSER := open
else
BROWSER := python -mwebbrowser
endif
help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "test-rsc - run tests for rsconnect"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate HTML documentation, including API docs"
@echo "release - package and upload a release"
clean: clean-build clean-pyc clean-test
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-test:
rm -f .coverage
rm -f coverage.xml
rm -fr htmlcov/
lint:
flake8 vetiver
test: clean-test
pytest -m 'not rsc_test and not docker'
test-pdb: clean-test
pytest -m 'not rsc_test and not docker' --pdb
test-rsc: clean-test
uv run pip freeze | grep -v '^vetiver' | grep -v '^-e ' > requirements.txt
echo 'vetiver' >> requirements.txt
uvx --from git+https://github.com/posit-dev/with-connect@0783dabdd24e360e985a4588ce1239c3dc31c542 \
with-connect -- uv run --with pytest pytest vetiver/tests/test_rsconnect.py -m 'rsc_test'
coverage:
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs doc documentation:
$(MAKE) -C docs docs
release: dist
twine upload dist/*
typecheck:
pyright