-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (55 loc) · 1.71 KB
/
Makefile
File metadata and controls
77 lines (55 loc) · 1.71 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
SHELL:=/bin/bash
ZIP=dalgebra# ZIP name
VERSION=$(shell cat ./VERSION)
# change to your sage command if needed
SAGE=sage
# Package folder
PACKAGE=dalgebra
all: install doc test
# Installing commands
install: clean_build clean_cache
$(SAGE) -pip install --upgrade .
no-deps: clean_build
$(SAGE) -pip install --upgrade --no-deps .
with-data: clean_build clean_cache import-data install
@echo "Installed dalgebra with data from almost_commuting_wilson"
import-data:
@echo "Importing data for almost_commuting_wilson..."
@cd experiments/almost_commuting && \
sage manage_data.sage import -version $(VERSION) > /dev/null
@echo "DATA IMPORTED"
uninstall:
$(SAGE) -pip uninstall $(PACKAGE)
develop: clean_build
$(SAGE) -pip install --upgrade -e .
test: no-deps
$(SAGE) -tox -e doctest -- $(PACKAGE)
coverage:
$(SAGE) -tox -e coverage -- $(PACKAGE)
lint:
$(SAGE) -tox -e relint,pycodestyle-minimal -- $(PACKAGE)
ready: lint test
@echo "Repository is ready to push: check with act th actions in case of changes."
# Documentation commands
doc:
cd docsrc && $(SAGE) -sh -c "make html"
doc-github: doc
@rm -rf ./docs
@cp -a docsrc/build/html/. ./docs
@echo "" > ./docs/.nojekyll
# Cleaning commands
clean: clean_doc clean_pyc
clean_build:
@echo "Cleaning previous build files"
@rm -rf ./build ./$(PACKAGE).egg-info
clean_doc:
@echo "Cleaning documentation"
@rm -rf docs/* docs/.buildinfo docs/.nojekyll
@cd docsrc && $(SAGE) -sh -c "make clean"
clean_pyc:
@echo "Cleaning the Python precompiled files (.pyc)"
@find . -name "*.pyc" -exec rm {} +
clean_cache:
@echo "Cleaning the cached results in files"
@ rm -rf dalgebra/__pycache__/*.dmp
.PHONY: all install develop test coverage clean clean_doc doc doc-pdf