-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (106 loc) · 3.66 KB
/
pyproject.toml
File metadata and controls
120 lines (106 loc) · 3.66 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[project]
name = "tilebox-python"
dynamic = ["version"]
description = "Tilebox Python packages"
authors = [{ name = "Tilebox, Inc.", email = "support@tilebox.com" }]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"tilebox-datasets",
"tilebox-grpc",
"tilebox-storage",
"tilebox-workflows",
]
[dependency-groups]
dev = [
# so we can run pip commands such as 'pip freeze' in the virtualenv
"pip>=24.2",
# so we can build the packages using the CLI
"build>=1.2.2",
# Cython is required for some pytest coverage plugins
"cython>=3.0.11",
# DeprecationWarning: Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0)
"pyarrow>=17.0.0",
# some dev tooling
"ruff>=0.14.10",
"types-protobuf>=6.30",
"junitparser>=3.2.0",
"ty>=0.0.14",
"prek>=0.2.27",
]
[project.scripts]
generate-protobuf = "tools.generate_protobuf:main"
[tool.hatch.build.targets.sdist]
packages = ["tools"]
[tool.hatch.build.targets.wheel]
packages = ["tools"]
[tool.uv.workspace]
members = [
"tilebox-datasets",
"tilebox-grpc",
"tilebox-storage",
"tilebox-workflows",
]
[tool.uv.sources] # don't install from pypi, use the workspace packages
tilebox-datasets = { workspace = true }
tilebox-grpc = { workspace = true }
tilebox-storage = { workspace = true }
tilebox-workflows = { workspace = true }
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.ruff]
# settings applying to all ruff subcommands, such as `ruff check` (lint) and `ruff format`
line-length = 120
target-version = "py310"
exclude = [
"*/.venv/*",
# it's auto generated, don't lint it
"*/datasets/v1/*",
"*/workflows/v1/*",
"*/tilebox/v1/*",
"*/buf/validate/*",
]
[tool.ruff.lint]
select = ["ALL"]
# all rules: https://beta.ruff.rs/docs/rules
ignore = [
# some ruff checking modules don't make much sense as a whole
"D", # pydocstyle: pretty strict anyways
"FBT", # flake8-boolean-trap: boolean arguments can make sense
"COM", # flake8-commas: formatter takes care of this
"DTZ", # flake8-datetimez: utc datetimes are useful
"DJ", # flake8-django: not needed
"EM", # flake8-errmsg: str directly in Exception constructor is accetable
"TCH", # flake8-type-checking: type checking blocks are weird
# specific rules
"ANN401", # any-type: allow Any in *args and **kwargs
"S101", # assert: allow usage of assert
"B008", # function-call-argument-default: some default argument values make sense to be function calls
"G004", # logging-f-string: allow usage of f-strings in logging calls
"PLR2004", # magic-value-comparison: sometimes comparison with constants (e.g. 0) makes sense
"TRY003", # raise-vanilla-args: exceptions like this make sense in python
"TRY400", # error-instead-of-exception: logger.error is ok with loguru
# disabled because of formatter
"E501", # line-too-long -> formatter takes care of this
"ISC001", # single-line-implicit-str-concatenation -> formatter takes care of this
"Q", # flake8-quotes -> formatter takes care of this
"W191", # tab-indentation -> formatter takes care of this
]
unfixable = [
"F841", # unused-variable -> don't remove them automatically
"ERA", # eradicate -> (commented out code), don't remove it automatically
]
[tool.ruff.lint.isort]
known-first-party = ["tilebox", "_tilebox"]
[tool.ruff.lint.per-file-ignores]
"*/tests/*" = ["INP001", "SLF001"]
[tool.ty.src]
exclude = [
# auto-generated code
"**/*_pb2.py",
"**/*_pb2.pyi",
"**/*pb2_grpc.py"
]