Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Jul 15, 2023
1 parent 9c69cd8 commit 3703a3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:
branches: [main]

jobs:

build:

name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -22,7 +20,6 @@ jobs:
shell: bash -elo pipefail {0}

steps:

- name: Checkout repo
uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Thanks for using OSMnx and for considering contributing to it! This issue tracke

## Contribute an example/demo

- post your proposal in the [issue tracker](https://github.com/gboeing/osmnx-examples/issues) or submit a PR with the new Jupyter notebook
- respond to code review
- post your proposal in the [issue tracker](https://github.com/gboeing/osmnx-examples/issues) or submit a PR with the new Jupyter notebook
- respond to code review

Every piece of software is a work in progress. This project is the result of many hours of work contributed freely by myself and the many people that build the projects it depends on. Thank you for contributing!
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
This gallery contains step-by-step usage tutorials and feature demonstrations as Jupyter notebooks. You can run these notebooks interactively online with [Binder](https://mybinder.org/v2/gh/gboeing/osmnx-examples/main?urlpath=lab) or locally with the official OSMnx [Docker image](https://hub.docker.com/r/gboeing/osmnx). All of the examples are in this repo's [notebooks](notebooks) folder. Note that this repo's main branch generally tracks the functionality of the OSMnx repo's main branch. For examples corresponding to previously released versions of OSMnx, use this repo's tags to browse by release.

### More info:
- [Overview of OSMnx](https://geoffboeing.com/2016/11/osmnx-python-street-networks/)
- [OSMnx repo](https://github.com/gboeing/osmnx)
- [Documentation](https://osmnx.readthedocs.io/)
- [Journal article and citation info](https://geoffboeing.com/publications/osmnx-complex-street-networks/)

- [Overview of OSMnx](https://geoffboeing.com/2016/11/osmnx-python-street-networks/)
- [OSMnx repo](https://github.com/gboeing/osmnx)
- [Documentation](https://osmnx.readthedocs.io/)
- [Journal article and citation info](https://geoffboeing.com/publications/osmnx-complex-street-networks/)
4 changes: 2 additions & 2 deletions notebooks/06-stats-indicators-centrality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
"# unpack dicts into individiual keys:values\n",
"stats = ox.basic_stats(G, area=area)\n",
"for k, count in stats[\"streets_per_node_counts\"].items():\n",
" stats[\"{}way_int_count\".format(k)] = count\n",
" stats[f\"{k}way_int_count\"] = count\n",
"for k, proportion in stats[\"streets_per_node_proportions\"].items():\n",
" stats[\"{}way_int_prop\".format(k)] = proportion\n",
" stats[f\"{k}way_int_prop\"] = proportion\n",
"\n",
"# delete the no longer needed dict elements\n",
"del stats[\"streets_per_node_counts\"]\n",
Expand Down
6 changes: 3 additions & 3 deletions notebooks/12-node-elevations-edge-grades.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@
"outputs": [],
"source": [
"avg_grade = np.mean(grades)\n",
"print(\"Average street grade in {} is {:.1f}%\".format(place, avg_grade * 100))\n",
"print(f\"Average street grade in {place} is {avg_grade * 100:.1f}%\")\n",
"\n",
"med_grade = np.median(grades)\n",
"print(\"Median street grade in {} is {:.1f}%\".format(place, med_grade * 100))"
"print(f\"Median street grade in {place} is {med_grade * 100:.1f}%\")"
]
},
{
Expand Down Expand Up @@ -304,7 +304,7 @@
" print(msg.format(np.sum(route_rises), ascent, abs(descent)))\n",
"\n",
" route_lengths = ox.utils_graph.route_to_gdf(G, route, weight=\"length\")[\"length\"]\n",
" print(\"Total trip distance: {:,.0f} meters\".format(np.sum(route_lengths)))"
" print(f\"Total trip distance: {np.sum(route_lengths):,.0f} meters\")"
]
},
{
Expand Down

0 comments on commit 3703a3d

Please sign in to comment.