-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmakefile
77 lines (51 loc) · 1.41 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
74
75
76
77
all: run-debug
# Env. Setup
venv:
python3 -m venv .venv
install-deps:
python -m pip install -r requirements.txt
install-package:
pip install -e .
build-css:
npm run build-css
watch-css:
npm run watch-css
setup:
flask --app coldsweat setup alice@example.com -p password1234 -n "Alice Cooper"
flask --app coldsweat import tests/sample-subscriptions.opml alice@example.com -f
run:
flask --app coldsweat run
run-debug:
flask --app coldsweat run --debug
fetch:
flask --app coldsweat --debug fetch
# Tests
create-test-data: export FLASK_DATABASE_URL=sqlite:///instance/coldsweat-test.db
create-test-data:
rm -f ./instance/coldsweat-test.db
flask --app coldsweat setup test@example.com -p secret-password -n "Test User"
flask --app coldsweat import ./tests/test-subscriptions.xml test@example.com -f
sqlite3 ./instance/coldsweat-test.db ".dump" > tests/test-data.sql
test:
python -m pytest -s
# Build Wheel/PyPI Support
install-build-deps:
python -m pip install build twine
build: clean build-css
python -m build
check:
twine check dist/*
upload:
twine upload dist/*
upload-test:
twine upload -r testpypi dist/*
clean:
rm -rf dist/ build/ .parcel-cache/
# Test deploy servers
run-gunicorn:
gunicorn -w 8 'coldsweat:create_app()' --bind 127.0.0.1:5000
run-waitress:
waitress-serve --host 127.0.0.1 --port 5000 --threads=8 --call coldsweat:create_app
# Database
sql:
sqlite3 instance/coldsweat.db