-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (117 loc) · 4.2 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (117 loc) · 4.2 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[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.11.10",
# pyright 1.1.401 reports many wrong false positives, let's wait until that is fixed before upgrading
"pyright>=1.1.379,<1.1.401",
"pre-commit>=3.8.0",
"types-protobuf>=5.27.0.20240907",
"junitparser>=3.2.0",
]
[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/*",
]
[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.pyright]
exclude = ["**/.ipynb_checkpoints", "**/__pycache__", ".venv"]
# ignore warnings in those files, but still type check them when used as a dependency in other files
ignore = [
# it's auto generated
"**/datasets/v1",
"**/workflows/v1",
]
# pyright needs to have all the dependencies installed to be able to type check
# we can make sure of this by telling it to use the uv venv
venvPath = "."
venv = ".venv"
extraPaths = [
"tilebox-datasets",
"tilebox-grpc",
"tilebox-storage",
"tilebox-workflows",
]
reportPrivateImportUsage = false