Skip to content

Commit 9292092

Browse files
committed
more lefthook work
Signed-off-by: John Seekins <john@robot-house.us>
1 parent e455236 commit 9292092

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

.config/mise.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[tools]
2-
python = "3.14.0"
2+
python = "3.13.3"
33
lefthook = "latest"
4+
yamllint = "latest"
5+
actionlint = "latest"
6+
shellcheck = "latest"

.lefthook.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pre-commit:
2+
jobs:
3+
- name: yaml linting
4+
run: yamllint -c .yamllint-config.yaml .
5+
glob: "*.y*ml"
6+
- name: Github Action linting
7+
run: actionlint
8+
include:
9+
- ".github/workflows/*.y*ml"
10+
- name: Ruff Formatting
11+
run: uv run ruff format -q .
12+
glob: "*.py"
13+
- name: Ruff Syntax checking
14+
run: uv run ruff check --fix -q
15+
glob: "*.py"
16+
- name: MyPy type validation
17+
run: uv run mypy .
18+
glob: "*.py"

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,3 @@ repos:
1717
rev: v0.45.0
1818
hooks:
1919
- id: markdownlint
20-
21-
- repo: https://github.com/adrienverge/yamllint
22-
rev: v1.37.1
23-
hooks:
24-
- id: yamllint
25-
args:
26-
- "-c=.yamllint-config.yaml"

enrichers/general.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from concurrent.futures import ThreadPoolExecutor
1+
from concurrent.futures import ProcessPoolExecutor
22
import copy
33
from enrichers import (
44
openstreetmap,
@@ -20,7 +20,7 @@ def enrich_facility_data(facilities_data: dict, workers: int = 3) -> dict:
2020
total = len(facilities_data["facilities"])
2121
processed = 0
2222

23-
with ThreadPoolExecutor(max_workers=workers) as pool:
23+
with ProcessPoolExecutor(max_workers=workers) as pool:
2424
for res in pool.map(_enrich_facility, facilities_data["facilities"].items()):
2525
enriched_data["facilities"][res[0]] = res[1] # type: ignore [index]
2626
processed += 1

0 commit comments

Comments
 (0)