-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
225 lines (207 loc) · 6.33 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.hatch.version]
path = 'eogrow/__init__.py'
[tool.hatch.build.targets.sdist]
include = ['/README.md', '/LICENSE.md', '/eogrow']
[tool.hatch.build.targets.wheel]
include = ['/eogrow']
[project]
name = "eo-grow"
dynamic = ["version"]
description = "Earth observation framework for scaled-up processing in Python"
readme = "README.md"
requires-python = ">= 3.8"
license = { file = "LICENSE" }
authors = [
{ name = "Sinergise EO research team", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Image Processing",
]
dependencies = [
"click",
"colorlog",
"boto3<=1.29.6",
"eo-learn[VISUALIZATION]>=1.5.0",
"fiona>=1.8.18; python_version>='3.9'",
"fiona>=1.8.18,<1.10; python_version<'3.9'",
"fs>=2.2.0",
"geopandas>=0.14.4,<1; python_version>='3.9'",
"geopandas>=0.11.0,<1; python_version<'3.9'",
"numpy",
"opencv-python-headless",
"pandas",
"pydantic>=1.8.0, <2.0",
"python-dateutil",
"python-rapidjson",
"rasterio",
"ray[default]",
"sentinelhub>=3.9.0",
"shapely>=1.8.0",
"typing-extensions>=4.5.0",
]
[project.optional-dependencies]
ml = ["joblib", "lightgbm>=3.0.0", "scikit-learn"]
docs = [
"autodoc_pydantic",
"nbsphinx",
"sphinx_mdinclude==0.5.4", #0.6 didn't work last time
"sphinx-rtd-theme==1.3.0",
"sphinx==7.1.2",
]
dev = [
"eo-grow[ML]",
"boto3",
"boto3-stubs",
"build",
"deepdiff",
"fs_s3fs",
"numpy>=2.0.0; python_version>='3.9'",
"moto[s3]>=5.0.0",
"mypy>=0.990",
"pre-commit",
"pyogrio",
"pytest-cov",
"pytest-order",
"pytest>=4.0.0",
"requests-mock",
"scipy",
"twine",
"types-python-dateutil",
"types-mock",
"types-requests",
"types-setuptools",
"types-urllib3",
]
[project.urls]
Homepage = "https://github.com/sentinel-hub/eo-grow"
Documentation = "https://eo-grow.readthedocs.io"
Issues = "https://github.com/sentinel-hub/eo-grow/issues"
Source = "https://github.com/sentinel-hub/eo-grow"
Forum = "https://forum.sentinel-hub.com"
[project.scripts]
eogrow = "eogrow.cli:run_pipeline"
eogrow-ray = "eogrow.cli:run_pipeline_on_cluster"
eogrow-template = "eogrow.cli:make_template"
eogrow-validate = "eogrow.cli:validate_config"
eogrow-test = "eogrow.cli:run_test_pipeline"
[tool.black]
line-length = 120
preview = true
[tool.ruff]
line-length = 120
target-version = "py38"
lint.select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # naming
"YTT", # flake-2020
"B", # bugbear
"A", # built-ins
"COM", # commas
"C4", # comprehensions
"T10", # debugger statements
"ISC", # implicit string concatenation
"ICN", # import conventions
"G", # logging format
"PIE", # flake8-pie
"T20", # print statements
"PT", # pytest style
"RET", # returns
"SLF", # private member access
"SIM", # simplifications
"ARG", # unused arguments
"PD", # pandas
"PGH", # pygrep hooks (useless noqa comments, eval statements etc.)
"FLY", # flynt
"NPY", # numpy
"PERF", # perflint, performance improvements
"RUF", # ruff rules
]
fix = true
lint.fixable = [
"I", # sort imports
"F401", # remove redundant imports
]
lint.ignore = [
"C408", # complains about `dict()` calls, we use them to avoid too many " in the code
"SIM117", # wants to always combine `with` statements, gets ugly for us
"SIM108", # tries to aggresively inline `if`, not always readable
"A003", # complains when ATTRIBUTES shadow builtins, we have objects that implement `filter` and such
"COM812", # trailing comma missing, fights with black
"PD011", # suggests `.to_numpy` instead of `.values`, also does this for non-pandas objects...
"N805", # complains about first arguments not being self, but pydantic validators are like that...
# potentially fixable
"B904", # want `raise ... from None` instead of just `raise ...`
"B028", # always demands a stacklevel argument when warning
"PT011", # complains for `pytest.raises(ValueError)` but we use it a lot
]
lint.per-file-ignores = { "__init__.py" = ["F401"] }
exclude = [".git", "__pycache__", "build", "dist", "*.ipynb"]
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"our-packages",
"first-party",
"local-folder",
]
known-first-party = ["eogrow"]
sections = { our-packages = ["sentinelhub", "eolearn"] }
[tool.pytest.ini_options]
log_cli_level = "INFO"
markers = [
"integration: marks tests that fully execute pipelines (and tend to be slow)",
"chain: marks tests that represent an end-to-end pipeline execution",
]
[tool.mypy]
follow_imports = "normal"
ignore_missing_imports = true
show_column_numbers = true
show_error_codes = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
warn_unreachable = true
strict_equality = true
pretty = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
# init_forbid_extra = true # cant be used unless we change managers
init_typed = true
[tool.nbqa.addopts]
ruff = ["--extend-ignore=E402,T201,B015,B018,NPY002,UP,FA"]
# E402 -> imports on top
# T201 -> print found
# B015 & B018 -> useless expression (used to show values in ipynb)
# NPY002 -> use RNG instead of old numpy.random
# UP -> suggestions for new-style classes (future import might confuse readers)
# FA -> necessary future annotations import
[tool.coverage.run]
source = ["eogrow"]
[tool.coverage.report]
omit = ["*/__init__.py"]