Skip to content
Snippets Groups Projects
Commit 58da2750 authored by David Trattnig's avatar David Trattnig
Browse files

chore: poetry for build and env managment #116

parent 20cdf02e
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,7 @@
help::
@echo "$(APP_NAME) targets:"
@echo " init.app.sys - init application environment (sudo)"
@echo " init.dev.sys - init development environment (sudo)"
@echo " init.app - init application environment"
@echo " init.dev - init development environment"
@echo " lint - verify code style"
@echo " spell - check spelling of text"
......@@ -63,46 +62,29 @@ DOCKER_RUN = @docker run \
# Targets
init.app.sys::
apt install -y \
python3-wheel \
python3-flask \
python3-flask-sqlalchemy \
python3-http-parser \
python3-psycopg2 \
python3-requests \
python3-sqlalchemy
init.dev.sys::
apt install -y \
codespell \
black \
pre-commit \
python3-flake8 \
python3-flake8-docstrings \
python3-validators \
python3-isort
init.dev:: requirements.txt
pip install --user -Ur requirements.txt
pre-commit autoupdate
pre-commit install
init.app:: pyproject.toml
poetry install --without dev
init.dev:: pyproject.toml
poetry install
poetry run pre-commit autoupdate
poetry run pre-commit install
lint::
python3 -m flake8 .
poetry run python3 -m flake8 .
spell::
codespell $(wildcard *.md) docs src tests config contrib
poetry run codespell $(wildcard *.md) docs src tests config contrib
format::
python3 -m isort .
black .
poetry run python3 -m isort .
poetry run black .
test::
python3 -m unittest discover .
poetry run python3 -m unittest discover .
log::
tail -f logs/AuraEngine.log
run::
PYTHONPATH=src python3 -m aura_engine.app
poetry run python3 -m aura_engine.app
This diff is collapsed.
[project]
name = "aura_engine"
description = "AURA Engine scheduling and control"
name = "aura-engine"
description = "AURA Engine scheduling and playout control."
authors = [
"David Trattnig <david@subsquare.at>",
"Gottfried Gaisbauer <gogo@servus.at>",
]
readme = "README.md"
requires-python = ">=3.9"
keywords = ["radio", "scheduling", "audio"]
......@@ -9,10 +13,47 @@ license = { text = "AGPL 3" }
[tool.black]
line-length = 99
target-version = ["py38"]
# TODO: Use extend-exclude as soon as Debian Bookworm is released.
exclude = '''
^/python/
'''
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
pythonpath = ["src"]
[tool.poetry]
name = "aura-engine"
version = "1.0.0-alpha0"
description = ""
authors = ["David Trattnig <david@subsquare.at>"]
license = "AGPL 3"
readme = "README.md"
packages = [{ include = "aura_engine", from = "src" }]
[tool.poetry.scripts]
app = "aura_engine.app:"
[tool.poetry.dependencies]
python = "^3.9"
requests = "^2.24.0"
SQLAlchemy = "^1.3.17"
Werkzeug = "2.0.3"
Flask = "2.0.3"
Flask-SQLAlchemy = "2.4.3"
itsdangerous = "2.0.1"
http-parser = "^0.9.0"
psycopg2-binary = "^2.9.3"
[tool.poetry.group.dev.dependencies]
codespell = "^2.2.1"
black = "^22.8.0"
flake8 = "^5.0.4"
flake8-docstrings = "^1.6.0"
validators = "^0.20.0"
isort = "^5.10.1"
pre-commit = "^2.20.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requests==2.24.0
sqlalchemy==1.3.17
werkzeug==2.0.3
Flask==2.0.3
Flask_SQLAlchemy==2.4.3
itsdangerous==2.0.1
validators==0.12.1
http-parser==0.9.0
wheel>=0.37.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment