-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
250 lines (208 loc) · 6.47 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
[build-system]
build-backend = "poetry.core.masonry.api"
requires = [
"poetry-core>=1",
]
[tool.black]
line-length = 99
target-version = ["py37", "py38"]
skip-string-normalization = true
[tool.isort]
profile = "black"
src_paths = ["src/roughgan", "tests"]
line_length = 99
known_first_party = "roughgan"
[tool.pytest.ini_options]
addopts = "-vv --color=yes"
log_cli = false
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_cli_format = "%(asctime)s %(levelname)s %(message)s"
log_cli_level = "INFO"
python_files = "test_*.py"
python_functions = "test_*"
testpaths = "tests"
[tool.coverage.paths]
source = ["src"]
[tool.coverage.run]
branch = true
source = ["roughgan"]
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_lines = ["if self.debug:", "pragma: no cover", "raise NotImplementedError", "if __name__ == .__main__.:"]
ignore_errors = true
omit = ["tests/*"]
[tool.mypy]
files = ["src/roughgan"]
warn_unused_configs = true
warn_return_any = true
ignore_missing_imports = true
pretty = true
color_output = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict = true
[tool.poetry]
name = "RoughGAN"
version = "4.7.9"
description = "A nanorough surfaces oriented ML library"
readme = "README.md"
authors = ["Vasilis Sioros <[email protected]>"]
license = "MIT"
homepage = "https://billsioros.github.io/RoughGAN"
repository = "https://github.com/billsioros/RoughGAN"
keywords = []
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
]
[tool.poetry.scripts]
benchmark = 'roughgan.cli.benchmark:benchmark'
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/billsioros/RoughGAN/issues"
"Changelog" = "https://github.com/billsioros/RoughGAN/releases"
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
numpy = ">=1.25.0"
plotly = ">=5.15.0"
matplotlib = ">=3.7.2"
sympy = ">=1.12"
scikit-learn = ">=1.3.0"
pandas = ">=2.0.3"
ipython = ">=8.14.0"
tqdm = ">=4.65.0"
ray = ">=2.5.1"
click = ">=8.1.3"
rich = ">=13.4.2"
pyinsect = {git = "https://github.com/ggianna/PyINSECT"}
torch = "2.2.0"
torchvision = "0.15.2"
kaleido = "0.4.1"
[tool.poetry.group.dev.dependencies]
python-semantic-release = "*"
isort = "*"
mypy = "*"
black = "*"
pre-commit = "*"
poethepoet = "*"
coverage = {extras = ["toml"], version = "*" }
pytest = "*"
pytest-cov = "*"
pytest-sugar = "*"
pytest-clarity = "*"
mkdocs = "*"
mkdocs-material = "*"
mkdocs-minify-plugin = "*"
mkdocs-redirects = "*"
mkdocstrings = { extras = ["python"], version = "*" }
mkdocs-jupyter = "*"
mkdocs-click = "*"
mdx-truly-sane-lists = "*"
mike = "*"
ruff = "*"
[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
changelog_components = "semantic_release.changelog.changelog_headers,semantic_release.changelog.compare_url"
build_command = "python -m pip install poetry && poetry build"
upload_to_pypi = false
[tool.vulture]
min_confidence = 95
paths = ["src/roughgan", "tests"]
[tool.poe.tasks]
[tool.poe.tasks.clean]
help = "Clean up any auxiliary files"
cmd = "rm -rf ./**/__pycache__ dist site .mypy_cache"
[tool.poe.tasks.format]
help = "Format your codebase"
shell = "poetry run isort .; poetry run black ."
[tool.poe.tasks.hooks]
help = "Run all pre-commit hooks"
cmd = "poetry run pre-commit run --all-files --color always"
[tool.poe.tasks.type]
help = "Run static type checking on your codebase"
cmd = "poetry run mypy"
[tool.poe.tasks.lint]
help = "Lint your code for errors"
cmd = "poetry run ruff ."
[tool.poe.tasks.security]
help = "Run security checks on your application"
cmd = "poetry run bandit -r ."
[tool.poe.tasks.docs]
help = "Build and serve the documentation"
[[tool.poe.tasks.docs.sequence]]
ref = "_open --url http://127.0.0.1:8000/Alpaca-with-a-Mixture-of-Teachers/"
[[tool.poe.tasks.docs.sequence]]
cmd = "poetry run mkdocs serve --livereload --watch-theme"
[tool.poe.tasks.export]
help = "Export dependencies to requirements.txt format"
cmd = "poetry export --without-hashes --dev -o requirements.txt"
[tool.poe.tasks.docker-build-api]
help = "Build the API docker image"
shell = "docker build . -t roughgan:$( git tag -l | tail -1 | cut -c2- ) -t build:api -f ./docker/Dockerfile"
[tool.poe.tasks.docker-build-train]
help = "Build the model training docker image"
shell = "docker build . -t roughgan:$( git tag -l | tail -1 | cut -c2- ) -t build:train -f ./docker/Dockerfile.train"
[tool.poe.tasks.docker-run-train]
help = "Train the model using Docker"
shell = "docker run -v $(pwd)/data:/home/app/app/data -v $(pwd)/model:/home/app/app/model --gpus $(nvidia-smi --list-gpus | wc -l) roughgan:$( git tag -l | tail -1 | cut -c2- )"
[tool.poe.tasks.docker-run-api]
help = "Run the docker image as a container"
shell = "docker run -p 8080:8080 mlogo:$( git tag -l | tail -1 | cut -c2- )"
[tool.poe.tasks._open]
help = "Open a URL"
cmd = "python -c 'import webbrowser; webbrowser.open(\"${url}\")'"
[[tool.poe.tasks._open.args]]
name = "url"
options = ["-u", "--url"]
help = "The url to open"
[tool.ruff]
select = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
ignore = []
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}
line-length = 99
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.docformatter]
black = true
non-strict = true
non-cap = [
"roughgan",
]
recursive = true
in-place = true
[tool.bandit]
recursive = true
exclude_dirs = ["tests"]