-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 1.6 KB
/
Makefile
File metadata and controls
39 lines (31 loc) · 1.6 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
# Quickly run black on all python files in this repository, local version of the pre-commit hook
black:
@for file in `find . -name "*.py"`; do \
poetry run black $$file; \
done
check-black:
poetry run black --check . --exclude="dist/*" --exclude="build/*" --exclude="docs/*";
# install python dependencies
pythondeps:
pip install --upgrade pip && pip install -e .
# create docker image with tag (martinnoergaard/petprep_extract_tacs:X.X.X) from toml file by using cat and grep to
# extract the project name from the pyproject.toml file
USE_LOCAL_FREESURFER ?= False
dockerbuild:
docker build --build-arg="USE_LOCAL_FREESURFER=$(USE_LOCAL_FREESURFER)" -t martinnoergaard$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):$(shell cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2) .
docker build --build-arg="USE_LOCAL_FREESURFER=$(USE_LOCAL_FREESURFER)" -t martinnoergaard/$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):latest .
dockerpush: dockerbuild
docker push martinnoergaard/$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):$(shell cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
docker push martinnoergaard/$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):latest
.PHONY: docs
docs:
poetry run sphinx-build -b html docs docs/_build/html
.PHONY: docs-serve
docs-serve:
poetry run sphinx-autobuild docs docs/_build/html
# runs github actions ci locally using nektos/act
# needs to be installed with brew install act on mac
# install instructions for other platforms can be found here:
# https://nektosact.com/installation/index.html
ci:
act push