Added proper project settings

master
Jef Roosens 2021-01-15 14:14:13 +01:00
parent f3cc26f86d
commit 4cb97897a7
5 changed files with 48 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
__pycache__/
.venv/
backup_tool

35
Makefile 100644
View File

@ -0,0 +1,35 @@
# =====CONFIG=====
# Devop environment runs in 3.8
PYTHON=python3.8
# =====RECIPES=====
.venv/bin/activate: requirements.txt requirements-dev.txt
'$(PYTHON)' -m venv .venv
.venv/bin/pip install -r requirements.txt -r requirements-dev.txt
venv: .venv/bin/python
.PHONY: venv
format: venv
@ .venv/bin/black app/*.py app/**/*.py
.PHONY: format
clean:
rm -rf .venv
rm backup_tool
.PHONY: clean
backup_tool:
@ cd app && \
zip -r ../app.zip * \
-x "__pycache__/*" "**/__pycache__/*" ".vim/*" "**/.vim/*"
@ echo "#!/usr/bin/env python3" | cat - app.zip > backup_tool
@ chmod a+x backup_tool
@ rm app.zip
app: backup_tool
.PHONY: app
install: app
cp backup_tool /usr/local/bin

2
pyproject.toml 100644
View File

@ -0,0 +1,2 @@
[tool.black]
line-length = 79

View File

@ -0,0 +1,10 @@
# Language server
jedi==0.18.0
# Linting & Formatting
black==20.8b1
flake8==3.8.4
# Testing
tox==3.21.1
pytest==6.2.1

0
requirements.txt 100644
View File