-
Notifications
You must be signed in to change notification settings - Fork 28
/
pyproject.toml
146 lines (133 loc) · 3.55 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
# pyproject.toml
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
module-name = "rateslib.rs"
python-source = "python"
bindings = "pyo3"
compatibility = "linux"
features = ["pyo3/extension-module"]
# rustc --print target-list
# https://doc.rust-lang.org/rustc/platform-support.html
[project]
name = "rateslib"
version = "1.6.0"
description = "A fixed income library for trading interest rates"
readme = "README.md"
authors = [{ name = "J H M Darbyshire"}]
license = { file = "LICENSE" }
keywords = ["interest rate", "derivatives", "swaps", "bonds", "fixed income"]
dependencies = [
"numpy>=1.21.5,<3.0",
"matplotlib>=3.5.1,<4.0",
"pandas>=1.4.1,<3.0",
]
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.optional-dependencies]
dev = [
# testing
"pytest>=8.3.2,<9.0",
"coverage>=7.6.1,<8.0",
# style/linting
"ruff>=0.6.3,<1.0",
# doc building
"sphinx>=8.0,<9.0",
"sphinx-automodapi>=0.16.0,<1.0",
"sphinxcontrib-googleanalytics>=0.4,<1.0",
"sphinx-tabs>=3.4,<4.0",
"pydata-sphinx-theme>=0.15.4,<1.0",
"nbsphinx>=0.9.5,<1.0",
"jupyterlab>=4.0,<5.0",
"pickleshare>=0.7.5,<1.0",
]
[tool.pytest.ini_options]
# pythonpath = [".", "python/rateslib"]
minversion = "7.0"
addopts = "" # use -s to show print capture, use -q for quiet, use -v for verbose
testpaths = [
"python/tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning"
]
[tool.setuptools]
packages = ["rateslib"]
[project.urls]
Homepage = "https://github.com/attack68/rateslib"
[tool.ruff]
exclude = [
".git",
".github",
"docs",
"notebooks",
"target",
"venv9",
"venv11",
"scratch.py",
"__pycache__",
"docs/source/conf.py",
"old",
"build",
"dist",
"bench",
"benchmarks",
]
# Same as Black.
line-length = 100
indent-width = 4
# Assume Python 3.12
target-version = "py39"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = false
[tool.ruff.lint]
select = [
"E", # pycodestyle
"W",
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"S", # flake8-bandit
"PIE", # flake8-pie
# "ANN", # flake8-annotations -- Requires work
# "A", # flake8-builtins -- Requires work
# "COM", # flake8-commas -- conflicts with ruff format
"Q", # flake8-quotes
"PT", # flake8-pytest-style
# "C90", # mccabe complexity -- Requires work
"I", # isort
"N", # pep8 naming
# "RUF", # -- Requires work
]
ignore = [
"PT011", # -- Requires work inputting match statements
"PIE790", # unnecessary pass
"C408", # unnecessary dict call
"N806", "N815", "N803", "N802",
"SIM116", # use a dict instead of successive ifs: off due to performance degradation.
"SIM108", # ternary operators: off due to code coverage degradation.
"B008", # function calls in argument defaults, e.g. NoInput(0)
# "B006", # mutable data structures for argument defaults, e.g. []
"B904", # raising within except clauses
"B028", # no explicit stack level
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "N801"]
"python/tests/*" = ["F401", "B", "N", "S", "ANN"]
[tool.isort]
profile = "black"
line_length = 100
src_paths = ["python"]
[tool.black]
line-length = 100
target-version = ['py39']