From 1cfb1c15675b406cfe29d28045027f2b4a31455d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bosch?= Date: Thu, 5 Dec 2024 14:43:09 +0100 Subject: [PATCH] style: updated pre-commit hook versions --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 13 +++---------- detectree/__init__.py | 1 + detectree/lidar.py | 1 + detectree/pixel_features.py | 6 +++--- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 470212a..f3d8f3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: tag: ${{ github.ref_name }} - name: create Release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1.14.0 with: allowUpdates: true draft: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9d131b..e781d91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,17 +11,10 @@ repos: - id: check-yaml - repo: https://github.com/commitizen-tools/commitizen - rev: v3.15.0 + rev: v4.0.0 hooks: - id: commitizen - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 - hooks: - - id: prettier - additional_dependencies: [prettier, prettier-plugin-toml, prettier-plugin-ini] - types: ["ini", "toml", "yaml"] - - repo: https://github.com/executablebooks/mdformat rev: 0.7.17 # Use the ref you want to point at hooks: @@ -38,7 +31,7 @@ repos: args: ["-d relaxed"] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.0 + rev: 0.30.0 hooks: - id: check-github-workflows @@ -60,7 +53,7 @@ repos: - tomli - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.8.2 hooks: - id: ruff args: [ --fix ] diff --git a/detectree/__init__.py b/detectree/__init__.py index 2b0b4b5..0e10b22 100644 --- a/detectree/__init__.py +++ b/detectree/__init__.py @@ -1,4 +1,5 @@ """detectree init.""" + from .classifier import Classifier, ClassifierTrainer from .lidar import LidarToCanopy, rasterize_lidar from .train_test_split import TrainingSelector diff --git a/detectree/lidar.py b/detectree/lidar.py index 1db599d..90563d6 100644 --- a/detectree/lidar.py +++ b/detectree/lidar.py @@ -1,4 +1,5 @@ """Utilities to get canopy information from LiDAR data.""" + import laspy import numpy as np import pandas as pd diff --git a/detectree/pixel_features.py b/detectree/pixel_features.py index ca78fcd..db521c1 100644 --- a/detectree/pixel_features.py +++ b/detectree/pixel_features.py @@ -185,9 +185,9 @@ def build_features_from_arr(self, img_rgb): img_lab_l, ddepth=-1, kernel=oriented_kernel_arr ) img_filtered_vec = img_filtered.flatten() - X[ - :, self.num_color_features + i * self.num_orientations + j - ] = img_filtered_vec + X[:, self.num_color_features + i * self.num_orientations + j] = ( + img_filtered_vec + ) # entropy features # tpf.compute_entropy_features(X_img[:, self.entropy_slice],