-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
166 lines (148 loc) · 4.93 KB
/
pyproject.toml
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
[tool.poetry]
name = "discovery-utils"
version = "0.1.0"
description = "Nesta Discovery utilities package"
authors = ["Nesta", "Solomon Yu <solomon.yu@nesta.org.uk>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/nestauk/discovery_utils"
repository = "https://github.com/nestauk/discovery_utils"
packages = [
{ include = "discovery_utils" },
{ include = "getters", from = "discovery_utils" },
{ include = "enrichment", from = "discovery_utils" },
{ include = "utils", from = "discovery_utils" },
]
[tool.poetry.dependencies]
python = ">=3.10, <3.13"
boto3 = "*"
urllib3 = "<2"
pandas = "*"
pyarrow = "^15.0.0"
currencyconverter = "^0.17.16"
df2gspread = "^1.0.4"
python-dotenv = "^1.0.1"
nltk = "^3.8.1"
matplotlib = "^3.8.4"
sentence-transformers = "^2.7.0"
lxml = "^5.2"
seaborn = "^0.13.2"
datasets = "^2.19.0"
evaluate = "^0.4.2"
accelerate = "^0.29.3"
skypilot = "^0.5.0"
openai = "^1.35.9"
langfuse = "^2.38.1"
ragas = "^0.1.13"
llama-index = "^0.10.65"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "^7.1.1" # Allows for testing of the project
pytest-cov = "^4.0.0" # Allows to run coverage of the project
moto = "^3.1.6" # Allows for mocking of AWS services
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
flake8 = "^4.0.1" # Style Guide Enforcement
pyproject-flake8 = "^0.0.1-alpha.4" # Allows configuration of flake 8 from pyproject.toml
flake8-bugbear = "^22.3.23" # Finding likely bugs and design problems in your program.
flake8-print = "^4.0.0" # Check for print statements in python files.
flake8-docstrings = "^1.6.0" # Include checks provided by pep257.
flake8-annotations = "^2.8.0" # check for presence of type annotations in function definitions.
isort = "^5.10.1" # Sort imports
yamllint = "^1.26.3" # Linter for YAML files
bandit = {version = "^1.7.4", extras = ["toml"]} # Security linter
pre-commit = "^2.18.1" # Runs a pipeline before commiting code
black = "^22.6.0" # Python style checks
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.24.0"
notebook = "^7.2.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 119
target-version = ['py39']
include = '\.pyi?$'
extend-exclude = '''
/(
\.eggs
| \.git
| \.venv
| \.env
| \.vscode
| build
| dist
| \.mypy_cache
)\
'''
[tool.isort]
profile = 'black'
force_single_line = true
combine_as_imports = true
lines_between_types = 1
lines_after_imports = 2
src_paths = ["discovery_utils", "tests"]
line_length = 119
[tool.flake8]
max-line-length = 119
select = [ # Choose the flake8 errors to select globally here
"C", # McCabe complexity
"E", # pep8 errors
"W", # pep8 warnings
"F", # pyflakes errors
"N", # naming conventions
"B", # bugbear errors (needs plugin installed)
"ANN", # flake8 annotations errors (needs plugin installed)
"T", # flake8 print errors (needs plugin installed)
"D", # flake8 doscstrings errors (needs plugin installed)
"B950", # Line too long. It considers "max-line-length" but only triggers when exceeded by more than 10%.
]
ignore = [ # Choose the flake8 errors to ignore globally here
"E501", # Line too long (using B950 instead, which has 10% tolerance)
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D400", # First line should end with a period
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"ANN003", # Missing type annotation for **kwargs
"ANN002", # Missing type annotation for **args
"ANN1", # Missing type annotation for self in methot or cls method
"W503", # Line break occurred before a binary operator
"E203", # Whitespace before ':'
]
per-file-ignores = [ # Choose the flake8 errors to ignore per file here
"*/__init__.py:F401", # Ignore imported but unused in __init__.py files
"tests/*:ANN,D", # Ignore Docstring and annotations on tests
]
exclude = [
".venv/*",
".vscode/*",
]
# See other flake8 extensions here: https://github.com/DmytroLitvinov/awesome-flake8-extensions
[tool.bandit]
skips = [ # Choose the bandit errors to ignore globally
"B101", # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
"B104", # Possible binding to all interfaces
]
exclude_dirs = [
".venv",
]
[tool.pytest.ini_options]
minversion = "7.1"
addopts = """
--verbose
--color=yes
--assert=plain
--cov-report term
--cov=discovery_utils
--last-failed
"""
testpaths = [
"tests",
]
[tool.coverage.run]
omit = ["*/tests/*"] # Remove test files from coverage run.
[tool.coverage.report]
omit = ["*/tests/*"] # Remove test files from coverage report.