Skip to content

Commit

Permalink
Merge pull request #99 from gboeing/updates
Browse files Browse the repository at this point in the history
update for v2.0.1
  • Loading branch information
gboeing authored Jan 2, 2025
2 parents 34e2f8e + 3305c0a commit 2f1d827
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 17 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -16,12 +16,24 @@ 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={extends: default, rules: {
document-start: disable,
quoted-strings: {quote-type: single, required: only-when-needed},
truthy: {check-keys: false}}}
- repo: local
hooks:
Expand All @@ -30,4 +42,4 @@ repos:
entry: jupyter nbconvert
language: system
types: [jupyter]
args: ["--clear-output", "--inplace"]
args: [--clear-output, --inplace]
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ channels:

dependencies:
- jupyterlab
- osmnx=2.0.*
- osmnx=2.0.1
- pre-commit
- python-igraph
2 changes: 1 addition & 1 deletion notebooks/00-osmnx-features-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion notebooks/03-graph-place-queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\")"
]
},
Expand Down
6 changes: 4 additions & 2 deletions notebooks/11-interactive-web-mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/16-download-osm-geospatial-features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2f1d827

Please sign in to comment.