-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
159 lines (138 loc) · 4.06 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
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[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.8"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
]
keywords = ["neovim", "vim", "jupyter", "selenium", "jupyter-notebook", "nvim", "neovim-plugin", "nvim-plugin"]
[tool.setuptools.dynamic]
dependencies = {file = ["deps/requirements.in"]}
[tool.setuptools.packages.find]
where = ["src"]
[project.urls]
"Homepage" = "https://github.com/kiyoon/jupynium.nvim"
[project.scripts]
jupynium = "jupynium.cmds.jupynium:main"
ipynb2jupytext = "jupynium.cmds.ipynb2jupytext:main"
[tool.setuptools_scm]
write_to = "src/jupynium/_version.py"
[tool.pytest.ini_options]
addopts = "--cov=jupynium"
testpaths = [
"tests",
]
[tool.coverage.report]
omit = [
"src/jupynium/_version.py", # CHANGE
# OPTIONALLY ADD MORE LATER
]
[tool.tox]
legacy_tox_ini = """
[tox]
minversion = 3.24.0
envlist = python3.8, python3.9, python3.10, python3.11, python3.12
isolated_build = true
[gh-actions]
python =
3.8: python3.8
3.9: python3.9
3.10: python3.10
3.11: python3.11
3.12: python3.12
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/deps/x86_64-unknown-linux-gnu/requirements_dev.txt
commands =
pytest --basetemp={envtmpdir}
"""
[tool.ruff]
target-version = "py38"
src = ["src"] # for ruff isort
extend-exclude = [
"src/jupynium/_version.py", # CHANGE
]
[tool.ruff.lint]
# OPTIONALLY ADD MORE LATER
select = [
# flake8
"E",
"F",
"W",
"B", # Bugbear
"D", # Docstring
"D213", # Multi-line docstring summary should start at the second line (replace D212)
"N", # Naming
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # simplify
"RUF", # ruff-specific
"RET501", # return
"RET502", # return
"RET503", # return
"PTH", # path
"NPY", # numpy
"PYI", # type stubs for pyright/pylance
"PT", # pytest
"PIE", #
"LOG", # logging
"COM818", # comma misplaced
"COM819", # comma
"DTZ", # datetime
"YTT",
"ASYNC",
# Not important
"T10", # debug statements
"T20", # print statements
]
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
"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.
"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
]
[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]
required-imports = [
"from __future__ import annotations",
]
[tool.pyright]
include = ["src"]
typeCheckingMode = "standard"
useLibraryCodeForTypes = true
autoImportCompletions = true
pythonVersion = "3.8"
# pythonPlatform = "Linux"