Added proper project settings
parent
f3cc26f86d
commit
4cb97897a7
|
@ -1,2 +1,3 @@
|
|||
__pycache__/
|
||||
.venv/
|
||||
backup_tool
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
[tool.black]
|
||||
line-length = 79
|
|
@ -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
|
Loading…
Reference in New Issue