From fbe498af0866f348f6acd5271f388b8ae79599cb Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Fri, 27 Dec 2024 09:54:39 -0700 Subject: [PATCH 1/5] update pre-commit config --- .pre-commit-config.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3ca4d7..cb87ab8 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: "v5.0.0" + rev: v5.0.0 hooks: - id: check-added-large-files args: [--maxkb=50] @@ -16,12 +16,18 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.2" + rev: v0.8.4 hooks: - id: ruff - args: [--fix, --line-length=100, --extend-select=E, --extend-select=F, --extend-select=I] + args: [--no-cache, --fix, --line-length=100, --select, "A,B,E,F,I,UP,W"] - id: ruff-format - args: [--line-length=100] + args: [--no-cache, --line-length=100] + + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + args: [--strict, -d, relaxed] - repo: local hooks: From 621061148be40c912ff8cde60cce273e43380bf3 Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Fri, 27 Dec 2024 09:54:59 -0700 Subject: [PATCH 2/5] simplify cache key --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51e1506..ca5d38a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pre-commit/ - key: pre-commit-${{ matrix.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} - name: Run pre-commit checks run: pre-commit run --all-files From e3eaa248264eced3309c8684cc2bbdb66adb4936 Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Fri, 27 Dec 2024 09:56:14 -0700 Subject: [PATCH 3/5] version bump to 2.0.1 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 9f706d4..00bd30f 100644 --- a/environment.yml +++ b/environment.yml @@ -4,6 +4,6 @@ channels: dependencies: - jupyterlab - - osmnx=2.0.* + - osmnx=2.0.1 - pre-commit - python-igraph From 09fa49466c18dc4a5a8ff5080a408bf1816aa48c Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Wed, 1 Jan 2025 21:04:05 -0800 Subject: [PATCH 4/5] stricter yaml linting --- .github/dependabot.yml | 6 +++--- .pre-commit-config.yaml | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ace460..ca79ca5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: weekly diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb87ab8..8ee6d60 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: rev: v0.8.4 hooks: - id: ruff - args: [--no-cache, --fix, --line-length=100, --select, "A,B,E,F,I,UP,W"] + args: [--no-cache, --fix, --line-length=100, --select, 'A,B,E,F,I,UP,W'] - id: ruff-format args: [--no-cache, --line-length=100] @@ -27,7 +27,13 @@ repos: rev: v1.35.1 hooks: - id: yamllint - args: [--strict, -d, relaxed] + args: + - --strict + - > + -d={extends: default, rules: { + document-start: disable, + quoted-strings: {quote-type: single, required: only-when-needed}, + truthy: {check-keys: false}}} - repo: local hooks: @@ -36,4 +42,4 @@ repos: entry: jupyter nbconvert language: system types: [jupyter] - args: ["--clear-output", "--inplace"] + args: [--clear-output, --inplace] From 3305c0a325ce52c9ba4a1d8c88aceef1ee765223 Mon Sep 17 00:00:00 2001 From: Geoff Boeing Date: Wed, 1 Jan 2025 21:05:24 -0800 Subject: [PATCH 5/5] fix geocoder query --- notebooks/00-osmnx-features-demo.ipynb | 2 +- notebooks/03-graph-place-queries.ipynb | 2 +- notebooks/11-interactive-web-mapping.ipynb | 6 ++++-- notebooks/16-download-osm-geospatial-features.ipynb | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/notebooks/00-osmnx-features-demo.ipynb b/notebooks/00-osmnx-features-demo.ipynb index 2e10ec1..7400843 100644 --- a/notebooks/00-osmnx-features-demo.ipynb +++ b/notebooks/00-osmnx-features-demo.ipynb @@ -404,7 +404,7 @@ "outputs": [], "source": [ "# get all building footprints in some neighborhood\n", - "place = \"SoHo, New York, NY\"\n", + "place = \"Chinatown, San Francisco, California\"\n", "tags = {\"building\": True}\n", "gdf = ox.features.features_from_place(place, tags)\n", "gdf.shape" diff --git a/notebooks/03-graph-place-queries.ipynb b/notebooks/03-graph-place-queries.ipynb index 3822dda..f3e2daa 100644 --- a/notebooks/03-graph-place-queries.ipynb +++ b/notebooks/03-graph-place-queries.ipynb @@ -294,7 +294,7 @@ "outputs": [], "source": [ "# get the network for a neighborhood\n", - "place = \"SoHo, New York, NY\"\n", + "place = \"Chinatown, San Francisco, California\"\n", "G = ox.graph.graph_from_place(place, network_type=\"drive\")" ] }, diff --git a/notebooks/11-interactive-web-mapping.ipynb b/notebooks/11-interactive-web-mapping.ipynb index 2e68f28..d881306 100644 --- a/notebooks/11-interactive-web-mapping.ipynb +++ b/notebooks/11-interactive-web-mapping.ipynb @@ -229,7 +229,9 @@ "outputs": [], "source": [ "# explore a neighborhood's buildings interactively\n", - "gdf = ox.features.features_from_place(\"SoHo, New York, NY\", tags={\"building\": True})\n", + "gdf = ox.features.features_from_place(\n", + " \"Chinatown, San Francisco, California\", tags={\"building\": True}\n", + ")\n", "cols = [\"height\", \"addr:housenumber\", \"addr:street\", \"addr:postcode\"]\n", "gdf.explore(tiles=\"cartodbdarkmatter\", tooltip=cols)" ] @@ -241,7 +243,7 @@ "outputs": [], "source": [ "# explore a neighborhood's buildings + street network interactively\n", - "place = \"SoHo, New York, NY\"\n", + "place = \"Chinatown, San Francisco, California\"\n", "cols = [\"height\", \"addr:housenumber\", \"addr:street\", \"addr:postcode\"]\n", "G = ox.graph.graph_from_place(place, network_type=\"drive\", truncate_by_edge=True)\n", "gdf = ox.features.features_from_place(place, tags={\"building\": True})\n", diff --git a/notebooks/16-download-osm-geospatial-features.ipynb b/notebooks/16-download-osm-geospatial-features.ipynb index aa16ea4..0ca3a37 100644 --- a/notebooks/16-download-osm-geospatial-features.ipynb +++ b/notebooks/16-download-osm-geospatial-features.ipynb @@ -52,7 +52,7 @@ "source": [ "# get all building footprints in some neighborhood\n", "# `True` means retrieve any object with this tag, regardless of value\n", - "place = \"SoHo, New York, NY\"\n", + "place = \"Chinatown, San Francisco, California\"\n", "tags = {\"building\": True}\n", "gdf = ox.features.features_from_place(place, tags)\n", "gdf.shape"