Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (85 loc) · 3.27 KB
/
Copy pathpyproject.toml
File metadata and controls
94 lines (85 loc) · 3.27 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
[project]
name = "workflows-sentinel2-clay"
version = "0.1.0"
description = "Tilebox workflow for Clay-based Sentinel-2 change detection"
readme = "README.md"
requires-python = ">=3.12, <3.13"
dependencies = [
"affine>=2.4.0",
"claymodel",
"huggingface-hub>=0.34.0",
"numpy>=2",
"obstore>=0.6.0",
"odc-geo>=0.5.0",
"rasterio>=1.4.3",
"tilebox-datasets>=0.59.0",
"tilebox-grpc>=0.59.0",
"tilebox-storage>=0.59.0",
"tilebox-workflows[geospatial]>=0.59.0",
"torch>=2.8.0",
"zarr>=3.1.0",
]
[dependency-groups]
dev = ["pyright>=1.1.401", "ruff>=0.11.11"]
[tool.ruff]
# settings applying to all ruff subcommands, such as `ruff check` (lint) and `ruff format`
line-length = 120
target-version = "py312"
exclude = [
"*/.venv/*",
]
[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.pyright]
# 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"
exclude = ["infrastructure"]
reportPrivateImportUsage = false
[tool.uv.sources]
claymodel = { git = "https://github.com/Clay-foundation/model.git" }
torch = [
{ index = "pytorch-cu129", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cpu", marker = "sys_platform != 'linux' and sys_platform != 'win32'" },
]
torchvision = [
{ index = "pytorch-cu129", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cpu", marker = "sys_platform != 'linux' and sys_platform != 'win32'" },
]
[[tool.uv.index]]
name = "pytorch-cu129"
url = "https://download.pytorch.org/whl/cu129"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true