2025-04-16 13:54:31 -03:00
|
|
|
.PHONY: install run test clean refresh
|
|
|
|
|
|
2025-01-08 00:19:49 -03:00
|
|
|
install:
|
|
|
|
|
pip install -r requirements.txt
|
2025-04-16 13:54:31 -03:00
|
|
|
pip install pytest pytest-cov
|
2025-01-08 00:19:49 -03:00
|
|
|
|
2025-03-27 14:34:16 -03:00
|
|
|
clean:
|
2025-04-16 13:54:31 -03:00
|
|
|
find . -type d -name "__pycache__" -exec rm -r {} +
|
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
|
find . -type f -name "*.pyo" -delete
|
|
|
|
|
find . -type f -name "*.pyd" -delete
|
|
|
|
|
find . -type f -name ".coverage" -delete
|
|
|
|
|
find . -type d -name "*.egg-info" -exec rm -r {} +
|
|
|
|
|
find . -type d -name "*.egg" -exec rm -r {} +
|
|
|
|
|
find . -type d -name ".pytest_cache" -exec rm -r {} +
|
|
|
|
|
find . -type d -name "htmlcov" -exec rm -r {} +
|
2025-04-09 09:59:12 -03:00
|
|
|
rm -rf ~/.local/share/controles/database.db*
|
2025-03-27 14:34:16 -03:00
|
|
|
rm -f admin_qr.png
|
|
|
|
|
|
2025-04-09 09:59:12 -03:00
|
|
|
init-db: clean
|
|
|
|
|
python init_db.py
|
2025-03-27 14:34:16 -03:00
|
|
|
|
2025-04-09 09:59:12 -03:00
|
|
|
seed: init-db
|
2025-04-04 09:24:56 -03:00
|
|
|
python seed.py
|
|
|
|
|
|
2025-04-09 09:59:12 -03:00
|
|
|
run:
|
|
|
|
|
python app.py
|
|
|
|
|
|
|
|
|
|
run-with-seed: seed run
|
2025-04-04 09:24:56 -03:00
|
|
|
|
2025-03-27 14:34:16 -03:00
|
|
|
reset-admin: clean
|
2025-04-02 21:20:48 -03:00
|
|
|
python create_admin.py
|
2025-04-16 13:54:31 -03:00
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
pytest tests/ --cov=app --cov=functions --cov-report=term-missing
|
|
|
|
|
|
|
|
|
|
refresh: clean install test
|
|
|
|
|
python app.py
|