Commit 7f7dde68 authored by Saci Pererê's avatar Saci Pererê :speech_balloon:
Browse files

deps: Adiciona poetry como gestor de dependências

- Modifica Makefile para usar Poetry
- Remove arquivos de requirements
- Adiciona precommit para normalizar estilo (lint)
parent 3a3c76a7
Showing with 2302 additions and 27 deletions
+2302 -27
*.log
**.pyc
venv-bbx/
.ropeproject
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
......@@ -22,6 +22,9 @@ SRC_DIR = baobaxia
# Target padrão
default: help
poetry-sinc: pyproject.toml poetry.lock
poetry install
$(VENV)/.created:
@echo "configurando ambiente virtual"
python3 -m venv $(VENV)
......@@ -46,14 +49,12 @@ test:
@echo "TODO: executar os testes"
# TODO Target: Executa a instalação
install: $(VENV)/.created
$(VENV_ACTIVATE) && \
$(PYTHON) -c "from baobaxia.install import install_interactive;install_interactive()"
install:
poetry run python -c "from baobaxia.install import install_interactive;install_interactive()"
# Target: Executa a aplicação
run: $(VENV)/.created
$(VENV_ACTIVATE) && \
uvicorn $(SRC_DIR).main:app --host 0.0.0.0 --port 8000 --reload
run:
poetry run uvicorn $(SRC_DIR).main:app --host 0.0.0.0 --port 8000 --reload
# Target: Limpa o ambiente
clean:
......
This diff is collapsed.
[tool.poetry]
name = "baobaxia"
version = "0.1.24"
description = "Baobáxia is an eventually connected data network"
authors = ["NPDD Rede Mocambos <npdd@mocambos.net>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.109.2"
uvicorn = {extras = ["standard"], version = "^0.27.1"}
pydantic = {extras = ["dotenv", "email"], version = "^2.6.1"}
python-multipart = "^0.0.9"
aiofiles = "^23.2.1"
python-slugify = "^8.0.4"
shortuuid = "^1.0.11"
requests = "^2.31.0"
pygments = "^2.17.2"
anyio = "^4.3.0"
filetype = "^1.2.0"
unidecode = "^1.3.8"
datalad = "^0.19.6"
opencv-contrib-python-headless = "^4.9.0.80"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.1"
python-lsp-server = {extras = ["all"], version = "^1.10.0"}
python-lsp-black = "^2.0.0"
pre-commit = "^3.6.2"
[tool.black]
line-length = 88
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
-r requirements/prod.txt
fastapi
pydantic[email,dotenv]
uvicorn[standard]
python-multipart
pytest
aiofiles
python-slugify
shortuuid
requests
pygments
anyio
filetype
opencv-contrib-python-headless
unidecode
datalad
-r common.txt
nose
-r common.txt
[aliases]
test=pytest
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment