-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (49 loc) · 1.71 KB
/
Makefile
File metadata and controls
59 lines (49 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
lint:
@flake8 cereeberus/
format:
@black cereeberus/
.PHONY: docs
docs:
# Running sphinx-build to build html files in build folder.
rm -rf docs
mkdir -p docs
sphinx-build -M html doc_source docs
rsync -a docs/html/ docs/
rm -rf docs/html
.PHONY: docs-execute
docs-execute:
# Running sphinx-build and forcing nbsphinx to execute all notebooks.
rm -rf docs
mkdir -p docs
sphinx-build -M html doc_source docs -D nbsphinx_execute=always
rsync -a docs/html/ docs/
rm -rf docs/html
install-editable:
@pip install -e .
release:
python -m build
.PHONY: tests
tests:
# Running unittests
@python -m unittest
install-requirements:
@pip install -r requirements.txt
.PHONY: conda-env
conda-env:
@conda create -y -n cereeberus python=3.12
@conda run -n cereeberus pip install -r requirements.txt
@conda run -n cereeberus pip install -e .
all: install-requirements install-editable format tests docs
help:
@echo "Makefile commands:"
@echo " make lint - Run flake8 linter on the code"
@echo " make format - Format code using black"
@echo " make install-editable - Install the package in editable mode for development"
@echo " make docs - Build the documentation in the docs/ folder"
@echo " make docs-execute - Build docs and execute all notebooks"
@echo " make release - Build the package for release"
@echo " make tests - Run the unit tests"
@echo " make install-requirements- Install all dependencies from requirements.txt"
@echo " make conda-env - Create conda env, install requirements, and install package"
@echo " make all - Run format, tests, docs, and release"
@echo " make help - Show this help message"