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

OSMnx 2.0 Migration Guide #1123

Open
gboeing opened this issue Jan 31, 2024 · 3 comments
Open

OSMnx 2.0 Migration Guide #1123

gboeing opened this issue Jan 31, 2024 · 3 comments

Comments

@gboeing
Copy link
Owner

gboeing commented Jan 31, 2024

Overview

OSMnx 2.0.0 is targeted for release later in 2024. This major release includes some breaking changes (including removing previously deprecated functionality) that are not backwards compatible with v1. This issue provides guidance on migrating from v1 to v2. It will be updated as more details are finalized.

Beta testers needed

Testers needed! OSMnx 2.0.0 is now in beta. You can help test it by installing the latest pre-release. Create a virtual environment then run pip install --pre osmnx

Migrating to v2

The easiest way to ensure your code is fully compatible with OSMnx v2 is to install the latest v1 release (currently 1.9.3), then run your code. The latest v1 release will remain compatible with the v1 API, but any deprecated functionality you're using will issue a FutureWarning with simple guidance to make it v2 compatible.

You can also try out the latest 2.0.0 beta pre-release as described above.

The Examples Gallery has been updated for v2 compatibility if you're looking for sample code.

Key changes

The three biggest overarching changes in 2.0 are:

  • The package is now fully type-annotated throughout.
  • Several modules have been wholly refactored for performance optimization.
  • The package's API has been streamlined and made more consistent, including some breaking changes and some moved/renamed functions.

In addition to these, there have been many smaller enhancements, fixes, and changes. See the changelog for details and see the latest documentation for an up-to-date user reference.

This was referenced Feb 1, 2024
georgmangold added a commit to georgmangold/wolf that referenced this issue Apr 7, 2024
controller.py:431: FutureWarning: The `north`, `south`, `east`, and `west` parameters are deprecated and will be removed in the v2.0.0 release. Use the `bbox` parameter instead. See the OSMnx v2 migration guide: gboeing/osmnx#1123   polygon = ox.utils_geo.bbox_to_poly(north, south, east, west)  controller.py:733: FutureWarning: The `north`, `south`, `east`, and `west` parameters are deprecated and will be removed in the v2.0.0 release. Use the `bbox` parameter instead. See the OSMnx v2 migration guide: gboeing/osmnx#1123   graph = ox.graph_from_bbox()

`north`, `south`, `east`, `west` parameters are deprecated use `bbox` as tuple parameter instead
@gboeing
Copy link
Owner Author

gboeing commented May 3, 2024

The first OSMnx v2.0.0 pre-release (beta0) has been released. Testers needed!

@EwoutH
Copy link
Contributor

EwoutH commented May 6, 2024

Briefly tested beta0 on a few of my existing notebooks. No major issues so far!

@jGaboardi
Copy link
Contributor

I'm also seeing no major/unexpected issues thus far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants