forked from eli64s/readme-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (60 loc) · 1.62 KB
/
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
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
# Makefile
COMMITS := 10
SHELL := /bin/bash
VENV := readmeai
VV := \
.PHONY: help clean format lint conda-recipe git-rm-cache git-log nox pytest poetry-reqs search
help:
@echo "Commands:"
@echo "clean : repository file cleanup."
@echo "format : executes code formatting."
@echo "lint : executes code linting."
@echo "conda-recipe : builds conda package."
@echo "git-rm-cache : fix git untracked files."
@echo "git-log : displays git log."
@echo "nox : executes nox test suite."
@echo "pytest : executes tests."
@echo "poetry-reqs : generates requirements.txt file."
@echo "search : searches word in directory."
.PHONY: clean
clean: format
@echo -e "\nFile clean up in directory: ${CURDIR}"
./scripts/clean.sh clean
.PHONY: format
format:
@echo -e "\nFormatting in directory: ${CURDIR}"
ruff check --select I --fix .
ruff format .
.PHONY: lint
lint:
@echo -e "\nLinting in directory: ${CURDIR}"
ruff check . --fix
.PHONY: conda-recipe
conda-recipe:
grayskull pypi readmeai
conda build .
.PHONY: git-rm-cache
git-rm-cache:
git rm -r --cached .
.PHONY: git-log
git-log:
git log -n ${COMMITS} --pretty=tformat: --shortstat
.PHONY: nox
nox:
nox -f noxfile.py
.PHONY: pytest
pytest:
poetry run pytest ${VV} \
-n auto \
--asyncio-mode=auto \
--cov=. \
--cov-branch \
--cov-report=xml \
--cov-report=term-missing \
.PHONY: poetry-reqs
poetry-reqs:
poetry export -f requirements.txt --output setup/requirements.txt --without-hashes
.PHONY: search
search: clean
@echo -e "\nSearching for: ${WORD} in directory: ${CURDIR}"
grep -Ril ${WORD} readmeai tests scripts setup