-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
33 lines (26 loc) · 1022 Bytes
/
Makefile
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
# These shell flags are REQUIRED for an early exit in case any program called by make errors
.SHELLFLAGS=-euo pipefail -c
SHELL := /bin/bash
all:
@echo
@echo "Targets:"
@echo "prepare: Installs pipenv."
@echo "install: Installs the sretoolbox package and its dependencies."
@echo "develop: Installs the sretoolbox package, its dependencies and its development dependencies."
@echo "check: Runs the style check, the code check and the tests."
@echo "clean: Removes the virtualenv and python artifacts."
@echo
prepare:
pip install pipenv --user --upgrade
install: prepare
pipenv install
develop: prepare
pipenv install --dev
check:
pipenv run ruff format --check
pipenv run ruff check --no-fix
pipenv run pipenv run pytest -v --cov=sretoolbox --cov-report=term-missing tests/
clean:
pipenv --rm
find . -type d \( -name "build" -o -name "dist" -o -name "*.egg-info" \) -exec rm -fr {} +
find . \( -name "*.pyc" -o -name "*.pyo" -o -name "__pycache__" \) -exec rm -fr {} +