-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
127 lines (111 loc) · 2.48 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
[build-system]
requires = ["setuptools>=67.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[project]
name = "food-scraper"
# Use static version for now.
version = "0.1"
requires-python = ">=3.12"
dependencies = [
"requests",
"beautifulsoup4",
"click",
"matplotlib",
"jsonschema",
# Linting
"ruff",
# Type hints
"mypy",
"types-requests",
"types-beautifulsoup4",
"types-jsonschema",
# This stubs package is deprecated as pandas/numpy/etc are adding stubs
# to the main packages. We'll keep using it for now.
# https://github.com/wearepal/data-science-types
"data-science-types",
# Testing
"pytest",
"pytest-socket",
"factory-boy",
"responses",
"time-machine"
]
[project.scripts]
chow = "chow.__main__:cli"
[tool.ruff]
lint.select = [
# pycodestyle
"E",
# pyflakes
"F",
# isort
"I",
]
lint.ignore = [
"E501"
]
[tool.ruff.lint.per-file-ignores]
# Allow unused imports in `__init__.py` files as these are convenience imports
"**/__init__.py" = [ "F401" ]
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"project",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"project" = [
"chow",
"tests",
]
[tool.pytest.ini_options]
# Common options
addopts = "--tb=short -v --disable-socket"
[tool.mypy]
files = "."
# Use strict defaults - equivalent to:
# --check-untyped-defs
# --disallow-any-generics
# --disallow-incomplete-defs
# --disallow-subclassing-any
# --disallow-untyped-calls
# --disallow-untyped-decorators
# --disallow-untyped-defs
# --no-implicit-optional
# --no-implicit-reexport
# --strict-concatenate
# --strict-equality
# --warn-redundant-casts
# --warn-return-any
# --warn-unused-configs
# --warn-unused-ignores
strict = true
# Output
show_error_codes = true
# Warn about code inferred to be unreachable.
warn_unreachable = true
# Warn about functions that end without returning.
warn_no_return = true
[[tool.mypy.overrides]]
# Don't require test functions to include types
module = "tests.*"
allow_untyped_defs = true
disable_error_code = "attr-defined"
[[tool.mypy.overrides]]
# Don't require test functions to include types
module = "tests.factories"
disallow_subclassing_any = false
[[tool.mypy.overrides]]
# Ignore packages with no stubs.
module = [
'factory',
'matplotlib.dates',
'matplotlib.ticker',
]
ignore_missing_imports = true