Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #49

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repos:
# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
rev: v3.29.1
hooks:
- id: commitizen
stages: [commit-msg]

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.5.6"
rev: "v0.6.8"
hooks:
# Run the linter
- id: ruff
Expand All @@ -19,7 +19,7 @@ repos:

# Lint & Autoformat: SQL
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.1.0
rev: 3.2.0
hooks:
- id: sqlfluff-lint
files: ^fmtm_splitter/fmtm_algorithm.sql
Expand Down Expand Up @@ -47,7 +47,7 @@ repos:
]
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.42.0
hooks:
- id: markdownlint
args:
Expand Down
9 changes: 5 additions & 4 deletions fmtm_splitter/fmtm_algorithm.sql
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ CREATE TABLE buildings AS (
SELECT
b.*,
polys.polyid
FROM "ways_poly" AS b, polygonsnocount AS polys
FROM ways_poly AS b, polygonsnocount AS polys
WHERE
ST_INTERSECTS(polys.geom, ST_CENTROID(b.geom))
AND b.tags ->> 'building' IS NOT NULL
Expand Down Expand Up @@ -146,7 +146,7 @@ CREATE TABLE splitpolygons AS (
COUNT(b.geom) AS numfeatures,
ST_AREA(sp.geog) AS area
FROM polygonsnocount AS sp
LEFT JOIN "buildings" AS b
LEFT JOIN buildings AS b
ON sp.polyid = b.polyid
GROUP BY sp.polyid, sp.geom
)
Expand Down Expand Up @@ -244,9 +244,10 @@ CREATE TABLE clusteredbuildings AS (
SELECT
*,
ST_CLUSTERKMEANS(
geom, CAST((b.numfeatures / %(num_buildings)s) + 1 AS integer)
b.geom,
CAST((b.numfeatures / %(num_buildings)s) + 1 AS integer)
)
OVER (PARTITION BY polyid)
OVER (PARTITION BY b.polyid)
AS cid
FROM buildingstocluster AS b
),
Expand Down
Loading