Spaces:
Sleeping
Sleeping
# This file defines common tasks that most python projects can benefit from | |
[tool.poe.tasks.format-isort] | |
help = "Format code with isort" | |
cmd = "isort ." | |
[tool.poe.tasks.format-black] | |
help = "Format code with black" | |
cmd = "black ." | |
[tool.poe.tasks.format] | |
help = "Run code formating tools" | |
sequence = ["format-isort", "format-black"] | |
[tool.poe.tasks.style-black] | |
help = "Validate black code style" | |
cmd = "black . --check --diff" | |
[tool.poe.tasks.style-isort] | |
help = "Validate isort code style" | |
cmd = "isort . --check --diff" | |
[tool.poe.tasks.style] | |
help = "Validate code style" | |
sequence = ["style-isort", "style-black"] | |
[tool.poe.tasks.types] | |
help = "Run the type checker" | |
cmd = "mypy . --ignore-missing-imports --check-untyped-defs --install-types --non-interactive --explicit-package-bases" | |
[tool.poe.tasks.lint] | |
help = "Evaluate ruff rules" | |
cmd = "ruff check ." | |
[tool.poe.tasks.test] | |
help = "Run unit tests" | |
cmd = "python -m unittest discover -s tests" | |
[tool.poe.tasks.clean] | |
help = "Remove automatically generated files" | |
cmd = """ | |
rm -rf dist | |
.mypy_cache | |
.pytest_cache | |
.ruff_cache | |
./**/__pycache__/ | |
./**/*.pyc | |
""" | |
[tool.poe.tasks.check] | |
help = "Run all checks on the code base" | |
sequence = ["style", "types", "lint", "clean"] | |
[tool.poe.tasks.frontend] | |
help = "Start the UI" | |
cmd = "streamlit run ./frontend/app_ui.py" | |
[tool.poe.tasks.build] | |
help = "Build the Docker image" | |
cmd = "docker build -t prompt-search-engine ." | |
[tool.poe.tasks.start-backend] | |
help = "Start the backend" | |
cmd = "docker run -d -p 8000:8000 prompt-search-engine" | |
[tool.poe.tasks.backend] | |
help = "Start the backend" | |
sequence = ["build", "start-backend"] |