-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
executable file
·145 lines (133 loc) · 3.61 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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
line_length = 120
not_skip = "__init__.py"
multi_line_output = 3
force_single_line = false
balanced_wrapping = true
default_section = "THIRDPARTY"
known_first_party = "crewcal"
include_trailing_comma = true
skip = [".gitignore", ".dockerignore"]
[tool.mypy]
disallow_incomplete_defs = true
[tool.poetry]
name = "crewcal"
version = "0.9.0"
description = "Convert an airline crew schedule pdf into iCalendar format."
authors = ["Erik Oosterop <ni7h4txi@duck.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/EJOOSTEROP/crewcal"
repository = "https://github.com/EJOOSTEROP/crewcal"
documentation = "https://github.com/EJOOSTEROP/crewcal"
keywords = ["x", "y", "z"]
# packages = [ { include = "crewcal", from = "src" } ]
[tool.poetry.dependencies]
python = "^3.11"
pydantic = "^2.5.1"
ics = "^0.7.2"
pendulum = "^2.1.2"
langchain = "^0.0.337"
python-dotenv = "^1.0.0"
openai = "^1.3.3"
pypdf = "^3.17.1"
click = "^8.1.7"
halo = "^0.0.31"
[tool.poetry.group.dev.dependencies]
pytest-cov = "^4.1.0"
pytest = "^7.4.0"
requests-mock = "^1.11.0"
toml-sort = "^0.23.1"
[tool.poetry.scripts]
wip = "crewcal.wip:main"
crewcal = "crewcal.cli:cli"
[tool.pytest.ini_options]
pythonpath = [
"src"
]
markers = [
"expensive: uses API key and likely paid or at least limited resources (deselect with '-m \"not expensive\"')",
"serial"
]
[tool.ruff]
include = ["*.py", "*.pyi", "**/pyproject.toml"]
line-length = 120
select = [
# https://beta.ruff.rs/docs/rules/
"A", # prevent using keywords that clobber python builtins
"ANN", # type annotation
"ARG", # unused arguments
"B", # bugbear: security warnings
# "BLE", # blind exceptions
"C",
# "COM", # commas
"C4", # comprehension
"C90", # McCabe complexity
"D", # pydocstyle
# "DAR", # darglint, but does not seem to be implemented at the moment
"DTZ", # date timezone
"E", # pycodestyle
"EM", # error messages
"ERA", # eradicate
"EXE", # executables
"F", # pyflakes
"FLY", # f-strings
# "G", # logging format (no f-string)
"I", # isort
"ICN", # import conventions
"INT", # gettext
"ISC", # implicit string concatenation
"N", # pep8 naming
"PERF", # performance lint
"PIE", #
"PT", # pytest style
"PTH", # use pathlib
"Q", # quotes
"RET", # return values
"RSE", # error parenthesis
"RUF", # ruff rules
"S", # Bandit
"SIM", # simplify
"TCH", # type checking
# "TD", # TODO
"TID", # tidy imports
"TRY", # tryceratops
"T20", # print statement
"UP", # alert you when better syntax is available in your python version
"W", # pycodestyle warnings
"RUF" # the ruff developer's own rules
]
ignore = [
"E203", # comments allowed
"E501",
"ANN101" # type annotation for self
]
fix = true
[tool.ruff.flake8-annotations]
ignore-fully-untyped = true
[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
# at least these three should be fine in tests:
"S101", # asserts allowed in tests...
"ANN", # TODO: do not care about type annotations in tests for now
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"D", # no pydocstyle
"N" # Argument, function to lowercase
]
"noxfile.py" = [
"ANN",
"D"
]
[tool.ruff.pydocstyle]
convention = "google"
[tool.tomlsort]
all = true
in_place = true
trailing_comma_inline_array = true