-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.78 KB
/
Makefile
File metadata and controls
67 lines (52 loc) · 1.78 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
64
65
66
67
#SPDX-License-Identifier: MIT
default:
@ echo "Testing Commands:"
@ echo " test-data Start the testing dataset Docker database"
@ echo " test Runs all tests"
@ echo " test-api Run all API tests"
@ echo
@ echo "Documentation Commands:"
@ echo " docs Generates the documentation"
@ echo " docs-view Generates the documentation, then opens it for local viewing"
lint:
@ pylint collectoss
lint-count:
@ pylint collectoss | wc -l
lint-docs:
@ pylint collectoss | grep docstring
lint-docs-missing:
@ pylint collectoss | grep docstring | wc -l
lint-github-tasks-count:
@ pylint collectoss | grep collectoss/tasks/github/ | wc -l
#
# Testing
#
.PHONY: test test-data test-application test-metric-routes test-python-versions
test-data:
@ - docker stop test_data
@ - docker rm test_data
@ docker run -p 5434:5432 --name test_data augurlabs/augur:test_data@sha256:71da12114bf28584a9a64ede2fac0cbc8dffc8e2f4a2c61231206e2f82201c2f
test:
# @ pytest tests/test_tasks/test_github_tasks/
@ python3 tests/start_server.py
@ pytest tests/test_metrics/test_metrics_functionality/ tests/test_routes/test_api_functionality/ tests/test_tasks/ tests/test_application/
@ python3 tests/stop_server.py
test-api:
@ python3 tests/start_server.py
@ pytest tests/test_metrics/test_metrics_functionality/ tests/test_routes/test_api_functionality/
@ python3 tests/stop_server.py
#
# UV installation
#
.PHONY: uv
uv:
@ command -v uv >/dev/null 2>&1 || { echo "Installing uv..."; pip install --user uv; }
#
# Documentation
#
.PHONY: docs docs-view
docs: uv
-rm -rf docs/build
uv run --only-group docs make -C docs html
docs-view: docs
@ bash -c 'open docs/build/html/index.html'