-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpyproject.toml
223 lines (191 loc) · 6.31 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
[build-system]
requires = ["hatchling", "hatch-requirements-txt", "version-pioneer"]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.requirements_txt]
files = ["deps/requirements.in"]
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
dev = ["deps/requirements_dev.in"]
[tool.hatch.version]
source = "version-pioneer"
[tool.hatch.build.hooks.version-pioneer]
[tool.version-pioneer]
versionscript = "src/jupynium/_version.py"
versionfile-sdist = "src/jupynium/_version.py"
versionfile-wheel = "jupynium/_version.py"
[tool.hatch.build.targets.sdist]
include = [
"src",
"docs",
"tests",
"tools",
"scripts",
"deps",
"after",
"lua",
"plugin",
]
[tool.hatch.build.targets.wheel]
sources = ["src"]
[project]
name = "jupynium"
dynamic = ["version", "dependencies", "optional-dependencies"]
description = "Neovim plugin that automates Jupyter Notebook editing/browsing using Selenium."
authors = [
{ name = "Kiyoon Kim" },
]
readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
keywords = ["neovim", "vim", "jupyter", "selenium", "jupyter-notebook", "nvim", "neovim-plugin", "nvim-plugin"]
[project.urls]
"Homepage" = "https://github.com/kiyoon/jupynium.nvim"
[project.scripts]
jupynium = "jupynium.cmds.jupynium:main"
ipynb2jupytext = "jupynium.cmds.ipynb2jupytext:main"
[tool.projector.pip-compile]
# https://github.com/deargen/workflows/blob/master/python-projector
requirements-in-dir = "deps"
requirements-out-dir = "deps/lock"
python-platforms = ["x86_64-manylinux_2_28", "aarch64-apple-darwin", "x86_64-apple-darwin"]
[tool.pytest.ini_options]
addopts = "--cov=jupynium"
testpaths = [
"tests",
]
[tool.coverage.report]
omit = [
"src/jupynium/_version.py", # CHANGE
# OPTIONALLY ADD MORE LATER
]
[tool.tox]
requires = ["tox>=4.19"]
env_list = ["python3.9", "python3.10", "python3.11", "python3.12", "python3.13"]
isolated_build = true
[tool.tox.gh-actions]
python = """
3.9: python3.9
3.10: python3.10
3.11: python3.11
3.12: python3.12
3.13: python3.13
"""
[tool.tox.env_run_base]
# setenv = ["PYTHONPATH={toxinidir}"]
deps = ["-r{toxinidir}/deps/lock/x86_64-manylinux_2_28/requirements_dev.txt"]
commands = [["pytest", "--basetemp={envtmpdir}"]]
[tool.pyright]
include = ["src"]
typeCheckingMode = "standard"
useLibraryCodeForTypes = true
autoImportCompletions = true
pythonVersion = "3.9"
# pythonPlatform = "Linux"
reportDuplicateImport = true
[tool.ruff]
# Ignore INP001 on these directories
# The directories that do not contain s, r, and c are already ignored.
namespace-packages = ["scripts"]
[tool.ruff.lint]
# OPTIONALLY ADD MORE LATER
select = [
"ALL",
]
ignore = [
"E402", # Module level import not at top of file
"W293", # Blank line contains whitespace
"W291", # Trailing whitespace
"D10", # Missing docstring in public module / function / etc.
"D200", # One-line docstring should fit on one line with quotes
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D417", # require documentation for every function parameter.
"D401", # require an imperative mood for all docstrings.
"DOC201", # missing Return field in docstring
"PTH123", # Path.open should be used instead of built-in open
"PT006", # Pytest parameterize style
"N812", # Lowercase `functional` imported as non-lowercase `F` (import torch.nn.functional as F)
"NPY002", # legacy numpy random
"UP017", # datetime.timezone.utc -> datetime.UTC
"SIM108", # use ternary operator instead of if-else
"TRY003", # long message in except
"TRY400", # logger.exception instead of logger.error
"PLR2004", # magic value comparison
"PLW2901", # loop variable overwritten by assignment target
"COM812", # missing trailing comma
"RET504", # return with unnecessary assignment
"RET505",
"RET506",
"RET507",
"RET508",
"S", # Security issues
"ANN", # Missing type annotations
"ERA001", # commented-out code
"G", # Logging with format string
"EM", # error message has to be variable
"SLF001", # private member access
"TD", # TODO
"FIX", # TODO
"ARG", # unused argument
"PERF",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # Ignore seemingly unused imports (they're meant for re-export)
]
# Directories that do not contain s, r, and c
"[!s][!r][!c]*/**" = ["INP001"] # Implicit namespace package (no __init__.py)
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pycodestyle]
# Black or ruff will enforce line length to be 88, except for docstrings and comments.
# We set it to 120 so we have more space for docstrings and comments.
max-line-length = 120
[tool.ruff.lint.isort]
# combine-as-imports = true
known-third-party = ["wandb"]
known-first-party = [
"rust_graph",
"bio_data_to_db",
"reduce_binary",
"apbs_binary",
"msms_binary",
"slack_helpers",
"biotest",
]
## Uncomment this if you want to use Python < 3.10
# required-imports = [
# "from __future__ import annotations",
# ]
# [tool.ruff.lint.flake8-tidy-imports]
# Ban certain modules from being imported at module level, instead requiring
# that they're imported lazily (e.g., within a function definition, if TYPE_CHECKING, etc.)
# banned-module-level-imports = ["torch"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pytorch_lightning".msg = "Use lightning.fabric instead"
"lightning.pytorch".msg = "Use lightning.fabric instead"
"lightning_fabric".msg = "Use lightning.fabric instead"
"accelerate".msg = "Use lightning.fabric instead"
"os.system".msg = "Use subprocess.run or subprocess.Popen instead"
"easydict".msg = "Use typing.TypedDict instead (also consider dataclasses and pydantic)"
[tool.ruff.lint.pylint]
max-args = 15
max-bool-expr = 10
max-statements = 100
max-returns = 6
max-public-methods = 30
max-nested-blocks = 10
max-locals = 30
max-branches = 24
[tool.ruff.lint.mccabe]
# C901: limit the number of decision points in a function
max-complexity = 20