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

warn if loading an xml file generated by OSMnx itself #1031

Merged
merged 6 commits into from
Jul 5, 2023
Merged

warn if loading an xml file generated by OSMnx itself #1031

merged 6 commits into from
Jul 5, 2023

Conversation

gboeing
Copy link
Owner

@gboeing gboeing commented Jul 5, 2023

Users sometimes attempt to re-load XML files from save_graph_xml back into OSMnx for later work using graph_from_xml (e.g. #1023), though the documentation warns them not to. Due to format limitations in save_graph_xml, this use case is not supported. This PR makes this more explicit by a user warning if an XML file loaded by graph_from_xml as generated by OSMnx.

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.99%. Comparing base (6130d55) to head (40f6498).
Report is 917 commits behind head on main.

Files with missing lines Patch % Lines
osmnx/osm_xml.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1031      +/-   ##
==========================================
- Coverage   98.03%   97.99%   -0.04%     
==========================================
  Files          24       24              
  Lines        2438     2443       +5     
==========================================
+ Hits         2390     2394       +4     
- Misses         48       49       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gboeing gboeing merged commit 48f6209 into main Jul 5, 2023
2 of 6 checks passed
@gboeing gboeing deleted the xml branch July 5, 2023 21:04
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

Successfully merging this pull request may close these issues.

1 participant