-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (87 loc) · 2.04 KB
/
pyproject.toml
File metadata and controls
101 lines (87 loc) · 2.04 KB
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
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "position-encoding"
description = "A library that encodes sequence positions in torch"
authors = [{name = "Coos Baakman"}]
maintainers = [{name = "Coos Baakman"}]
license = "Apache-2.0"
version = "1.0.0"
requires-python = ">= 3.11"
dependencies = [
"torch>=2.0.1",
]
[project.optional-dependencies]
dev = [
# packaging
"build",
"wheel",
"twine",
# formatting and linting
"ruff",
# testing
"pytest",
# static typing
"mypy",
]
[project.urls]
"Repository" = "https://github.com/X-lab-3D/position-encoding"
"Issues" = "https://github.com/X-lab-3D/position-encoding/issues"
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true # enable data directory to be identified
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
]
ignore = [
"E501", # Line too long
"D100", # Missing module docstring
"D104", # Missing public package docstring
"D105", # Missing docstring in magic method
"D107", # Missing `__init__` docstring
# The following list excludes rules irrelevant to the Google style
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "I"]
ignore-init-module-imports = true
[tool.ruff.lint.per-file-ignores]
# Ignore docstrings in all test files
"tests/**py" = ["D"]
[tool.ruff.lint.isort]
known-first-party = ["position_encoding"]
force-single-line = true
lines-after-imports = 2
no-lines-before = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]