File size: 1,701 Bytes
7af929b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0b497e7
7af929b
 
 
 
 
 
 
da82b2b
7af929b
 
 
 
 
 
 
 
 
 
 
 
 
 
be043a6
 
3556e6f
45462fb
0b497e7
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 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"]