-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
44 lines (31 loc) · 872 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
34
35
36
37
38
39
40
41
42
43
44
.PHONY: README.md tests venv output/feed.rss
PYTHON_DIRS=scripts tests
requirements.txt: requirements.in
pip-compile requirements.in
venv:
python -m venv venv
venv/bin/pip install -r requirements.txt
format:
black $(PYTHON_DIRS)
isort $(PYTHON_DIRS)
lint:
black --check $(PYTHON_DIRS)
isort --check $(PYTHON_DIRS)
flake8 $(PYTHON_DIRS)
mypy:
mypy $(PYTHON_DIRS)
tests:
python -m pytest -sv --cov tests
fetch-data:
venv/bin/python scripts/00-fetch.py
discover-dates:
venv/bin/python scripts/01-get-discovery-dates.py
filter-data:
venv/bin/python scripts/02-filter.py
publish-feed:
venv/bin/python scripts/03-generate-rss.py
ensure-unstaged:
@git diff --cached --quiet || (echo "Cannot run while files staged" && false)
run-feed: ensure-unstaged output/feed.rss
git add output/feed.rss
git diff --cached --quiet || git commit -m "Update feed"