Skip to content

Commit a03a96d

Browse files
committed
Update Python version; update dependencies.
1 parent 47974b6 commit a03a96d

File tree

8 files changed

+318
-307
lines changed

8 files changed

+318
-307
lines changed
File renamed without changes.

Makefile

+10-24
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,36 @@ export HELP
1919

2020
.PHONY: run install deploy update format lint clean help
2121

22-
2322
all help:
2423
@echo "$$HELP"
2524

26-
2725
env: $(VIRTUAL_ENV)
2826

29-
3027
$(VIRTUAL_ENV):
3128
if [ ! -d $(VIRTUAL_ENV) ]; then \
3229
echo "Creating Python virtual env in \`${VIRTUAL_ENV}\`"; \
3330
python3 -m venv $(VIRTUAL_ENV); \
3431
fi
3532

33+
.PHONY: dev
34+
dev: env
35+
$(LOCAL_PYTHON) -m main --reload
3636

3737
.PHONY: run
3838
run: env
39-
uwsgi --http 127.0.0.1:8081 --master --module wsgi:app --processes 4 --threads 2
40-
39+
$(LOCAL_PYTHON) -m main
4140

4241
.PHONY: install
4342
install: env
4443
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel && \
45-
$(LOCAL_PYTHON) -m pip install --no-cache-dir uwsgi && \
4644
$(LOCAL_PYTHON) -m pip install -r requirements.txt && \
4745
echo Installed dependencies in \`${VIRTUAL_ENV}\`;
4846

49-
5047
.PHONY: deploy
5148
deploy:
52-
make install
49+
make install && \
5350
make run
5451

55-
5652
.PHONY: test
5753
test: env
5854
$(LOCAL_PYTHON) -m \
@@ -61,21 +57,18 @@ test: env
6157
coverage html --title='Coverage Report' -d .reports && \
6258
open .reports/index.html
6359

64-
6560
.PHONY: update
6661
update: env
6762
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel && \
6863
poetry update && \
6964
poetry export -f requirements.txt --output requirements.txt --without-hashes && \
7065
echo Installed dependencies in \`${VIRTUAL_ENV}\`;
7166

72-
7367
.PHONY: format
7468
format: env
75-
$(LOCAL_PYTHON) -m isort --multi-line=3 .
69+
$(LOCAL_PYTHON) -m isort --multi-line=3 . && \
7670
$(LOCAL_PYTHON) -m black .
7771

78-
7972
.PHONY: lint
8073
lint: env
8174
$(LOCAL_PYTHON) -m flake8 . --count \
@@ -84,22 +77,15 @@ lint: env
8477
--show-source \
8578
--statistics
8679

87-
8880
.PHONY: clean
8981
clean:
9082
find . -name 'poetry.lock' -delete && \
9183
find . -name '.coverage' -delete && \
92-
find . -name '*.pyc' -delete \
93-
find . -name '__pycache__' -delete \
94-
find . -name 'poetry.lock' -delete \
95-
find . -name '*.log' -delete \
96-
find . -name '.DS_Store' -delete \
84+
find . -name '.Pipfile.lock' -delete && \
9785
find . -wholename '**/*.pyc' -delete && \
98-
find . -wholename '*.html' -delete && \
9986
find . -type d -wholename '__pycache__' -exec rm -rf {} + && \
100-
find . -type d -wholename '.venv' -exec rm -rf {} + && \
87+
find . -type d -wholename './.venv' -exec rm -rf {} + && \
10188
find . -type d -wholename '.pytest_cache' -exec rm -rf {} + && \
10289
find . -type d -wholename '**/.pytest_cache' -exec rm -rf {} + && \
103-
find . -type d -wholename './logs/*' -exec rm -rf {} + && \
104-
find . -type d -wholename './.reports/*' -exec rm -rf {} + && \
105-
find . -type d -wholename '**/.webassets-cache' -exec rm -rf {} +
90+
find . -type d -wholename './logs/*.log' -exec rm -rf {} + && \
91+
find . -type d -wholename './.reports/*' -exec rm -rf {} +

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Flask Blueprint Tutorial
22

3-
![Python](https://img.shields.io/badge/Python-v^3.9-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
3+
![Python](https://img.shields.io/badge/Python-v^3.10-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
44
![Flask](https://img.shields.io/badge/Flask-v2.2.2-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)
88
[![GitHub Stars](https://img.shields.io/github/stars/hackersandslackers/flask-blueprint-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b)](https://github.com/hackersandslackers/flask-blueprint-tutorial/stargazers)
99
[![GitHub Forks](https://img.shields.io/github/forks/hackersandslackers/flask-blueprint-tutorial.svg?style=flat-square&colorA=4c566a&logo=GitHub&colorB=ebcb8b)](https://github.com/hackersandslackers/flask-blueprint-tutorial/network)
1010

11-
![Flask Blueprint Tutorial](./.github/[email protected]?raw=true)
11+
![Flask Blueprint Tutorial](./.github/img/[email protected]?raw=true)
1212

1313
Structure your Flask apps in a scalable and intelligent way using Blueprints.
1414

15-
* **Tutorial**: https://hackersandslackers.com/flask-blueprints/
16-
* **Demo**: https://flaskblueprints.hackersandslackers.app/
15+
* **Tutorial**: [https://hackersandslackers.com/flask-blueprints/](https://hackersandslackers.com/flask-blueprints/)
16+
* **Demo**: [https://flaskblueprints.hackersandslackers.app/](https://flaskblueprints.hackersandslackers.app/)
1717

1818
## Getting Started
1919

@@ -35,12 +35,12 @@ Replace the values in **.env.example** with your values and rename this file to
3535

3636
### Installation
3737

38-
Get up and running with `make deploy`:
38+
Get up and running with `make run`:
3939

4040
```shell
4141
git clone https://github.com/hackersandslackers/flask-blueprint-tutorial.git
4242
cd flask-blueprint-tutorial
43-
make deploy
43+
make run
4444
```
4545

4646
-----

wsgi.py renamed to main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
app = init_app()
55

6-
if __name__ == "__wsgi__":
7-
app.run(host="127.0.0.1")
6+
if __name__ == "__main__":
7+
app.run(host="127.0.0.1", port=6416, debug=True)

mypy.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[mypy]
2-
python_version = 3.9
2+
python_version = 3.10
33
warn_return_any = True
44
warn_unused_configs = True

0 commit comments

Comments
 (0)