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

Version 2.0.0 development #1106

Merged
merged 418 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
418 commits
Select commit Hold shift + click to select a range
6c67411
update ruff config
gboeing Feb 2, 2024
69df552
simplify extras
gboeing Feb 2, 2024
4db4126
Merge branch 'v2' into msg
gboeing Feb 2, 2024
d70a795
call error var e for consistency
gboeing Feb 2, 2024
6a7e762
ensure imports used only for type hinting are guarded behind TYPE_CHE…
gboeing Feb 4, 2024
ebd258f
improve logging and make level explicit
gboeing Feb 5, 2024
efcfc9d
do not include "if TYPE_CHECKING" blocks in coverage
gboeing Feb 5, 2024
57a4b1d
code cleanup
gboeing Feb 5, 2024
530230a
clean up len checks
gboeing Feb 5, 2024
dcc6c47
fix comment
gboeing Feb 5, 2024
de5e84e
update changelog
gboeing Feb 5, 2024
ce63026
Merge branch 'main' into v2
gboeing Feb 5, 2024
e1179d9
Merge pull request #1125 from gboeing/msg
gboeing Feb 5, 2024
822d88d
improve docstrings
gboeing Feb 5, 2024
4090b20
rename settings module's default_accept_language, default_referer, an…
gboeing Feb 5, 2024
565589c
Merge pull request #1129 from gboeing/headers
gboeing Feb 5, 2024
d0fb920
increase linting
gboeing Feb 6, 2024
92f24e1
disable ruff preview
gboeing Feb 11, 2024
c693c88
noqa use of sha1 for file checksums
gboeing Feb 11, 2024
cad1cda
remove executable permission from test script
gboeing Feb 11, 2024
66cfc4f
simplify xml vulnerability linting
gboeing Feb 11, 2024
d87aaf5
clarify crs in docstrings
gboeing Feb 11, 2024
9f8f28c
simplify lint ignores
gboeing Feb 11, 2024
051f7d8
cleanup
gboeing Feb 11, 2024
22f6b49
test exe have shebang
gboeing Feb 11, 2024
d1fb5f5
don't display missing coverage lines in ci terminal
gboeing Feb 11, 2024
d299a88
Merge pull request #1130 from gboeing/lint
gboeing Feb 11, 2024
466a426
improve error messages
gboeing Feb 13, 2024
a24750c
update changelog
gboeing Feb 13, 2024
46c8cb6
fix pytest matches
gboeing Feb 13, 2024
e2a4125
use codecov token to upload
gboeing Feb 13, 2024
38eecc7
Merge pull request #1131 from gboeing/msg
gboeing Feb 13, 2024
c0d6e12
add markdownlint
gboeing Feb 13, 2024
cd0fe71
update examples gallery links
gboeing Feb 13, 2024
885b7fa
validate pyproject in pre-commit
gboeing Feb 13, 2024
d9430db
cleanup
gboeing Feb 13, 2024
f2638b6
Merge pull request #1132 from gboeing/lint
gboeing Feb 13, 2024
0425d7e
Update pyproject.toml
gboeing Feb 14, 2024
cdb75dd
fix space
gboeing Feb 14, 2024
e62a137
add workflow to build package and link check docs
gboeing Feb 15, 2024
ace5f7d
misc improvements to ci and tests
gboeing Feb 15, 2024
2ff7814
raise TypeCheckError and/or TypeError
gboeing Feb 15, 2024
626a632
require numpy>=1.21 for numpy.typing.NDArray
gboeing Feb 15, 2024
cfd9e14
fix pandas future warning
gboeing Feb 15, 2024
eb98b80
update ci config
gboeing Feb 15, 2024
eff7d85
restore env
gboeing Feb 15, 2024
48c202f
Merge pull request #1133 from gboeing/ci
gboeing Feb 15, 2024
e3491c1
pre-commit check executable scripts
gboeing Feb 17, 2024
fb577b0
make optional args keyword-only
gboeing Feb 17, 2024
5e312bc
improve docstrings
gboeing Feb 18, 2024
86935f5
make `dist` function arguments required rather than optional
gboeing Feb 18, 2024
36643e7
rename max_dist param -> dist
gboeing Feb 18, 2024
97a3133
fix docstring typo
gboeing Feb 18, 2024
98a3e01
make private function args required
gboeing Feb 18, 2024
232a454
remove check_remark param
gboeing Feb 18, 2024
65d2bf6
update changelog
gboeing Feb 18, 2024
fc4837e
Merge pull request #1134 from gboeing/args
gboeing Feb 18, 2024
c514f16
update changelog
gboeing Feb 18, 2024
72bee71
streamline xml parsing
gboeing Feb 18, 2024
6f4bf69
streamline save_graph_xml function signature
gboeing Feb 18, 2024
41d0644
refactor save_graph_xml
gboeing Feb 19, 2024
66ba462
refactor _append_nodes_xml_tree
gboeing Feb 19, 2024
a95aa83
refactor osm xml saving
gboeing Feb 20, 2024
e0b2adc
fix attr value handling if graph is simplified and merge_edges is False
gboeing Feb 20, 2024
cd8c1f1
clean up _sort_nodes func
gboeing Feb 20, 2024
582a806
fix cycle handling and node order in topological sort
gboeing Feb 21, 2024
6f164fc
fix docstrings and comments
gboeing Feb 21, 2024
702a141
avoid unnecessary returns
gboeing Feb 21, 2024
5de8d8b
improve test coverage
gboeing Feb 21, 2024
0dfbfb1
remove merge_edges and oneway function params
gboeing Feb 22, 2024
e4626be
add bounds xml subelement and add visible attr to node/way subelements
gboeing Feb 22, 2024
54170cd
remove settings module node/way tags/attrs
gboeing Feb 22, 2024
bfd0bfa
sort useful_tags_way list items
gboeing Feb 24, 2024
a948544
sort useful_tags_node list items
gboeing Feb 24, 2024
59cf837
add missing osm xml element attrs
gboeing Feb 24, 2024
2a1a786
improve docstrings
gboeing Feb 24, 2024
ea033f6
improve docstrings
gboeing Feb 24, 2024
83c7075
add encoding function param
gboeing Feb 24, 2024
ea4a62f
clarify filter var name and docstring
gboeing Feb 24, 2024
e4af545
optimize _add_nodes_xml
gboeing Feb 26, 2024
7a8842f
improve comments
gboeing Feb 26, 2024
c450527
code cleanup
gboeing Feb 26, 2024
7a5e9ad
fix adding node tag xml subelements
gboeing Feb 26, 2024
8f41e7f
rename way_tag_aggs
gboeing Feb 26, 2024
6f89cd6
Merge branch 'main' into v2
gboeing Feb 26, 2024
2a55221
Merge branch 'v2' into xml
gboeing Feb 26, 2024
151e57a
update pre-commit
gboeing Feb 26, 2024
43292b4
add lxml for validating saved osm xml files against xsd
gboeing Feb 26, 2024
7a3cc68
validate saved osm xml files against xsd schema
gboeing Feb 26, 2024
06edb3d
add xsd schema for osm xml
gboeing Feb 26, 2024
1233050
update changelog
gboeing Feb 26, 2024
936ac39
make id type long instead of int
gboeing Feb 26, 2024
22b344c
clarify standard attrs
gboeing Feb 26, 2024
a4774a7
clean up schema and make it stricter
gboeing Feb 26, 2024
753ee5a
improve docstring
gboeing Feb 27, 2024
a16fdf6
add iso8601 timestamp style
gboeing Feb 27, 2024
c12d21e
rename settings.memory and settings.timeout
gboeing Feb 27, 2024
f91aaf0
rename a couple tests
gboeing Feb 27, 2024
f592322
update changelog
gboeing Feb 27, 2024
b47ef96
clarify docstring
gboeing Feb 28, 2024
42111c2
make optional filepath args able to be passed positionally
gboeing Feb 29, 2024
64a5734
Merge branch 'settings' of https://github.com/gboeing/osmnx into sett…
gboeing Feb 29, 2024
4541110
rename settings.nominatim_endpoint and settings.overpass_endpoint
gboeing Mar 1, 2024
7ce19f4
update changelog
gboeing Mar 1, 2024
9cbbf68
run prettier on toml and xml
gboeing Mar 2, 2024
f13b679
Merge pull request #1135 from gboeing/xml
gboeing Mar 2, 2024
f9ae68b
Merge pull request #1136 from gboeing/settings
gboeing Mar 2, 2024
cbb7a4f
update changelog
gboeing Mar 2, 2024
37e09af
Merge branch 'main' into v2
gboeing Mar 2, 2024
4edd173
Merge branch 'main' into v2
gboeing Mar 2, 2024
b5e0264
update ruff then format and lint
gboeing Mar 2, 2024
718a2e8
update settings docstring
gboeing Mar 2, 2024
ec4b00f
update contributing guidelines
gboeing Mar 2, 2024
a64979c
improve docstrings
gboeing Mar 2, 2024
ca9744b
warn user if saving project graph as osm xml and add tests for saving…
gboeing Mar 2, 2024
1f33ffa
sort polygon features dict
gboeing Mar 3, 2024
f40bfdd
improve docstrings and comment
gboeing Mar 3, 2024
ee3d63d
plot_orientation: support directed graph bearings
dhimmel Mar 3, 2024
5ed9bbc
changelog: directional edge bearings analysis
dhimmel Mar 3, 2024
9c9f66a
test_extract_edge_bearings_directionality
dhimmel Mar 3, 2024
4264cf7
orientation_entropy: MultiDiGraph support
dhimmel Mar 3, 2024
32ed03f
directional bearing analysis: review revisions
dhimmel Mar 4, 2024
9cb9c99
test_extract_edge_bearings_directionality: add_edge_lengths
dhimmel Mar 4, 2024
bc0a9bc
Merge pull request #1139 from dhimmel/dhimmel-directional-bearings
gboeing Mar 6, 2024
ea397d3
minor changes to #1139
gboeing Mar 6, 2024
7950a9b
add junction and railway to useful node tags
gboeing Mar 12, 2024
9aba626
make node consolidation retain single or list of unique node attr values
gboeing Mar 12, 2024
056a53b
don't create useless lat and lon node attributes when geometry is sto…
gboeing Mar 12, 2024
e96d643
rename simplification endpoint_attrs -> edge_attrs
gboeing Mar 12, 2024
034c91a
add simplification node_attrs function params
gboeing Mar 12, 2024
c6761a9
improve docstring
gboeing Mar 12, 2024
aaa5e8a
update changelog
gboeing Mar 12, 2024
d61aab1
update changelog
gboeing Mar 12, 2024
a6eda88
fix comment
gboeing Mar 13, 2024
a2869ae
_bearings_distribution: defer weighting to np.histogram
dhimmel Mar 13, 2024
fc7a735
test_bearings: weight tests
dhimmel Mar 13, 2024
6a86324
_bearings_distribution weights docs & bug fix
dhimmel Mar 13, 2024
dcaa13b
changelog: edge bearing weights
dhimmel Mar 13, 2024
be80e05
rename node_attrs -> node_attrs_include and edge_attrs -> edge_attrs_…
gboeing Mar 13, 2024
9de6b89
clarify projection warning now that we are not adding lat-lon attrs
gboeing Mar 13, 2024
11f4e3c
update changelog
gboeing Mar 13, 2024
06c4ff0
update changelog
gboeing Mar 13, 2024
1f5604a
Merge pull request #1144 from gboeing/nodes
gboeing Mar 13, 2024
edadc38
Merge pull request #1145 from gboeing/simp
gboeing Mar 13, 2024
bcae501
rename H variables
gboeing Mar 13, 2024
b77689b
improve warning
gboeing Mar 13, 2024
58869d0
move functionality out of speed and utils_graph modules into better h…
gboeing Mar 13, 2024
604f6dc
add covert module
gboeing Mar 13, 2024
6de9e96
rename get_largest_component, get_undirected, and get_digraph functions
gboeing Mar 13, 2024
a5d915e
update docstring
gboeing Mar 14, 2024
6707067
update changelog
gboeing Mar 14, 2024
e2d649a
update changelog
gboeing Mar 14, 2024
2f057ac
clean up package level namespace
gboeing Mar 14, 2024
633d708
fix function calls
gboeing Mar 14, 2024
d9fecf7
clean up truncate module
gboeing Mar 14, 2024
7384a3a
streamline truncate module and how retain_all param works throughout
gboeing Mar 15, 2024
6da75cc
handle retain_all if graph from point by network dist
gboeing Mar 15, 2024
0da3702
update changelog
gboeing Mar 15, 2024
550598d
remove unnecessary truncate in graph from point by network dist
gboeing Mar 15, 2024
bb64517
Merge pull request #1148 from gboeing/api
gboeing Mar 15, 2024
12dbb6c
Merge branch 'main' into v2
gboeing Mar 15, 2024
9b04473
Merge branch 'v2' into dsh-issue-1143
gboeing Mar 15, 2024
f65fc24
update pre-commit
gboeing Mar 15, 2024
6ca5352
_extract_edge_bearings format: lines v indents
dhimmel Mar 16, 2024
016d3ca
Merge pull request #1147 from dhimmel/dsh-issue-1143
gboeing Mar 16, 2024
f39d6a0
_bearings_distribution: bin_centers terminology
dhimmel Mar 16, 2024
4139a04
_bearings_distribution: clarity, comments, tests
dhimmel Mar 17, 2024
07839fe
Merge pull request #1149 from dhimmel/dsh-bin-centers
gboeing Mar 18, 2024
ca8de97
update changelog
gboeing Mar 19, 2024
d614c96
clean up
gboeing Mar 19, 2024
076280c
Merge branch 'v2' into features
gboeing Mar 20, 2024
f7e68cc
allow user-defined edge attr aggregation when simplifying graph
gboeing Mar 26, 2024
662a935
first draft of refactor
gboeing Mar 26, 2024
6e7b77d
added support for implicit maxspeed values
nikita03565 Mar 27, 2024
7bb7c41
update docstrings
gboeing Mar 30, 2024
f39cead
simplify role check
gboeing Mar 30, 2024
70b63c8
improve docstrings
gboeing Mar 30, 2024
21916bc
add node_attrs_agg param when consolidating intersections
gboeing Mar 30, 2024
ae91015
moved speed mapping to routing module
nikita03565 Mar 31, 2024
377fc67
Update routing.py
gboeing Apr 1, 2024
cd2a742
Update CHANGELOG.md
gboeing Apr 1, 2024
e621fd4
Merge pull request #1153 from nikita03565/feature/implicit_maxspeed
gboeing Apr 1, 2024
07cf9c0
fix format
gboeing Apr 1, 2024
9c3a27b
handle elevation during node consolidation
gboeing Apr 1, 2024
3fcafe2
clean up
gboeing Apr 1, 2024
d702c3f
update changelog
gboeing Apr 1, 2024
ba66e0e
clean up
gboeing Apr 1, 2024
c71d702
Merge pull request #1155 from gboeing/simp
gboeing Apr 1, 2024
6d93cd4
remove obsolete remove_isolated_nodes function
gboeing Apr 1, 2024
5fdc79c
update changelog
gboeing Apr 2, 2024
ed420e5
Merge branch 'main' into v2
gboeing Apr 2, 2024
a1b77ea
Merge branch 'v2' into features
gboeing Apr 2, 2024
ddbd770
only add nodes list to way elements
gboeing Apr 2, 2024
f35fcd0
improve filtering and handle osm xml features
gboeing Apr 2, 2024
a89eaeb
rename old features module for now for testing
gboeing Apr 2, 2024
c098a4d
make new features module the default features module
gboeing Apr 2, 2024
b5fbb90
update changelog
gboeing Apr 2, 2024
8e8d2ac
update ruff
gboeing Apr 2, 2024
390f85c
increase test coverage
gboeing Apr 3, 2024
1be5e65
clean up
gboeing Apr 3, 2024
bd000b4
add no cover
gboeing Apr 3, 2024
6220f90
update changelog
gboeing Apr 3, 2024
3846a11
Update README.md
gboeing Apr 3, 2024
05b3200
update docs
gboeing Apr 8, 2024
5cc36b7
Merge branch 'main' into v2
gboeing Apr 8, 2024
43a5d0a
minor clean up
gboeing Apr 9, 2024
5415211
code cleanup
gboeing Apr 10, 2024
ba5df5c
update config
gboeing Apr 11, 2024
bf669a7
Merge branch 'v2' into features
gboeing Apr 11, 2024
4b36646
Add conditional tolerance for intersection consolidation
EwoutH Apr 17, 2024
272aee0
Simplify filling NaN tolerance numbers in consolidation
EwoutH Apr 18, 2024
95395d4
consolidation: Rename tolerance_column to tolerance_attribute
EwoutH Apr 18, 2024
b9ccb48
simplification: Fix ruff errors
EwoutH Apr 18, 2024
458521f
simplification: Ruff format
EwoutH Apr 18, 2024
f020b30
if we cannot build way geometry, log its ID
gboeing Apr 24, 2024
cefcebf
Merge branch 'v2' into consolidate_conditional_tolerance
EwoutH Apr 24, 2024
f867cea
update ruff
gboeing Apr 24, 2024
06aafb5
remove features_v1
gboeing Apr 24, 2024
0735f22
move test_features
gboeing Apr 24, 2024
f8b0c17
Merge pull request #1157 from gboeing/features
gboeing Apr 24, 2024
a559a22
simplify shapely geometry imports
gboeing Apr 24, 2024
5addaa1
Run ruff after retarget to v2 branch
EwoutH Apr 24, 2024
18d8b69
Add missing type hint
EwoutH Apr 24, 2024
933a7e3
consolidate_intersections: Allow tolerance to accept dictionary
EwoutH Apr 25, 2024
30cd575
Update geometric node merging to handle missing tolerances
EwoutH Apr 25, 2024
497e06c
Merge branch 'v2' into consolidate_conditional_tolerance
EwoutH Apr 25, 2024
59d0112
Update docstring and merging for consolidation
EwoutH Apr 25, 2024
7ddb90d
Add line to changelog
EwoutH Apr 25, 2024
73c85f5
remove unused imports
EwoutH Apr 25, 2024
8b06cf4
Add simple consolidate_intersections tolerance dict tests
EwoutH Apr 25, 2024
1e68ec9
formatting
EwoutH Apr 25, 2024
edd26b2
merge in v2 branch, fix formatting, fix attr access
gboeing Apr 25, 2024
e4e972e
fix tests
gboeing Apr 25, 2024
71f8d7f
Merge pull request #1160 from EwoutH/consolidate_conditional_tolerance
gboeing Apr 25, 2024
e4a0292
clean-up
gboeing Apr 25, 2024
1b10a07
update changelog
gboeing Apr 25, 2024
714e444
streamline parallel edge count
gboeing Apr 26, 2024
7e13266
rename network_types "all" -> "all_public" and "all_private" -> "all"…
gboeing Apr 28, 2024
787825b
update changelog
gboeing Apr 28, 2024
615ec9c
Merge pull request #1163 from gboeing/filters
gboeing Apr 28, 2024
5ecf36d
workflow dispatch
gboeing May 1, 2024
9a25a13
update citation
gboeing May 1, 2024
8e47c6e
add cff
gboeing May 1, 2024
934ac20
fix typo
gboeing May 1, 2024
5c36b17
Merge pull request #1168 from gboeing/cite_v2
gboeing May 1, 2024
95f3f79
update changelog
gboeing May 1, 2024
4d146ca
add beta message
gboeing May 1, 2024
4cfe348
update tests
gboeing May 1, 2024
eeb98bf
Merge branch 'main' into v2
gboeing May 1, 2024
a003557
remove v2 branch CI trigger
gboeing May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
id: documentation_examples
attributes:
label: Documentation
description: Before you proceed, review the [documentation](https://osmnx.readthedocs.io/) and [OSMnx examples](https://github.com/gboeing/osmnx-examples) gallery, which cover key concepts, installation, and package usage.
description: Before you proceed, review the [documentation](https://osmnx.readthedocs.io/) and [examples gallery](https://github.com/gboeing/osmnx-examples), which cover key concepts, installation, and package usage.
options:
- label: My problem is not addressed by the documentation or examples
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
id: documentation_examples
attributes:
label: Documentation
description: Before you proceed, review the [documentation](https://osmnx.readthedocs.io/) and [OSMnx examples](https://github.com/gboeing/osmnx-examples) gallery, which cover key concepts, installation, and package usage.
description: Before you proceed, review the [documentation](https://osmnx.readthedocs.io/) and [examples gallery](https://github.com/gboeing/osmnx-examples), which cover key concepts, installation, and package usage.
options:
- label: My proposal is not addressed by the documentation or examples
required: true
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Read these instructions carefully**
# Read these instructions carefully

Before you proceed, review the contributing guidelines in the CONTRIBUTING.md file, especially the sections on project coding standards and tests. Please edit the changelog to reflect your changes.

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1" # Every Monday at 06:00 UTC
- cron: "0 5 * * 1" # every monday at 05:00 UTC
workflow_dispatch:

jobs:
build:
Expand All @@ -15,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]

defaults:
Expand All @@ -34,7 +35,7 @@ jobs:
cache-downloads: true
cache-environment: true
create-args: python=${{ matrix.python-version }}
environment-file: tests/environments/env-ci.yml
environment-file: environments/tests/env-ci.yml
post-cleanup: none

- name: Install OSMnx
Expand All @@ -43,14 +44,16 @@ jobs:
conda list
conda info --all

- name: Lint code
- name: Run pre-commit checks
run: SKIP=no-commit-to-branch pre-commit run --all-files

- name: Test docs
run: make -C ./docs html
run: make -C ./docs html SPHINXOPTS="-E -W --keep-going"

- name: Test code
run: pytest --cov=./osmnx --cov-report=xml --cov-report=term-missing --verbose
- name: Test code and coverage
run: pytest --verbose --maxfail=1 --typeguard-packages=osmnx --cov=osmnx --cov-report=xml

- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and check package/docs

on:
schedule:
- cron: "0 6 * * 1" # every monday at 06:00 UTC
workflow_dispatch:

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

defaults:
run:
shell: bash -elo pipefail {0}

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Create environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
environment-file: environments/tests/env-test-build.yml
post-cleanup: none

- name: Build package and twine check
run: |
hatch build --clean
twine check --strict ./dist/*

- name: Build docs and check links
run: python -m sphinx -E -W --keep-going -b linkcheck ./docs/source ./docs/build/linkcheck
19 changes: 7 additions & 12 deletions .github/workflows/test-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test minimal versions

on:
schedule:
- cron: "0 7 * * 1" # Every Monday at 07:00 UTC
- cron: "0 4 * * 1" # every monday at 04:00 UTC
workflow_dispatch:

jobs:
Expand All @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [macos-latest, ubuntu-latest, windows-latest]

defaults:
run:
Expand All @@ -29,7 +29,7 @@ jobs:
with:
cache-downloads: true
cache-environment: true
environment-file: tests/environments/env-test-minimal.yml
environment-file: environments/tests/env-test-minimal.yml
post-cleanup: none

- name: Install OSMnx
Expand All @@ -38,16 +38,11 @@ jobs:
conda list
conda info --all

- name: Lint code
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
hatch build --clean
twine check --strict ./dist/*
- name: Run pre-commit checks
run: SKIP=no-commit-to-branch pre-commit run --all-files

- name: Test docs
run: |
make -C ./docs html
python -m sphinx -b linkcheck ./docs/source ./docs/build/linkcheck
run: make -C ./docs html SPHINXOPTS="-E -W --keep-going"

- name: Test code
run: pytest --cov=./osmnx --cov-report=term-missing --verbose
run: pytest --verbose --maxfail=1 --typeguard-packages=osmnx
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.temp
.pytest_cache
tests/run_tests.bat
*.vrt
.DS_Store

Expand Down
25 changes: 18 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v4.6.0"
hooks:
- id: check-added-large-files
args: [--maxkb=50]
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
args: [--assume-in-merge]
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
Expand All @@ -29,15 +28,27 @@ repos:
- id: prettier
types_or: [markdown, yaml]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "v0.39.0"
hooks:
- id: markdownlint
args: [--disable=MD013]

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.16"
hooks:
- id: validate-pyproject

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.15"
rev: "v0.4.1"
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.9.0"
hooks:
- id: mypy
additional_dependencies: [types-requests]
additional_dependencies:
[matplotlib, pandas-stubs, pytest, types-requests]
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 2.0.0 (in development)

Read the v2 [migration guide](https://github.com/gboeing/osmnx/issues/1123)

- add type annotations to all public and private functions throughout package (#1107)
- remove all functionality previously deprecated in v1 (#1113 #1122 #1135 #1148)
- drop Python 3.8 support (#1106)
- bump minimum required numpy version to 1.21 for typing support (#1133)
- improve docstrings throughout package (#1116)
- improve logging and warnings throughout package (#1125)
- improve error messages throughout package (#1131)
- refactor features module for speed improvement and memory efficiency (#1157)
- refactor save_graph_xml function and \_osm_xml module for speed improvement and bug fixes (#1135)
- make save_graph_xml function accept only an unsimplified MultiDiGraph as its input data (#1135)
- replace save_graph_xml function's edge_tag_aggs tuple parameter with way_tag_aggs dict parameter (#1135)
- add OSM junction and railway tags to the default settings.useful_tags_node (#1144)
- add node_attrs_include argument to simplification.simplify_graph function to flexibly relax strictness (#1145)
- add edge_attr_aggs argument to simplify_graph function to specify aggregation behavior (#1155)
- add node_attr_aggs argument to the consolidate_intersections function to specify aggregation behavior (#1155)
- allow per-node tolerance values for intersection consolidation (#1160)
- make consolidate_intersections function retain unique attribute values when consolidating nodes (#1144)
- make which_result function parameters consistently able to accept a list throughout package (#1113)
- handle implicit maxspeed values in add_edge_speeds function (#1153)
- change add_node_elevations_google default batch_size to 512 to match Google's limit (#1115)
- allow analysis of MultiDiGraph directional edge bearings and orientation (#1139)
- fix graph projection creating useless lat and lon node attributes (#1144)
- fix bug in \_downloader.\_save_to_cache function usage (#1107)
- fix bug in handling requests ConnectionError when querying Overpass status endpoint (#1113)
- fix minor bugs throughout to address inconsistencies revealed by type enforcement (#1107 #1114)
- make optional function parameters keyword-only throughout package (#1134)
- make dist function parameters required rather than optional throughout package (#1134)
- make utils_geo.bbox_from_point function return a tuple of floats for consistency with rest of package (#1113)
- rename truncate.truncate_graph_dist max_dist argument to dist for consistency with rest of package (#1134)
- remove retain_all argument from all truncate module functions (#1148)
- remove settings module's deprecated and now replaced settings (#1129 #1136)
- rename osm_xml module to \_osm_xml to make it private, as all its functions are private (#1113)
- rename private \_downloader module to \_http (#1114)
- remove unnecessary private \_api module (#1114)

## 1.9.3 (2024-05-01)

- update the official package reference paper (#1169)
Expand Down
35 changes: 17 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# Contributing guidelines

Thanks for using OSMnx and for considering contributing to it by opening an issue or pull request. Every piece of software is a work in progress. This project is the result of many hours of work contributed freely its contributors and the many people that build the projects it depends on. Thank you for contributing!
Thanks for using OSMnx and for considering contributing to it by opening an issue or pull request. Every piece of software is a work in progress. This project is the result of many hours of work contributed freely its contributors and the many people that build the projects on which it depends. Thank you for contributing!

#### If you have a "how-to" or usage question:
## If you have a "how-to" or usage question

- please ask your question on [StackOverflow](https://stackoverflow.com/search?q=osmnx), as we reserve the issue tracker for bug reports and new feature development. Any such questions asked in the issue tracker will be automatically closed.
Please ask your question on [StackOverflow](https://stackoverflow.com/search?q=osmnx), as we reserve the issue tracker for bug reports and new feature development. Any such questions asked in the issue tracker will be automatically closed.

#### If you're having an installation problem:
## If you have an installation problem

- make sure you've followed the installation instructions in the [documentation](https://osmnx.readthedocs.io/)
- if you installed OSMnx via conda-forge, please open an issue at its [feedstock](https://github.com/conda-forge/osmnx-feedstock/issues)
Ensure you have followed the installation instructions in the [documentation](https://osmnx.readthedocs.io/). If you installed OSMnx via conda-forge, please open an issue at its [feedstock](https://github.com/conda-forge/osmnx-feedstock/issues).

#### If you've found a bug:
## If you found a bug

- read the error message, then review the [documentation](https://osmnx.readthedocs.io/) and [OSMnx examples](https://github.com/gboeing/osmnx-examples) gallery, which cover key concepts, installation, and package usage
- search through the [open issues](https://github.com/gboeing/osmnx/issues?q=is%3Aopen+is%3Aissue) and [closed issues](https://github.com/gboeing/osmnx/issues?q=is%3Aissue+is%3Aclosed) to see if the problem has already been reported
- if the problem is with a dependency of OSMnx, open an issue in the dependency's repo
- if the problem is with OSMnx itself and you can fix it simply, please open a pull request
- if the problem persists, please open an issue in the [issue tracker](https://github.com/gboeing/osmnx/issues), and _provide all the information requested in the template_, including a minimal working example so others can independently and completely reproduce the problem
- Read the error message, then review the [documentation](https://osmnx.readthedocs.io/) and OSMnx [Examples Gallery](https://github.com/gboeing/osmnx-examples), which cover key concepts, installation, and package usage.
- Search through the open and closed [issues](https://github.com/gboeing/osmnx/issues) to see if the problem has already been reported.
- If the problem is with a dependency of OSMnx, open an issue in that dependency's repo.
- If the problem is with OSMnx itself and you can fix it simply, please open a pull request.
- If the problem persists, please open an issue in the [issue tracker](https://github.com/gboeing/osmnx/issues), and _provide all the information requested in the template_, including a minimal working example so others can independently and completely reproduce the bug.

#### If you have a feature proposal or want to contribute:
## If you have a feature proposal

- post your proposal on the [issue tracker](https://github.com/gboeing/osmnx/issues), and _provide all the information requested in the template_, so we can review it together (some proposals may not be a good fit for the project)
- fork the repo, make your change, update the [changelog](./CHANGELOG.md), run the [tests](./tests), and submit a PR
- adhere to the project's code and docstring standards by running its [pre-commit](.pre-commit-config.yaml) hooks
- respond to code review
- Post your proposal on the [issue tracker](https://github.com/gboeing/osmnx/issues), and _provide all the information requested in the template_, so we can review it together (some proposals may not be a good fit for the project).
- Fork the repo, make your change, update the [changelog](./CHANGELOG.md), run the [tests](./tests), and submit a pull request.
- Adhere to the project's code and docstring standards by running its [pre-commit](.pre-commit-config.yaml) hooks.
- Respond to code review.

This project requires minimum Python and NumPy versions in accordance with [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html).
The OSMnx project follows three principles when adding new functionality: 1) it is useful for a broad set of users, 2) it generalizes well, and 3) it is not trivially easy for users to implement themselves.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
furo
sphinx == 7.* # same value as needs_sphinx in /docs/source/conf.py
sphinx-autodoc-typehints
35 changes: 20 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# ruff: noqa: INP001
"""
Configuration file for the Sphinx documentation builder.

For the full list of built-in configuration values, see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import sys
from pathlib import Path

# go up two levels from current working dir (/docs/source) to package root
pkg_root_path = str(Path.cwd().parent.parent)
sys.path.insert(0, pkg_root_path)

# project info
author = "Geoff Boeing"
copyright = "2016-2024, Geoff Boeing" # noqa: A001
project = "OSMnx"

# go up two levels from current working dir (/docs/source) to package root
pkg_root_path = str(Path.cwd().parent.parent)
sys.path.insert(0, pkg_root_path)

# dynamically load version from /osmnx/_version.py
with Path.open(Path("../../osmnx/_version.py")) as f:
version = release = f.read().split(" = ")[1].replace('"', "")
Expand All @@ -41,17 +41,22 @@
# linkcheck for stackoverflow gets HTTP 403 in CI environment
linkcheck_ignore = [r"https://stackoverflow\.com/.*"]

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
# type annotations configuration
autodoc_typehints = "description"
napoleon_use_param = True
napoleon_use_rtype = False
typehints_document_rtype = True
typehints_use_rtype = False
typehints_fully_qualified = False

# general configuration and options for HTML output
# see https://www.sphinx-doc.org/en/master/usage/configuration.html
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints"]
html_static_path: list[str] = []
html_theme = "furo"
language = "en"
needs_sphinx = "7" # same value as pinned in /docs/requirements.txt
root_doc = "index"
source_suffix = ".rst"
templates_path: list = []

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_static_path: list = []
html_theme = "furo"
templates_path: list[str] = []
Loading