Skip to content

Commit d7d2e5a

Browse files
committed
Update dependencies; Makefile.
1 parent 9f5645f commit d7d2e5a

File tree

6 files changed

+201
-289
lines changed

6 files changed

+201
-289
lines changed

Makefile

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,39 @@ VIRTUAL_ENVIRONMENT := $(CURDIR)/.venv
33
LOCAL_PYTHON := $(VIRTUAL_ENVIRONMENT)/bin/python3
44

55
define HELP
6-
Manage $(PROJECTNAME). Usage:
6+
Manage $(PROJECT_NAME). Usage:
77

88
make run - Run $(PROJECT_NAME).
9-
make install - Create virtual env, & install dependencies.
10-
make update - Update pip dependencies via Poetry and output requirements.txt.
11-
make format - Format code with Python's `Black` library.
12-
make lint - Check code formatting with flake8.
9+
make install - Create virtual env, install dependencies, and run project.
10+
make deploy - Install and run script by running `make install` and `make run` in succession.
11+
make update - Update pip dependencies via Poetry and export output to requirements.txt.
12+
make format - Format code with Pythons `Black` library.
13+
make lint - Check code formatting with `flake8`.
1314
make clean - Remove cached files and lock files.
15+
1416
endef
1517
export HELP
1618

17-
.PHONY: run install update format lint clean help
19+
20+
.PHONY: run install deploy update format lint clean help
21+
22+
requirements: .requirements.txt
23+
env: ./.venv/bin/activate
1824

1925

20-
env: .venv/bin/python3
26+
.requirements.txt: requirements.txt
27+
$(shell . .venv/bin/activate && pip install -r requirements.txt)
2128

2229

2330
all help:
2431
@echo "$$HELP"
2532

2633

34+
.PHONY: run
35+
run: env
36+
flask run
37+
38+
2739
.PHONY: install
2840
install:
2941
if [ ! -d "./.venv" ]; then python3 -m venv $(VIRTUAL_ENVIRONMENT); fi
@@ -32,9 +44,10 @@ install:
3244
$(LOCAL_PYTHON) -m pip install -r requirements.txt
3345

3446

35-
.PHONY: run
36-
run: env
37-
$(shell . .venv/bin/activate && flask run)
47+
.PHONY: deploy
48+
deploy:
49+
make install
50+
make run
3851

3952

4053
.PHONY: update
@@ -65,11 +78,12 @@ clean:
6578
find . -name '*.pyc' -delete
6679
find . -name '__pycache__' -delete
6780
find . -name 'poetry.lock' -delete
68-
find . -name 'Pipefile.lock' -delete
6981
find . -name '*.log' -delete
82+
find . -name '.DS_Store' -delete
7083
find . -wholename 'logs/*.json' -delete
7184
find . -wholename '.pytest_cache' -delete
7285
find . -wholename '**/.pytest_cache' -delete
7386
find . -wholename './logs/*.json' -delete
74-
find . -wholename '**/.webassets-cache/' -delete
75-
find . -wholename './logs' -delete
87+
find . -wholename './logs' -delete
88+
find . -wholename '*.html' -delete
89+
find . -wholename '**/.webassets-cache' -delete

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Flask Blueprint Tutorial
22

33
![Python](https://img.shields.io/badge/Python-v^3.8-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
4-
![Flask](https://img.shields.io/badge/Flask-v1.1.2-blue.svg?longCache=true&logo=flask&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a)
4+
![Flask](https://img.shields.io/badge/Flask-v2.1.1-blue.svg?longCache=true&logo=flask&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a)
55
![Flask-Assets](https://img.shields.io/badge/Flask--Assets-v2.0-blue.svg?longCache=true&logo=flask&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a)
66
![GitHub Last Commit](https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square&colorA=4c566a&colorB=a3be8c&logo=GitHub)
77
[![GitHub Issues](https://img.shields.io/github/issues/hackersandslackers/flask-blueprint-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b)](https://github.com/hackersandslackers/flask-blueprint-tutorial/issues)

flask_blueprint_tutorial/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
"""Initialize Flask app."""
2-
from ddtrace import patch_all
32
from flask import Flask
43
from flask_assets import Environment
54

65
from config import Config
76

8-
if Config.FLASK_ENV == "production" and Config.DD_SERVICE:
9-
patch_all()
10-
117

128
def init_app():
139
"""Create Flask application."""

0 commit comments

Comments
 (0)