-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- INTERNAL: Use `ruff` instead of `black` + `flake8` + `isort`
- Loading branch information
1 parent
380f68f
commit bf9b8f1
Showing
13 changed files
with
132 additions
and
247 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
exclude: | | ||
(?x)^(docs/.*)$ | | ||
(?x)^( | ||
docs/.* | ||
)$ | | ||
.*\.md | ||
fail_fast: false | ||
ci: | ||
autoupdate_schedule: monthly | ||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks.git | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-json | ||
- id: check-yaml | ||
args: [ --allow-multiple-documents, --unsafe ] | ||
- id: check-xml | ||
- id: check-added-large-files | ||
args: [ '--maxkb=1600' ] | ||
- id: debug-statements | ||
- id: check-merge-conflict | ||
|
||
- repo: 'https://github.com/PyCQA/flake8' | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: 'https://github.com/psf/black' | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.8.3 | ||
hooks: | ||
- id: isort | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["eoreader*"] | ||
namespaces = false | ||
|
||
[project] | ||
name = "eoreader" | ||
authors = [ | ||
{name = "ICube-SERTIT", email = "dev-sertit@unistra.fr"}, | ||
] | ||
description = "Remote-sensing opensource python library reading optical and SAR constellations, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way." | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = {text = "Apache 2.0"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Operating System :: OS Independent", | ||
"Topic :: Scientific/Engineering :: GIS", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"lxml", | ||
"h5netcdf", | ||
"scipy", | ||
"rasterio>=1.3.10", # numpy >= 2 | ||
"xarray>=2024.06.0", # numpy >= 2 | ||
"rioxarray>=0.10.0", | ||
"odc-geo>=0.4.6", | ||
"geopandas>=0.14.4", | ||
"sertit[full]>=1.44.1", | ||
"spyndex>=0.3.0", | ||
"pyresample", | ||
"zarr", | ||
"rtree", | ||
"cloudpathlib[s3]>=0.12.1", | ||
"validators", | ||
"methodtools", | ||
"dicttoxml", | ||
] | ||
|
||
[project.optional-dependencies] | ||
"stac" = [ | ||
"pystac[validation]", | ||
"stac-asset", | ||
"planetary_computer", | ||
] | ||
[tool.setuptools.package-data] | ||
eoreader.data = ["*.xml"] | ||
|
||
dynamic = ["version"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "eoreader.__version__"} | ||
|
||
[project.urls] | ||
Bug_Tracker = "https://github.com/sertit/eoreader/issues" | ||
Documentation = "https://eoreader.readthedocs.io/en/latest/" | ||
Source_Code = "https://github.com/sertit/eoreader" | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
# pycodestyle | ||
"E", | ||
# Pyflakes | ||
"F", | ||
# pyupgrade | ||
"UP", | ||
# flake8-bugbear | ||
"B", | ||
# flake8-simplify | ||
"SIM", | ||
# isort | ||
"I", | ||
] | ||
ignore = ["E501"] | ||
|
||
[tool.ruff.lint.pyupgrade] | ||
# Preserve types, even if a file imports `from __future__ import annotations`. | ||
keep-runtime-typing = true | ||
|
||
# Pytest options | ||
[tool.pytest.ini_options] | ||
log_cli = true | ||
log_cli_format = "%(name)s: %(asctime)s - [%(levelname)s] - %(message)s" | ||
log_cli_date_format = "%Y-%m-%d %H:%M:%S" | ||
log_cli_level = "INFO" | ||
|
||
[tool.coverage.run] | ||
omit = ["*/__init__.py"] | ||
|
||
|
||
[tool.typos] | ||
files.extend-exclude = ["*.ipynb", "*.html", ".git/*"] | ||
default.extend-ignore-re = ["_.*_", "\"\\w*\"", "PN", ", fo", "FRE", "THR", "T60HTE", "_BA"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.