-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (51 loc) · 3.3 KB
/
Makefile
File metadata and controls
82 lines (51 loc) · 3.3 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
help: ## Show this help message
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
clean: clean_output ## Clean all
.PHONY: mkdocs_serve mkdocs_build mkdocs_deploy
###############################################################################
pytest: ## Run pytest on the tests/ directory
cd tests && pytest -W ignore::DeprecationWarning
pytest_verbose: ## Run pytest in verbose mode on the tests/ directory
cd tests && pytest -v -W ignore::DeprecationWarning
run_all_examples: ## Run all examples to ensure they work
python3 ./tools/run_all_examples.py
check_expected_output: ## Check the output files against expected files
python3 ./tools/check_expected_output.py
clean_output: ## Clean all generated output files png,json,pdf,svg
rm -f ./examples/output/*.{png,json,pdf,svg,mp4}
##############################################################################
lint: lint_pyright lint_ruff ## Run all linters
lint_pyright: ## Run pyright type checker on src and examples
pyright ./src/gsp/ ./src/gsp_matplotlib/ ./src/gsp_datoviz/ ./src/gsp_pydantic/ ./src/gsp_nico/ ./src/gsp_extra ./src/vispy2 ./examples/
# lint_pydoclint: ## Run pydocstyle to check for docstring style issues
# pydoclint ./src/gsp ./src/gsp_matplotlib ./src/gsp_datoviz ./src/gsp_pydantic ./src/gsp_network ./examples/gsp_extra
lint_ruff: ## Run ruff linter
ruff check ./src/gsp ./src/gsp_matplotlib ./src/gsp_datoviz ./src/gsp_pydantic/ ./src/gsp_network/ ./src/gsp_extra ./src/vispy2
test: lint pytest_verbose run_all_examples check_expected_output ## Run all tests
@echo "All tests passed!"
###############################################################################
stubs_clean: ## Remove all generated type stubs
rm -rf ./stubs/gsp
stubs_gsp: stubs_clean ## Generate type stubs for src/gsp
stubgen -p gsp -o ./stubs/
stubgen -p gsp_matplotlib -o ./stubs/
###############################################################################
network_server_dev: network_server_kill ## Run the network server in development mode
watchmedo auto-restart -d ./src -d ./tools -p="*.py" -R -- python ./src/gsp_network/tools/network_server.py
network_server_kill: ## Kill any process using port 5000 (commonly used for network servers)
python3 ./src/gsp_network/tools/network_server_kill.py
network_server: ## Run the network renderer server
python3 ./src/gsp_network/tools/network_server.py
network_server_user_transforms: ## Run the network renderer server with all the user transforms enabled
python3 ./src/gsp_extra/transform_links/transform_network_server.py
network_server_user_transforms_dev: ## Run the network renderer server with all the user transforms enabled in development mode
watchmedo auto-restart -d ./src -d ./tools -p="*.py" -R -- python3 ./src/gsp_extra/transform_links/transform_network_server.py
network_server_clean_debug: ## Clean the network server debug folder
rm -f ./src/gsp_network/tools/network_server_debug/*
###############################################################################
mkdocs_serve: ## Serve the MkDocs documentation locally
mkdocs serve
mkdocs_build: ## Build the MkDocs documentation site
mkdocs build
mkdocs_deploy: mkdocs_build ## Deploy the MkDocs documentation site to GitHub Pages
mkdocs gh-deploy --clean