Skip to content

Commit

Permalink
update pre-commit and bump config
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Dec 20, 2024
1 parent 5aaa59e commit 01bd80d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
9 changes: 0 additions & 9 deletions .bumpversion.cfg

This file was deleted.

15 changes: 5 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,21 @@ repos:
hooks:
- id: validate-pyproject

- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
language_version: python

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.238
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.11.2
hooks:
- id: mypy
language_version: python
Expand Down
15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ default_section = "THIRDPARTY"
[tool.mypy]
no_strict_optional = "True"

[tool.ruff]
[tool.ruff.lint]
select = [
"D1", # pydocstyle errors
"E", # pycodestyle errors
Expand All @@ -82,3 +82,16 @@ ignore = [
]


[tool.bumpversion]
current_version = "0.10.1"
search = "{current_version}"
replace = "{new_version}"
regex = false
tag = true
commit = true
tag_name = "{new_version}"

[[tool.bumpversion.files]]
filename = "rio_tiler_pds/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'
1 change: 1 addition & 0 deletions rio_tiler_pds/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def get_object(bucket: str, key: str, request_pays: bool = False) -> bytes:
warnings.warn(
"`rio_tiler_pds.utils.get_object` will be removed in version 1.0, Please use `rio_tiler_pds.utils.fetch`",
DeprecationWarning,
stacklevel=1,
)
return aws_get_object(bucket, key, request_pays=request_pays)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_sentinel2.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ def test_sentinel_productid_valid():

def test_no_readers():
"""Test no reader found for level."""
with pytest.raises(Exception):
with pytest.raises(Exception): # noqa: B017
S2JP2Reader("S2B_L1B_20170729_19UDP_0")

with pytest.raises(Exception):
with pytest.raises(Exception): # noqa: B017
S2JP2Reader("S2A_L2C_20170729_19UDP_0")

with pytest.raises(Exception):
with pytest.raises(Exception): # noqa: B017
S2COGReader("S2A_29RKH_20200219_0_L2C")


Expand Down

0 comments on commit 01bd80d

Please sign in to comment.