From d50b7e2c45995e627b3210688deca580d80d8166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Luk=C5=A1i=C4=8D?= <31988337+zigaLuksic@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:14:47 +0200 Subject: [PATCH 1/2] Prepare for release 1.7.3 (#89) * Update files * resolve precommit --- .pre-commit-config.yaml | 8 ++++---- pyproject.toml | 14 +++++++------- s2cloudless/__init__.py | 2 +- tests/test_utils.py | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1948c24..1410e55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: requirements-txt-fixer @@ -13,18 +13,18 @@ repos: - id: debug-statements - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.8.0 hooks: - id: black language_version: python3 - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.1.11" + rev: "v0.6.8" hooks: - id: ruff - repo: https://github.com/nbQA-dev/nbQA - rev: 1.7.1 + rev: 1.8.7 hooks: - id: nbqa-black - id: nbqa-ruff diff --git a/pyproject.toml b/pyproject.toml index 55eae10..a08f722 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ classifiers = [ ] dependencies = [ "lightgbm>=2.0.11", - "numpy>=1.13.3,<2", + "numpy>=1.13.3", "opencv-python-headless", "sentinelhub>=3.9.0", "typing_extensions", @@ -65,7 +65,7 @@ preview = true [tool.ruff] line-length = 120 target-version = "py38" -select = [ +lint.select = [ "F", # pyflakes "E", # pycodestyle "W", # pycodestyle @@ -97,7 +97,7 @@ select = [ "FA", # checks where future import of annotations would make types nicer ] fix = true -fixable = [ +lint.fixable = [ "I", # sort imports "F401", # remove redundant imports "UP007", # use new-style union type annotations @@ -105,7 +105,7 @@ fixable = [ "UP037", # remove quotes around types when not necessary "FA100", # import future annotations where necessary (not autofixable ATM) ] -ignore = [ +lint.ignore = [ "SIM108", # tries to aggresively inline `if`, not always readable "COM812", # trailing comma missing, fights with black "PD011", # suggests `.to_numpy` instead of `.values`, also does this for non-pandas objects... @@ -113,11 +113,11 @@ ignore = [ "PT011", # complains for `pytest.raises(ValueError)` but we use it a lot "N803", # clashes with the default naming of model protocols ] -per-file-ignores = { "__init__.py" = ["F401"] } -exclude = [".git", "__pycache__", "build", "dist"] +lint.per-file-ignores = { "__init__.py" = ["F401"] } +exclude = [".git", "__pycache__", "build", "dist", "*.ipynb"] -[tool.ruff.isort] +[tool.ruff.lint.isort] section-order = [ "future", "standard-library", diff --git a/s2cloudless/__init__.py b/s2cloudless/__init__.py index abba849..a9e1c91 100644 --- a/s2cloudless/__init__.py +++ b/s2cloudless/__init__.py @@ -4,4 +4,4 @@ from .pixel_classifier import PixelClassifier from .utils import download_bands_and_valid_data_mask -__version__ = "1.7.2" +__version__ = "1.7.3" diff --git a/tests/test_utils.py b/tests/test_utils.py index fd9b3ad..f396b76 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -46,7 +46,7 @@ ), ], ) -@pytest.mark.sh_integration() +@pytest.mark.sh_integration def test_download_bands_and_valid_data_mask(test_input: dict, expected_shape: tuple[int, int, int]) -> None: bands, mask = download_bands_and_valid_data_mask(**test_input) assert bands.shape == expected_shape From 50da4a20c6244d5e0290866e1f85a4019de4cd3b Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Fri, 27 Sep 2024 10:35:04 +0200 Subject: [PATCH 2/2] remove codecov upload --- .github/workflows/ci_action.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_action.yml b/.github/workflows/ci_action.yml index d7634d7..1fb98d2 100644 --- a/.github/workflows/ci_action.yml +++ b/.github/workflows/ci_action.yml @@ -103,10 +103,10 @@ jobs: run: | pytest -m "not sh_integration" - - name: Upload code coverage - if: ${{ matrix.full_test_suite && github.event_name == 'push' }} - uses: codecov/codecov-action@v2 - with: - files: coverage.xml - fail_ci_if_error: true - verbose: false + # - name: Upload code coverage + # if: ${{ matrix.full_test_suite && github.event_name == 'push' }} + # uses: codecov/codecov-action@v2 + # with: + # files: coverage.xml + # fail_ci_if_error: true + # verbose: false