diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84d4389..81b6e29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Versioning: Commit messages & changelog - repo: https://github.com/commitizen-tools/commitizen - rev: v4.1.1 + rev: v4.8.4 hooks: - id: commitizen stages: [commit-msg] @@ -9,7 +9,7 @@ repos: # Lint / autoformat: Python code - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: "v0.9.3" + rev: "v0.12.12" hooks: # Run the linter - id: ruff @@ -19,7 +19,7 @@ repos: # Lint & Autoformat: SQL - repo: https://github.com/sqlfluff/sqlfluff - rev: 3.3.0 + rev: 3.4.2 hooks: - id: sqlfluff-lint files: ^fmtm_splitter/fmtm_algorithm.sql @@ -47,7 +47,7 @@ repos: ] # Lint: Markdown - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.45.0 hooks: - id: markdownlint args: diff --git a/fmtm_splitter/fmtm_algorithm.sql b/fmtm_splitter/fmtm_algorithm.sql index 20ac5a6..7cf801c 100644 --- a/fmtm_splitter/fmtm_algorithm.sql +++ b/fmtm_splitter/fmtm_algorithm.sql @@ -243,10 +243,10 @@ CREATE TABLE clusteredbuildings AS ( *, ST_CLUSTERKMEANS( b.geom, - CAST((b.numfeatures / %(num_buildings)s) + 1 AS integer) + CAST((b.numfeatures / b.%(num_buildings)s) + 1 AS integer) ) OVER (PARTITION BY b.polyid) - AS cid + AS cid FROM buildingstocluster AS b ),