File size: 3,868 Bytes
18c0acd
 
 
 
 
 
 
 
 
 
 
 
 
ebbf021
18c0acd
 
 
 
 
 
 
 
 
ebbf021
18c0acd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[tool.poetry]
name = "LinguAIcoach"
version = "0.1.0"
description = "Help to improve your English with AI"
authors = ["alvaroalon2"]
readme = "README.md"
license = "LICENSE.md"

homepage = "https://github.com/alvaroalon2"
repository = "https://github.com/alvaroalon2/LinguAIcoach"
classifiers = [
    'Development Status :: 2 - Pre-Alpha',
    "Operating System :: Unix",
    "Programming Language :: Python :: 3.11",
]

packages = [{ include = "src" }]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "^3.11"
langchain = "^0.1.12"
langchain-openai = "^0.0.6"
openai = "^1.12.0"
streamlit = "^1.31.1"
streamlit-mic-recorder = "*"
streamlit-extras = "*"


[tool.poetry.group.dev.dependencies]
boto3 = "*"
poethepoet = "*"
langsmith = "*"
black = "*"
pylint = "*"
bandit = "*"
ruff = ">=0.0.270"
isort = ">=5.10.1"
mypy = ">=1.3.0"
mkdocstrings = {version = ">=0.24.0", extras = ["python"]}
mkdocs = ">=1.5.3"
mkdocs-markdownextradata-plugin = ">=0.2.5"
mkdocs-material = ">=9.5.2"
mkdocs-minify-plugin = ">=0.7.2"
pymdown-extensions = ">=10.5"
pre-commit = ">=3.3.1"

[tool.poe]
envfile = ".env"


[tool.poe.tasks]
start = "python3 -m streamlit run src/main.py"
check = ["pylint", "bandit"]
setup = ["install", "install-precommit"]

[tool.poe.tasks.lint]
help = "Lint this package"

  [[tool.poe.tasks.lint.sequence]]
  cmd = """
    pre-commit run
      --all-files
      --color always
    """

[tool.poe.tasks.install-precommit]
help = "Installing precommit hooks"
cmd = "poetry run pre-commit install"

[tool.poe.tasks.precommit]
help = "Run precommit checks on all project files"
cmd = "poetry run pre-commit run --all-files"



[tool.poe.tasks.pylint]
help = "Pass linter rules"
cmd = "ruff check --exit-zero src/"

[tool.poe.tasks.ci-pylint]
help = "Pass linter rules"
cmd = "ruff check --output-format pylint --output-file reports/pylint.txt --exit-zero src/"

[tool.poe.tasks.bandit]
help = "Find security issues!"
cmd = "bandit -r src"

[tool.poe.tasks.ci-bandit]
help = "Generate security report"
cmd = "bandit -r src -f json -o reports/bandit.json"



[tool.poe.tasks.install]
help = "Installing project (including dev dependencies)"
cmd = "poetry install --sync"

[tool.poe.tasks.install-nodev]
help = "Installing project (no dev dependencies)"
cmd = "poetry install --without dev"

[tool.poe.tasks.build]
help = "Build project's wheel"
cmd = "poetry build -f wheel"

[tool.poe.tasks.build_src]
help = "Build project's sdist"
cmd = "poetry build -f sdist"


[tool.poe.tasks.docs-build]
help = "Build MKdocs documentation"
cmd = "mkdocs build --clean"

[tool.poe.tasks.docs-serve]
help = "Start the development doc server"
cmd = "mkdocs serve"

[tool.poe.tasks.publish-ghdocs]
help = "Build and deploy the documentation to the gh-pages branch"
cmd = "mkdocs gh-deploy --clean --force"


[tool.isort]
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 120

[tool.black]
line-length = 120
include = '\.pyi?$'

[tool.mypy]
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
warn_return_any = false

[tool.ruff]
fix = true
lint.ignore-init-module-imports = true
line-length = 120
lint.select = ["A", "B", "C4", "C90", "DTZ", "E", "F", "I", "ISC", "N", "NPY", "PGH", "PIE", "PLC", "PLE", "PLR", "PLW", "PT", "RET", "RUF", "RSE", "SIM", "TID", "UP", "W", "YTT"]
lint.ignore = ["E501", "PGH001", "PGH002", "PGH003", "RET504", "S101"]
lint.unfixable = ["F401", "F841"]
src = ["src"]

[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.pylint]
max-args = 9