forked from Andrei-Aksionov/nanoGPTplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
97 lines (87 loc) · 2.63 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
[tool.poetry]
authors = ["Andrei.Aksionov"]
description = "Knock-off Andrej Karpathy's nanoGPT"
license = "MIT"
name = "nanogptplus"
packages = [{include = "src"}]
readme = "README.md"
version = "1.0.0"
[tool.poetry.dependencies]
ipykernel = "~6.21.1"
loguru = "~0.6.0"
matplotlib = "~3.6.3"
numpy = "~1.24.1"
omegaconf = "~2.3.0"
pandas = "~1.5.2"
python = "^3.8.0"
requests = "~2.28.1"
tensorboard = "~2.12.0"
tiktoken = "~0.3.1"
torch = "~1.13.0"
tqdm = "~4.64.1"
transformers = "~4.26.1"
[tool.poetry.group.dev.dependencies]
black = {version = "*", extras = ["jupyter"]}
darglint = "~1.8.1"
ipywidgets = "~8.0.4"
pre-commit = "~3.0.4"
ruff = "0.0.255"
# ---------------------------------------------- Tests -----------------------------------------------
[tool.poetry.group.test.dependencies]
pytest = "~7.2.2"
pytest-order = "~1.0.1"
[tool.pytest.ini_options]
log_cli = true
markers = [
"smoke: mark for short tests (deselect with '-m \"not smoke\"')",
"slow: mark for long running and memory consuming tests",
]
python_files = "*_test.py"
testpaths = ["tests"]
# -------------------------------------- Linting and Formatting --------------------------------------
[tool.ruff]
ignore = [
"ANN002", # Missing type annotation for *_
"ANN003", # Missing type annotation for **kwargs
"ANN101", # Missing type annotation for self in method
"B905", # zip() without an explicit strict= parameter
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D105", # Missing docstring in magic method
"EM", # flake8-errmsg
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py
"N812", # Lowercase {name} imported as non-lowercase {asname}
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PT023", # use @pytest.mark.asyncio() over @pytest.mark.asyncio
"TCH", # flake8-type-checking
"TRY003", # Avoid specifying long messages outside the exception class
"UP032", # Use f-string instead of `format`
]
line-length = 120
select = [
"ALL",
]
target-version = "py38"
[tool.ruff.pydocstyle]
convention = "pep257"
[tool.ruff.per-file-ignores]
# D102 - Missing docstring in public method
# S101 - Use of `assert` detected
"*_test.py" = ["D102", "S101"]
# D104 - missing docstring in public method
# F401 - imported but unused
"__init__.py" = [
"F401",
"D104",
]
[tool.isort]
profile = "black"
[tool.black]
line_length = 120
target-version = ["py38"]
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]