-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
103 lines (90 loc) · 3.23 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
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]
[tool.poetry]
authors = ["tvi <tvi@sbtinstruments.com>", "fpa <fpa@sbtinstruments.com>"]
description = ""
name = "pilus"
version = "0.1.0"
[tool.poetry.dependencies]
immutables = "^0.20"
python = ">=3.10,<4.0"
pydantic = "^2.9.2"
tinydb = "^4.4.0"
typeguard = "^2.12.1"
networkx = "^3.4.2"
python-magic = "^0.4.27"
# Optional dependencies for the extras (see below)
typer = { version = "^0.12.3", optional = true }
polars = { extras = ["pyarrow", "numpy"], version = "^1.3.0", optional = true }
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pyfakefs = "^5.6.0"
mypy = "^1.10.1"
pre-commit = "^2.8.2"
ruff = "^0.5.2"
[tool.poetry.extras]
cli = ["typer"]
polars = ["polars"]
[tool.poetry.scripts.pilus]
callable = "pilus.cli:run"
extras = ["cli"]
[tool.black]
# Enables, e.g., "split long strings into multiple lines"
preview = true
target-version = ['py39']
[tool.isort]
profile = 'black'
[tool.pylint.master]
# i,j,k: You can use this for an integer index in a loop.
# v: You can use this for pydantic `@validator` functions.
# fs: We use this in the tests to get a pyfakefs file system reference.
# Since pytest's dependency injection is name based, we have to use
# this exact argument name.
# tg: You can use this for an `anyio.TaskGroup`.
# io: You can use this for `typing.BinaryIO` (and friends).
# T,U,V: For `TypeVar`s
good-names = 'i,j,k,v,fs,tg,io,T,U,V' # Default is 'i,j,k,ex,Run,_'
# Increase the default values a bit. Yes, this may hurt maintainability
# ever so slightly but it increases the speed of development.
max-args = '7' # Default is 5
max-attributes = '12' # Default is 7
# Match black's default max line length
max-line-length = '88' # Default is 100
[tool.pylint.similarities]
# Imports are often duplicated. If two different files use a lot of
# the same imports, there is just no way around it. Therefore, we
# simply ignore import statements completely when we look for duplicate
# code.
ignore-imports = 'y'
[tool.pylint.'messages control']
# Note that there is an ongoing discussion about, the current
# pylint defaults:
# https://github.com/PyCQA/pylint/issues/3512
#
# It's also interesting to note that the pylint authors disable
# some checks for the official pylint repo:
# https://github.com/PyCQA/pylint/blob/master/pylintrc#L56
### IF YOU ENABLE A PYLINT CHECK THEN EXPLAIN WHY BELOW
enable = '''
'''
### IF YOU DISABLE A PYLINT CHECK THEN EXPLAIN WHY BELOW
#
# fixme: We use "TODO: " to note areas that we can improve.
# It's nice to have this directly in the code in a way that
# we can easily search for.
# Related to: https://github.com/PyCQA/pylint/issues/2874
#
# missing-module-docstring,
# missing-class-docstring,
# missing-function-docstring: pydocstyle handles all this
# See: https://pylint.readthedocs.io/en/latest/faq.html#i-am-using-another-popular-linter-alongside-pylint-which-messages-should-i-disable-to-avoid-duplicates
disable = '''
fixme,
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
'''
# Whitelist some extensions that pylint has troubles with.
# pydantic: See https://github.com/samuelcolvin/pydantic/issues/1961
extension-pkg-whitelist = 'pydantic'