-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
141 lines (125 loc) · 4.33 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
[tool.poetry]
name = "discovery-mission-radar-prototyping"
version = "0.1.0"
description = ""
authors = ["beingkk <[email protected]>"]
readme = "README.md"
packages = [
{ include = "src" },
]
[tool.poetry.dependencies]
python = ">=3.10, <3.12"
jupyter = "^1.1.1"
ipython = "^8.29.0"
discovery-utils = {git = "https://github.com/nestauk/discovery_utils.git", rev = "dev"}
langchain = "^0.3.7"
langchain-openai = "^0.2.5"
langchain-core = "^0.3.15"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[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 = ">=4.0.0" # 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.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.