-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
174 lines (156 loc) · 3.92 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
167
168
169
170
171
172
173
174
[tool.poetry]
name = "dfipy"
# Package versions are derived from Git tags in CI and overridden during
# building/publishing. See build/publish jobs in .gitlab-ci.yml.
version = "0.0.0"
description = "Python SDK targeting the DFI API"
authors = [
"Robert Edwards <[email protected]>",
"Maurizio Morriello <[email protected]>",
"Sebastiano Ferraris <[email protected]>",
"Tom Pierce <[email protected]>",
"Tom Reeve <[email protected]>",
]
maintainers = ["General System"]
readme = "README.md"
homepage = "https://www.generalsystem.com/"
repository = "https://github.com/thegeneralsystem/dfipy"
documentation = "https://dfipy.docs.generalsystem.com/"
include = ["LICENCE"]
packages = [{ include = "dfi" }]
[tool.poetry.dependencies]
pandas = "^2.0.1"
python = "^3.10"
requests = "^2.30.0"
sseclient-py = "^1.7.2"
tqdm = "^4.65.0"
pyarrow = "14.0.1"
boto3 = "^1.34.19"
natsort = "^8.4.0"
typing-extensions = "^4.10.0"
[tool.poetry.group.dev.dependencies]
coverage = "^7.2.5"
pytest = "^7.2.2"
pytest-dotenv = "^0.5.2"
pytest-order = "^1.1.0"
ipykernel = "^6.25.2"
pytest-dependency = "^0.5.1"
ruff = "^0.2.1"
mypy = "^1.8.0"
types-requests = "^2.31.0.20240310"
jupyterlab = "^4.1.4"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
mkdocs-material = "^9.5.12"
mkdocstrings = {extras = ["python"], version = "^0.24.1"}
mkdocs-gen-files = "^0.5.0"
mkdocs-literate-nav = "^0.6.1"
black = "^24.2.0" # mkdocs uses black for formatting
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
source = ["dfi"]
[tool.mypy]
exclude = ["^docs/"]
disable_error_code = ["name-defined"]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
implicit_reexport = true
# install_types = true
# non_interactive = true
pretty = true
show_column_numbers = true
show_error_context = true
# show_error_end = true
# warn_return_any = true
no_warn_return_any = true
warn_unreachable = true
[tool.pytest.ini_options]
testpaths = ["tests", "integration_tests"]
log_cli = true
log_cli_level = "WARNING"
addopts = [
"--import-mode=importlib",
]
######################
# ruff
######################
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py310"
include = ["pyproject.toml", "dfi/**/*.py", "tests/**/*.py", "integration_tests/**/*.py"]
extend-include = ["*.ipynb"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.format]
# Black compatible settings
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 60
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"RUF", # ruff-specific-rules
"PL", # Pylint rules
]
ignore = [
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"E501", # line-too-long
]
extend-select = [
"UP", # pyupgrade
"D", # pydocstyle
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"integration_tests/**/*.py" = ["D103", "PLR0913"]
"tests/**/*.py" = ["D103", "PLR0913"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pylint]
max-args=8