-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpyproject.toml
112 lines (100 loc) · 3.01 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
[tool.poetry]
name = "novelai-api"
version = "0.32.1"
description = "Python API for the NovelAI REST API"
license = "MIT"
authors = ["Aedial <[email protected]>"]
readme = "README.md"
repository = "https://github.com/Aedial/novelai-api"
keywords = ["python", "NovelAI", "NAI", "API"]
classifiers = [
"Programming Language :: Python :: 3.8",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
]
packages = [{include = "novelai_api"}]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/Aedial/novelai-api/issues"
[tool.poetry.dependencies]
python = "^3.8.10"
aiohttp = {extras = ["speedups"], version = "^3.9.3"}
argon2-cffi = "^23.1.0"
PyNaCl = "^1.5.0"
jsonschema = "^4.21.1"
tokenizers = "^0.15.1"
ftfy = "^6.1.3"
regex = "^2023.12.25"
sentencepiece = "^0.2.0"
poetry = "^1.8.5"
msgpackr-python = "^0.1.2"
pillow = "^10.4.0"
[tool.poetry.group.dev.dependencies]
python-dotenv = "^0.21.1"
pre-commit = "^2.21.0"
pylint = "^2.15.5"
pytest = "^7.3.1"
pytest-asyncio = "^0.20.1"
pytest-randomly = "^3.12.0"
[tool.poetry.group.docs.dependencies]
sphinx = "^6.2.1"
# patched repo to work with relative links
myst_parser = {git = "https://github.com/Aedial/MyST-Parser", rev = "adcdb9a"}
linkify-it-py = "^2.0.0"
sphinx-copybutton = "^0.5.2"
sphinx-last-updated-by-git = "^0.3.4"
sphinx-hoverxref = "^1.3.0"
[tool.bandit]
exclude_dirs = ["tests/api/test_decrypt_encrypt_integrity_check.py"]
skips = ["B101", "B311"]
[tool.black]
line-length = 120
[tool.isort]
line_length = 120
profile = "black"
[tool.pylint]
max-line-length = 120
ignore-paths = [
# Code imported as is
"novelai_api/tokenizers",
# Code unused atm
"novelai_api/StoryHandler.py",
"tests/api/disabled_test_manipulate_stories"
]
disable = [
# access to private members
"W0212",
# FIXMEs and TODOs
"W0511",
# names
"C0103",
# missing docstring
"C0114", "C0115", "C0116",
# duplicate code between files (dumb how far it overreaches)
"R0801",
# too many/few methods/arguments/X (splitting just makes the code messier)
"R0902", "R0903", "R0904", "R0913", "R0914",
# too many branches (mostly sanitization and formatting)
"R0912"
]
[tool.pylint.MASTER]
# add novelai_api to the path, as pylint fails to detect the package (waiting for https://github.com/PyCQA/pylint/projects/1)
init-hook="""
from sys import path
from pylint.config import find_default_config_files
path.extend(p.parent for p in find_default_config_files())
"""
[tool.pytest.ini_options]
xfail_strict = true
empty_parameter_set_mark = "fail_at_collect"
asyncio_mode = "auto"
addopts = "--tb=short -vv"
[tool.poetry.scripts]
nai-pre-commit = "novelai_api.poetry_scripts:pre_commit"
nai-test-mock = "novelai_api.poetry_scripts:test_mock"
nai-test-api = "novelai_api.poetry_scripts:test_api"
nai-build-docs = "novelai_api.poetry_scripts:build_docs"
nai-bump-version = "novelai_api.poetry_scripts:bump_version"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"