From a483f4ceff0472d47fa3d35df8655c8590c53fd4 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 21:57:34 +0200 Subject: [PATCH 01/25] Turn api into user and dev references --- docs/api/growbikenet.functions.rst | 10 ---------- docs/api/growbikenet.growbikenet.rst | 9 --------- docs/reference_developer.rst | 10 ++++++++++ docs/reference_user.rst | 7 +++++++ 4 files changed, 17 insertions(+), 19 deletions(-) delete mode 100644 docs/api/growbikenet.functions.rst delete mode 100644 docs/api/growbikenet.growbikenet.rst create mode 100644 docs/reference_developer.rst create mode 100644 docs/reference_user.rst diff --git a/docs/api/growbikenet.functions.rst b/docs/api/growbikenet.functions.rst deleted file mode 100644 index 90c82a2..0000000 --- a/docs/api/growbikenet.functions.rst +++ /dev/null @@ -1,10 +0,0 @@ -growbikenet.functions -===================== - -.. automodule:: growbikenet.functions - - - .. rubric:: Functions - - .. autosummary:: - \ No newline at end of file diff --git a/docs/api/growbikenet.growbikenet.rst b/docs/api/growbikenet.growbikenet.rst deleted file mode 100644 index cf4771a..0000000 --- a/docs/api/growbikenet.growbikenet.rst +++ /dev/null @@ -1,9 +0,0 @@ -growbikenet.growbikenet -======================= - -.. automodule:: growbikenet.growbikenet - - - .. rubric:: Main - - .. autosummary:: \ No newline at end of file diff --git a/docs/reference_developer.rst b/docs/reference_developer.rst new file mode 100644 index 0000000..cd9bee9 --- /dev/null +++ b/docs/reference_developer.rst @@ -0,0 +1,10 @@ +Developer reference +=================== + +This is the complete developer reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. + +.. automodule:: growbikenet.functions + :members: + :private-members: + + \ No newline at end of file diff --git a/docs/reference_user.rst b/docs/reference_user.rst new file mode 100644 index 0000000..757d1c6 --- /dev/null +++ b/docs/reference_user.rst @@ -0,0 +1,7 @@ +User reference +============== + +This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. + +.. automodule:: growbikenet.growbikenet + :members: \ No newline at end of file From e97ed5927edd6e3c4ef5861e3d3d5962b8081f01 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 21:57:56 +0200 Subject: [PATCH 02/25] Replace quickstart with getting started --- docs/index.rst | 14 ++++----- .../{quickstart.rst => getting_started.rst} | 29 +++++++++++++++---- 2 files changed, 29 insertions(+), 14 deletions(-) rename docs/usage/{quickstart.rst => getting_started.rst} (63%) diff --git a/docs/index.rst b/docs/index.rst index f129e63..28eae23 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ GrowBikeNet |version| documentation =================================== -The Python package `growbikenet` grows an urban bicycle network from scratch or from an existing bicycle network. It is part of `BikeNetKit `__. +The Python package `growbikenet` grows an urban bicycle network from scratch or from an existing bicycle network. It is hosted on `Github `__, part of `BikeNetKit `__. The software downloads and pre-processes data from OpenStreetMap, prepares seed points to connect, runs simulations, saves the results, @@ -22,11 +22,8 @@ Setup and use ============= To set up GrowBikeNet, see the `Installation `__ page. -To use GrowBikeNet, the `Quickstart `__ page -is a good place to start. -More on the details of the inner workings can be found on -the `Reference pages `__. -Furthermore, you can also find the `API documentation `__. +To use GrowBikeNet, the `Getting started `__ page +is a good place to start, which also explains how the package works in detail. For technical documentation, consult the `User reference `__. .. Statement of need .. ================= @@ -68,6 +65,7 @@ Documentation contents Home usage/installation - usage/quickstart - API reference + usage/getting_started + User reference + Developer reference references diff --git a/docs/usage/quickstart.rst b/docs/usage/getting_started.rst similarity index 63% rename from docs/usage/quickstart.rst rename to docs/usage/getting_started.rst index 4eab725..0c8385f 100644 --- a/docs/usage/quickstart.rst +++ b/docs/usage/getting_started.rst @@ -1,8 +1,26 @@ -========== -Quickstart -========== +=============== +Getting started +=============== -GrowBikeNet takes one mandatory parameter, the city name, which it passes via `OSMnx `__ to `Nominatim `__, to download a city's street network. GrowBikeNet then runs the following operations: +Get Started in 4 Steps +---------------------- + +1. Install GrowBikeNet by following the :doc:`installation` guide. + +2. Read the :ref:`introducing-growbikenet` section below. + +3. Run the :doc:`mwe`. + +4. Consult the :doc:`reference_user` for complete details on using the package. + +Finally, if you're not already familiar with `NetworkX`_ and `GeoPandas`_, make sure you read their user guides as OSMnx uses their data structures. + +.. _introducing-growbikenet: + +Explaining GrowBikeNet +---------------------- + +GrowBikeNet is built on top of OSMnx/NetworkX and GeoPandas. It takes one mandatory parameter, the city name, which it passes via `OSMnx `__ to `Nominatim `__, to download a city's street network. GrowBikeNet then runs the following operations: * Optional, also download the city's existing bicycle network. * Create seed points following :cite:t:`szell2022gub`. By default this is a grid, but it can also be set to the city's rail stations. If the city's existing bicycle network is used, the seed points are first selected on the bicycle network following :cite:t:`folco2023dmn`. @@ -16,8 +34,7 @@ GrowBikeNet takes one mandatory parameter, the city name, which it passes via `O * Optional, a video is generated in the results folder, using the plots as frames. -Quickstart contents -------------------- +Run the: .. toctree:: :maxdepth: 1 From 44ac9f82591253e76157b550402aba9f117c2382 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 21:58:25 +0200 Subject: [PATCH 03/25] Add source_repo, remove classes in API --- docs/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 92e7908..f0477f5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,6 +60,7 @@ html_theme_options = { "github_url": "https://github.com/BikeNetKit/GrowBikeNet", + "source_repository": "https://github.com/BikeNetKit/GrowBikeNet", "twitter_url": "notwitter.com", "pygment_light_style": "tango", "logo": { @@ -71,9 +72,9 @@ # Generate the API documentation when building autosummary_generate = True autosummary_imported_members = True -numpydoc_show_class_members = True -class_members_toctree = True -numpydoc_show_inherited_class_members = True +numpydoc_show_class_members = False +class_members_toctree = False +numpydoc_show_inherited_class_members = False numpydoc_class_members_toctree = False numpydoc_use_plots = True autodoc_typehints = "none" From 2341c09bc542833fb22b17608a2bf12c2f0f737d Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:09:21 +0200 Subject: [PATCH 04/25] Fix/Polish references and getting started --- docs/reference_developer.rst | 9 +++++++++ docs/reference_user.rst | 2 +- docs/usage/getting_started.rst | 19 +++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/reference_developer.rst b/docs/reference_developer.rst index cd9bee9..71aaf49 100644 --- a/docs/reference_developer.rst +++ b/docs/reference_developer.rst @@ -3,6 +3,15 @@ Developer reference This is the complete developer reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. +growbikenet.growbikenet +----------------------- + +.. automodule:: growbikenet.growbikenet + :members: + +growbikenet.functions +--------------------- + .. automodule:: growbikenet.functions :members: :private-members: diff --git a/docs/reference_user.rst b/docs/reference_user.rst index 757d1c6..93a5716 100644 --- a/docs/reference_user.rst +++ b/docs/reference_user.rst @@ -1,7 +1,7 @@ User reference ============== -This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. +This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`usage/getting_started` guide. .. automodule:: growbikenet.growbikenet :members: \ No newline at end of file diff --git a/docs/usage/getting_started.rst b/docs/usage/getting_started.rst index 0c8385f..e1a5b08 100644 --- a/docs/usage/getting_started.rst +++ b/docs/usage/getting_started.rst @@ -11,16 +11,16 @@ Get Started in 4 Steps 3. Run the :doc:`mwe`. -4. Consult the :doc:`reference_user` for complete details on using the package. +4. Consult the :doc:`./reference_user` for complete details on using the package. -Finally, if you're not already familiar with `NetworkX`_ and `GeoPandas`_, make sure you read their user guides as OSMnx uses their data structures. +Finally, if you're not already familiar with `NetworkX`_ and `GeoPandas`_, make sure you read their user guides as GrowBikeNet uses their data structures. .. _introducing-growbikenet: -Explaining GrowBikeNet ----------------------- +Introducing GrowBikeNet +----------------------- -GrowBikeNet is built on top of OSMnx/NetworkX and GeoPandas. It takes one mandatory parameter, the city name, which it passes via `OSMnx `__ to `Nominatim `__, to download a city's street network. GrowBikeNet then runs the following operations: +GrowBikeNet is built on top of `OSMnx`_/`NetworkX`_ and `GeoPandas`_. It takes one mandatory parameter, the city name, which it passes via `Nominatim`_ to `OSMnx`_, to download a city's street network. GrowBikeNet then runs the following operations: * Optional, also download the city's existing bicycle network. * Create seed points following :cite:t:`szell2022gub`. By default this is a grid, but it can also be set to the city's rail stations. If the city's existing bicycle network is used, the seed points are first selected on the bicycle network following :cite:t:`folco2023dmn`. @@ -35,7 +35,14 @@ GrowBikeNet is built on top of OSMnx/NetworkX and GeoPandas. It takes one mandat Run the: + .. toctree:: :maxdepth: 1 - Minimum working example \ No newline at end of file + Minimum working example + + +.. _GeoPandas: https://geopandas.org +.. _NetworkX: https://networkx.org +.. _OSMnx: https://osmnx.readthedocs.io +.. _Nominatim: https://nominatim.openstreetmap.org \ No newline at end of file From 11f45ec1cb474f4848828c9187e407ae9f8ac01f Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:11:08 +0200 Subject: [PATCH 05/25] Fix dev installation title --- docs/usage/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/installation.rst b/docs/usage/installation.rst index 300d6ae..37880cf 100644 --- a/docs/usage/installation.rst +++ b/docs/usage/installation.rst @@ -137,7 +137,7 @@ gbnenv) Development installation ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ If you want to develop the project, `clone this repository `__ From 2b066855172282adbeaaf8b9a6fea98b4e08da6c Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:21:05 +0200 Subject: [PATCH 06/25] Move docs source into new source subfolder --- docs/Makefile | 2 +- docs/api.rst | 17 ----------------- docs/{ => source}/_static/logo_eu.png | Bin .../_static/logo_innovationfund.png | Bin docs/{ => source}/_static/logo_juststreets.png | Bin docs/{ => source}/_static/references.bib | 0 docs/{ => source}/index.rst | 0 docs/{ => source}/reference_developer.rst | 0 docs/{ => source}/reference_user.rst | 2 +- docs/{ => source}/references.rst | 0 docs/{ => source}/usage/getting_started.rst | 2 +- docs/{ => source}/usage/installation.rst | 0 docs/{ => source}/usage/mwe.ipynb | 0 13 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 docs/api.rst rename docs/{ => source}/_static/logo_eu.png (100%) rename docs/{ => source}/_static/logo_innovationfund.png (100%) rename docs/{ => source}/_static/logo_juststreets.png (100%) rename docs/{ => source}/_static/references.bib (100%) rename docs/{ => source}/index.rst (100%) rename docs/{ => source}/reference_developer.rst (100%) rename docs/{ => source}/reference_user.rst (61%) rename docs/{ => source}/references.rst (100%) rename docs/{ => source}/usage/getting_started.rst (99%) rename docs/{ => source}/usage/installation.rst (100%) rename docs/{ => source}/usage/mwe.ipynb (100%) diff --git a/docs/Makefile b/docs/Makefile index d4bb2cb..92dd33a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = . +SOURCEDIR = source BUILDDIR = _build # Put it first so that "make" without argument is like "make help". diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 349f80f..0000000 --- a/docs/api.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _api_ref: - -.. automodule:: growbikenet - :members: - :undoc-members: - -.. currentmodule:: growbikenet - -growbikenet API reference -========================== - - -.. autosummary:: - :toctree: api/ - - growbikenet - functions \ No newline at end of file diff --git a/docs/_static/logo_eu.png b/docs/source/_static/logo_eu.png similarity index 100% rename from docs/_static/logo_eu.png rename to docs/source/_static/logo_eu.png diff --git a/docs/_static/logo_innovationfund.png b/docs/source/_static/logo_innovationfund.png similarity index 100% rename from docs/_static/logo_innovationfund.png rename to docs/source/_static/logo_innovationfund.png diff --git a/docs/_static/logo_juststreets.png b/docs/source/_static/logo_juststreets.png similarity index 100% rename from docs/_static/logo_juststreets.png rename to docs/source/_static/logo_juststreets.png diff --git a/docs/_static/references.bib b/docs/source/_static/references.bib similarity index 100% rename from docs/_static/references.bib rename to docs/source/_static/references.bib diff --git a/docs/index.rst b/docs/source/index.rst similarity index 100% rename from docs/index.rst rename to docs/source/index.rst diff --git a/docs/reference_developer.rst b/docs/source/reference_developer.rst similarity index 100% rename from docs/reference_developer.rst rename to docs/source/reference_developer.rst diff --git a/docs/reference_user.rst b/docs/source/reference_user.rst similarity index 61% rename from docs/reference_user.rst rename to docs/source/reference_user.rst index 93a5716..757d1c6 100644 --- a/docs/reference_user.rst +++ b/docs/source/reference_user.rst @@ -1,7 +1,7 @@ User reference ============== -This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`usage/getting_started` guide. +This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. .. automodule:: growbikenet.growbikenet :members: \ No newline at end of file diff --git a/docs/references.rst b/docs/source/references.rst similarity index 100% rename from docs/references.rst rename to docs/source/references.rst diff --git a/docs/usage/getting_started.rst b/docs/source/usage/getting_started.rst similarity index 99% rename from docs/usage/getting_started.rst rename to docs/source/usage/getting_started.rst index e1a5b08..d73636a 100644 --- a/docs/usage/getting_started.rst +++ b/docs/source/usage/getting_started.rst @@ -34,7 +34,7 @@ GrowBikeNet is built on top of `OSMnx`_/`NetworkX`_ and `GeoPandas`_. It takes o * Optional, a video is generated in the results folder, using the plots as frames. -Run the: +To try it out, run the: .. toctree:: :maxdepth: 1 diff --git a/docs/usage/installation.rst b/docs/source/usage/installation.rst similarity index 100% rename from docs/usage/installation.rst rename to docs/source/usage/installation.rst diff --git a/docs/usage/mwe.ipynb b/docs/source/usage/mwe.ipynb similarity index 100% rename from docs/usage/mwe.ipynb rename to docs/source/usage/mwe.ipynb From 62af3c981ab92c302ac8141dcb98d1affd0dd420 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:28:07 +0200 Subject: [PATCH 07/25] Simplify usage docs without usage folder --- docs/source/{usage => }/getting_started.rst | 3 +-- docs/source/index.rst | 15 +++++++-------- docs/source/{usage => }/installation.rst | 0 docs/source/{usage => }/mwe.ipynb | 0 4 files changed, 8 insertions(+), 10 deletions(-) rename docs/source/{usage => }/getting_started.rst (96%) rename docs/source/{usage => }/installation.rst (100%) rename docs/source/{usage => }/mwe.ipynb (100%) diff --git a/docs/source/usage/getting_started.rst b/docs/source/getting_started.rst similarity index 96% rename from docs/source/usage/getting_started.rst rename to docs/source/getting_started.rst index d73636a..ed0d6c9 100644 --- a/docs/source/usage/getting_started.rst +++ b/docs/source/getting_started.rst @@ -1,4 +1,3 @@ -=============== Getting started =============== @@ -11,7 +10,7 @@ Get Started in 4 Steps 3. Run the :doc:`mwe`. -4. Consult the :doc:`./reference_user` for complete details on using the package. +4. Consult the :doc:`reference_user` for complete details on using the package. Finally, if you're not already familiar with `NetworkX`_ and `GeoPandas`_, make sure you read their user guides as GrowBikeNet uses their data structures. diff --git a/docs/source/index.rst b/docs/source/index.rst index 28eae23..a96bf76 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,7 +3,6 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -=================================== GrowBikeNet |version| documentation =================================== @@ -21,9 +20,9 @@ paper `__ page. -To use GrowBikeNet, the `Getting started `__ page -is a good place to start, which also explains how the package works in detail. For technical documentation, consult the `User reference `__. +To set up GrowBikeNet, see the :doc:`installation` page. +To use GrowBikeNet, the :doc:`getting_started` page +is a good place to start, which also explains how the package works in detail. For technical documentation, consult the :doc:`reference_user`. .. Statement of need .. ================= @@ -64,8 +63,8 @@ Documentation contents :maxdepth: 1 Home - usage/installation - usage/getting_started - User reference - Developer reference + installation + getting_started + reference_user + reference_developer references diff --git a/docs/source/usage/installation.rst b/docs/source/installation.rst similarity index 100% rename from docs/source/usage/installation.rst rename to docs/source/installation.rst diff --git a/docs/source/usage/mwe.ipynb b/docs/source/mwe.ipynb similarity index 100% rename from docs/source/usage/mwe.ipynb rename to docs/source/mwe.ipynb From 1eefc680c494f278634f692eca43ce5621bea7c7 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:28:34 +0200 Subject: [PATCH 08/25] Fix typo --- docs/source/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 37880cf..d252fd3 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -148,6 +148,6 @@ and create the environment via the pixi init --import environment-dev.yml -The developemt environment is called ``gbnenvdev``. Make sure to also +The development environment is called ``gbnenvdev``. Make sure to also read `our contribution guidelines `__. From c5503720270e874219e547adb116d1b5243cd986 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:31:02 +0200 Subject: [PATCH 09/25] Fix source dir --- docs/make.bat | 2 +- docs/source/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/make.bat b/docs/make.bat index 32bb245..83cf06c 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,7 +7,7 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=. +set SOURCEDIR=source set BUILDDIR=_build %SPHINXBUILD% >NUL 2>NUL diff --git a/docs/source/index.rst b/docs/source/index.rst index a96bf76..19d4048 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -60,7 +60,7 @@ and the EU HORIZON grant JUST STREETS. Documentation contents ====================== .. toctree:: - :maxdepth: 1 + :maxdepth: 2 Home installation From ce790ec7c846ebe1fbd47b34298da33dc672c0e9 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:39:14 +0200 Subject: [PATCH 10/25] Move conf and load version dynamically --- docs/{ => source}/conf.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename docs/{ => source}/conf.py (94%) diff --git a/docs/conf.py b/docs/source/conf.py similarity index 94% rename from docs/conf.py rename to docs/source/conf.py index f0477f5..49e10e0 100644 --- a/docs/conf.py +++ b/docs/source/conf.py @@ -15,13 +15,16 @@ import os # noqa import sys # noqa +from pathlib import Path # noqa +from tomllib import load as toml_load # noqa sys.path.insert(0, os.path.abspath("..")) import growbikenet # noqa -# version = growbikenet.__version__ -version = "0.8.0" -release = version +# dynamically load version +with Path("../../pyproject.toml").open("rb") as f: + pyproject = toml_load(f) +version = release = pyproject["project"]["version"] # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -55,7 +58,6 @@ html_static_path = ["_static"] ### select html theme -# html_theme = 'alabaster' html_theme = "furo" html_theme_options = { From aa251731d28acd77e306d9158e82ffa92db752f1 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:50:14 +0200 Subject: [PATCH 11/25] Add source and uv to docs.yml --- .github/workflows/docs.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8bd1d31..0058f36 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,20 +41,19 @@ jobs: run: shell: bash -el {0} steps: - - name: Check if GHSL site is under maintenance - run: | - content=$(curl -s https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/GHSL/) - if echo "$content" | grep -q "Under Maintenance"; then - echo "GHSL site is under maintenance. Exiting." - exit 1 - fi - - name: Check out Git repository uses: actions/checkout@v6 - name: Get week number run: echo "WEEK=$(date +'%V')" >> $GITHUB_ENV + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + cache-dependency-glob: pyproject.toml + enable-cache: true + python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} uses: mamba-org/setup-micromamba@v2 with: @@ -64,12 +63,12 @@ jobs: cache-environment-key: W${{ env.WEEK }} - name: Add Notebook Kernel - run: python -m ipykernel install --user --name growbikenet --display-name "Python (growbikenet)" + run: uv python -m ipykernel install --user --name growbikenet --display-name "Python (growbikenet)" - - name: Generating .rst files - run: sphinx-apidoc -o docs/api/ growbikenet/ + # - name: Generating .rst files + # run: uv run sphinx-apidoc -o docs/api/ growbikenet/ - name: Generating html - run: sphinx-build docs public -b dirhtml + run: uv run sphinx-build docs/source/ public -b dirhtml - name: Setup Pages uses: actions/configure-pages@v5 From 97e0c05e6ad92f76a1bdc2b4005487bded53f7ff Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:52:03 +0200 Subject: [PATCH 12/25] Remove uv --- .github/workflows/docs.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0058f36..c262c0a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -47,13 +47,6 @@ jobs: - name: Get week number run: echo "WEEK=$(date +'%V')" >> $GITHUB_ENV - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - cache-dependency-glob: pyproject.toml - enable-cache: true - python-version: ${{ matrix.python-version }} - - name: Set up Python ${{ matrix.python-version }} uses: mamba-org/setup-micromamba@v2 with: @@ -63,12 +56,12 @@ jobs: cache-environment-key: W${{ env.WEEK }} - name: Add Notebook Kernel - run: uv python -m ipykernel install --user --name growbikenet --display-name "Python (growbikenet)" + run: python -m ipykernel install --user --name growbikenet --display-name "Python (growbikenet)" # - name: Generating .rst files - # run: uv run sphinx-apidoc -o docs/api/ growbikenet/ + # run: sphinx-apidoc -o docs/api/ growbikenet/ - name: Generating html - run: uv run sphinx-build docs/source/ public -b dirhtml + run: sphinx-build docs/source/ public -b dirhtml - name: Setup Pages uses: actions/configure-pages@v5 From 375f5f076fbeeab428cdb4fc44c036622c48de71 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 22:56:42 +0200 Subject: [PATCH 13/25] Fix index headers --- docs/source/index.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 19d4048..b351a85 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,7 @@ paper `__: M. Szell, S. Mimar, T. Perlman, G. Ghoshal, R. Sinatra. Growing urban bicycle networks. Scientific Reports 12, 6765 (2022). https://doi.org/10.1038/s41598-022-10783-y Contributing -============ +------------ + If you want to contribute to the development of GrowBikeNet, please read the `CONTRIBUTING.md `__ file. Supported by -============ +------------ Development of BikeNetKit/GrowBikeNet was supported by the Innovation Fund Denmark and the EU HORIZON grant JUST STREETS. @@ -58,9 +60,10 @@ and the EU HORIZON grant JUST STREETS. Documentation contents -====================== +---------------------- + .. toctree:: - :maxdepth: 2 + :maxdepth: 1 Home installation From c7821d8438bbe22a75106234dcc9a6afb41f844d Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 23:05:28 +0200 Subject: [PATCH 14/25] Change link colors to green --- docs/source/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 49e10e0..e0868a8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,6 +69,14 @@ "image_light": "logo.png", "image_dark": "logo.png", }, + "light_css_variables": { + "color-brand-primary": "#096a51", + "color-brand-content": "#096a51", + }, + "dark_css_variables": { + "color-brand-primary": "#3cd71d", + "color-brand-content": "#3cd71d", + }, } # Generate the API documentation when building From f7872aeff53253246d02f306ce13b27c984de29b Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 23:07:58 +0200 Subject: [PATCH 15/25] Add footer github icon --- docs/source/conf.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e0868a8..a466a1e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -61,9 +61,6 @@ html_theme = "furo" html_theme_options = { - "github_url": "https://github.com/BikeNetKit/GrowBikeNet", - "source_repository": "https://github.com/BikeNetKit/GrowBikeNet", - "twitter_url": "notwitter.com", "pygment_light_style": "tango", "logo": { "image_light": "logo.png", @@ -77,6 +74,18 @@ "color-brand-primary": "#3cd71d", "color-brand-content": "#3cd71d", }, + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/BikeNetKit/GrowBikeNet", + "html": """ + + + + """, + "class": "", + }, + ], } # Generate the API documentation when building From 33e1b23e13591218ad012da58186d9a263ddce0a Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Sun, 24 May 2026 23:14:28 +0200 Subject: [PATCH 16/25] Update color for link visited --- docs/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index a466a1e..c867d05 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,10 +69,12 @@ "light_css_variables": { "color-brand-primary": "#096a51", "color-brand-content": "#096a51", + "color-brand-visited": "#5b8b75", }, "dark_css_variables": { "color-brand-primary": "#3cd71d", "color-brand-content": "#3cd71d", + "color-brand-visited": "#5b8b75", }, "footer_icons": [ { From 59f66ea549feb88df50b83921564582f9e251201 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 08:09:43 +0200 Subject: [PATCH 17/25] Fix static links --- README.md | 2 +- docs/source/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9020913..16d56ac 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,6 @@ Find more information in our docs: [https://bikenetkit.github.io/GrowBikeNet/](h ## Supported by Development of BikeNetKit/GrowBikeNet was supported by the Innovation Fund Denmark and the EU HORIZON grant JUST STREETS. -[![Innovation Fund Denmark](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/_static/logo_innovationfund.png)](https://innovationsfonden.dk/en)    [![European Union](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/_static/logo_eu.png)](https://commission.europa.eu/index_en)   [![JUST STREETS](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/_static/logo_juststreets.png)](https://www.just-streets.eu/) +[![Innovation Fund Denmark](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/source/_static/logo_innovationfund.png)](https://innovationsfonden.dk/en)    [![European Union](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/source/_static/logo_eu.png)](https://commission.europa.eu/index_en)   [![JUST STREETS](https://raw.githubusercontent.com/BikeNetKit/GrowBikeNet/refs/heads/main/docs/source/_static/logo_juststreets.png)](https://www.just-streets.eu/) diff --git a/docs/source/index.rst b/docs/source/index.rst index b351a85..fcc2a6d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -32,7 +32,7 @@ is a good place to start, which also explains how the package works in detail. F How to cite ----------- -If you use `growbikenet` in your research, please cite the paper `doi:10.1038/s41598-022-10783-y `__: +If you use `growbikenet` in your research, please cite `the paper `__: M. Szell, S. Mimar, T. Perlman, G. Ghoshal, R. Sinatra. Growing urban bicycle networks. Scientific Reports 12, 6765 (2022). https://doi.org/10.1038/s41598-022-10783-y From dbcd55e5ca377e676eab698ed600f17c81eead5f Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 09:01:42 +0200 Subject: [PATCH 18/25] Polish docs --- docs/source/index.rst | 4 ++-- docs/source/reference_user.rst | 2 ++ growbikenet/growbikenet.py | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index fcc2a6d..b51d08c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,7 +6,7 @@ GrowBikeNet |version| documentation =================================== -The Python package `growbikenet` grows an urban bicycle network from scratch or from an existing bicycle network. It is hosted on `Github `__, part of `BikeNetKit `__. +The Python package ``growbikenet`` grows an urban bicycle network from scratch or from an existing bicycle network. It is hosted on `Github `__, part of `BikeNetKit `__. The software downloads and pre-processes data from OpenStreetMap, prepares seed points to connect, runs simulations, saves the results, @@ -32,7 +32,7 @@ is a good place to start, which also explains how the package works in detail. F How to cite ----------- -If you use `growbikenet` in your research, please cite `the paper `__: +If you use GrowBikeNet in your research, please cite `the paper `__: M. Szell, S. Mimar, T. Perlman, G. Ghoshal, R. Sinatra. Growing urban bicycle networks. Scientific Reports 12, 6765 (2022). https://doi.org/10.1038/s41598-022-10783-y diff --git a/docs/source/reference_user.rst b/docs/source/reference_user.rst index 757d1c6..5a788d6 100644 --- a/docs/source/reference_user.rst +++ b/docs/source/reference_user.rst @@ -3,5 +3,7 @@ User reference This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. +The standard way to import the growbikenet package is via ``import growbikenet as gbn``. The main ``growbikenet()`` function below is then called via ``gbn.growbikenet()``, see the :doc:`mwe`. + .. automodule:: growbikenet.growbikenet :members: \ No newline at end of file diff --git a/growbikenet/growbikenet.py b/growbikenet/growbikenet.py index de41aed..bcfcbda 100644 --- a/growbikenet/growbikenet.py +++ b/growbikenet/growbikenet.py @@ -44,39 +44,39 @@ def growbikenet( allow_edge_overlaps=False, city_boundary_file=None, ): - """Creates a list of edges ordered by a specified ranking method. + """Creates a list of urban street network edges ordered by a ranking method. - The edges form a subnetwork of a city's street network, interpreted as a growing bicycle network following [1]_. By default, growth is from scratch, but the existing bicycle network can also be used as a starting point[2]_. Note that the original paper [1]_ uses minimum weight triangulation, but Delaunay triangulation is much faster due to the Delaunay scipy function and gives in most cases identical results. Triangulation and metrics (betweenness, closeness) are calculated for the abstract network for which egde lengths are taken from the routed network. + The edges form a subnetwork of a city's street network, interpreted as a growing bicycle network following [1]_. By default, growth is from scratch, but the existing bicycle network can also be used as a starting point[2]_. The original paper [1]_ uses minimum weight triangulation, but Delaunay triangulation is implemented much faster and in practice gives identical results. Triangulation and metrics (betweenness, closeness) are calculated for the abstract network for which egde lengths are taken from the routed network. Parameters ---------- city_name : str Name of the city that the analysis should be performed on. This is the query string used to fetch the data from nominatim. Overruled (for data fetching) if city_boundary_file is set. - proj_crs : str, default '3857' + proj_crs : str, optional, default '3857' Coordinate reference system that is used to project osm data. Default is '3857' (WGS 84 / Pseudo-Mercator). If this web mercator projection is not needed, then for Europe '3035' (LAEA) and globally '54035' (Equal Earth) is better. - ranking : str, default 'betweenness_centrality' + ranking : str, optional, default 'betweenness_centrality' Method used to rank edges. Must be 'betweenness_centrality' (default), 'closeness_centrality', or 'random'. seed_point_type : str, optional, default 'grid' - If set to 'grid', creates a square grid - If set to 'rail', uses rail stations + If set to 'grid', creates a square grid. + If set to 'rail', uses rail stations. seed_point_grid_spacing : int, optional, default 1707 - If seed_point_type is set to 'grid', this is the spacing between seed points, in meters + If seed_point_type is set to 'grid', this is the spacing between seed points, in meters. seed_point_delta : int, optional, default 500 - Maximum distance between generated seed points and osm nodes for snapping + Maximum distance between generated seed points and osm nodes for snapping, in meters. existing_network_spacing : int, optional, default None Spacing between seed points, in meters, only on the existing bicycle network. If not set to a positive integer, the existing network is ignored. export_data : bool, optional, default True - If set to True, data will be saved to a file. The filename is [slug]-[ranking]-[seed_point_type].gpkg, where slug is a string id made out of city_name. + If set to True, data is saved to a file. The filename is [slug]-[ranking]-[seed_point_type].[export_file_format], where slug is a string id made out of city_name. export_data_slug : str, optional, default None - If not set to None, the city_name will be slugified and used as the slug in the filename of the data export + If not set to None, the city_name will be slugified and used as the slug in the filename of the data export. export_file_format : str, optional, default "geojson" File format for the data export, relevant if export_data set to True. Default "geojson", also possible "gpkg". If exporting as geojson, generates extra files for seed points and city boundary. If exporting as gkpg, these are added all in one file as extra layers. export_plots : bool, optional, default False - If set to True, plots will be saved to files. Will overwrite previous files. + If set to True, plots are saved to files, overwriting existing ones. export_video : bool, optional, default False - If set to True, video will be saved to a file (only possible if export_plots is set to True). Will overwrite previous files. + If set to True, video is saved to file (only possible if export_plots is set to True), overwriting existing ones. allow_edge_overlaps : bool, default False - If set to False, removes edge overlaps in consecutive growth stages. In this case, growth stages that do not add anything new are deleted. + If set to False, removes edge overlaps in consecutive growth stages and deketed growth stages that do not add anything new. city_boundary_file : (str | None), default None If not set to None, the study area will be selected from the (Multi)Polygon provided in the city_boundary_file shape file, ideally in unprojected latitude-longitude degrees (EPSG:4326), but EPSG:3857 also works. For example, "./tests/test_data/copenhagen.shp". From 12464c5bb372a1eef181600a26c1d18f9a47cc37 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 09:03:02 +0200 Subject: [PATCH 19/25] Fix capitalization --- docs/source/reference_user.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/reference_user.rst b/docs/source/reference_user.rst index 5a788d6..27bbeb6 100644 --- a/docs/source/reference_user.rst +++ b/docs/source/reference_user.rst @@ -3,7 +3,7 @@ User reference This is the user reference for the GrowBikeNet package. If you are looking for an introduction to GrowBikeNet, read the :doc:`getting_started` guide. -The standard way to import the growbikenet package is via ``import growbikenet as gbn``. The main ``growbikenet()`` function below is then called via ``gbn.growbikenet()``, see the :doc:`mwe`. +The standard way to import the GrowBikeNet package is via ``import growbikenet as gbn``. The main ``growbikenet()`` function below is then called via ``gbn.growbikenet()``, see the :doc:`mwe`. .. automodule:: growbikenet.growbikenet :members: \ No newline at end of file From 39d583d22ab3864e68d5c1c34a7eb26502972267 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 11:16:05 +0200 Subject: [PATCH 20/25] Polish user feedback and mwe --- docs/source/mwe.ipynb | 67 ++++++++++++++++++++++++++++++-------- examples/mwe.ipynb | 67 ++++++++++++++++++++++++++++++-------- examples/mwe.py | 13 +------- growbikenet/functions.py | 3 +- growbikenet/growbikenet.py | 14 ++++++-- 5 files changed, 119 insertions(+), 45 deletions(-) diff --git a/docs/source/mwe.ipynb b/docs/source/mwe.ipynb index 0ddcb13..2a5c096 100644 --- a/docs/source/mwe.ipynb +++ b/docs/source/mwe.ipynb @@ -5,8 +5,8 @@ "id": "0", "metadata": {}, "source": [ - "## Minimum working example\n", - "This notebook runs a minimum working example with growbikenet" + "# Minimum working example\n", + "This notebook runs a minimum working example with growbikenet." ] }, { @@ -14,7 +14,15 @@ "id": "1", "metadata": {}, "source": [ - "### Import growbikenet" + "## Import growbikenet" + ] + }, + { + "cell_type": "markdown", + "id": "66e59357-7987-4e0c-b5fa-8a261d3fedec", + "metadata": {}, + "source": [ + "The standard way of importing growbikenet:" ] }, { @@ -32,7 +40,7 @@ "id": "3", "metadata": {}, "source": [ - "### Run growbikenet with example city Bath and rank by betweenness centrality" + "## Run growbikenet on example city" ] }, { @@ -42,22 +50,53 @@ "metadata": {}, "outputs": [], "source": [ - "a_edges = gbn.growbikenet(\n", - " city_name=\"Bath\",\n", - " proj_crs=\"3857\",\n", - " ranking=\"betweenness_centrality\",\n", - " export_data=True,\n", - " export_plots=False,\n", - " export_video=False,\n", - ")" + "edges_ranked = gbn.growbikenet(\"Lyon\")" + ] + }, + { + "cell_type": "markdown", + "id": "4a20e33e-3bfa-4578-b21e-83e0a0b5993b", + "metadata": {}, + "source": [ + "## Explore results" + ] + }, + { + "cell_type": "markdown", + "id": "039083d0-91f3-42cc-a377-9e555b25d6ca", + "metadata": {}, + "source": [ + "See the contents of the resulting geodataframe:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec409ae0-4974-4ccb-984c-06c680a2c1a1", + "metadata": {}, + "outputs": [], + "source": [ + "edges_ranked.head()" ] }, { "cell_type": "markdown", - "id": "5", + "id": "bcd2409f-bac6-4e7c-89e9-d8c229eb36d2", "metadata": {}, "source": [ - "data is saved in .examples/" + "Explore the results interactively:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fac59916-d789-4e4d-8415-81dd962e8fbb", + "metadata": {}, + "outputs": [], + "source": [ + "edges_ranked.explore(tiles=\"CartoDB Positron\", # background map\n", + " style_kwds={\"weight\": 4, \"color\": \"#096a51\"}, # thick green lines\n", + " )" ] } ], diff --git a/examples/mwe.ipynb b/examples/mwe.ipynb index 0ddcb13..2a5c096 100644 --- a/examples/mwe.ipynb +++ b/examples/mwe.ipynb @@ -5,8 +5,8 @@ "id": "0", "metadata": {}, "source": [ - "## Minimum working example\n", - "This notebook runs a minimum working example with growbikenet" + "# Minimum working example\n", + "This notebook runs a minimum working example with growbikenet." ] }, { @@ -14,7 +14,15 @@ "id": "1", "metadata": {}, "source": [ - "### Import growbikenet" + "## Import growbikenet" + ] + }, + { + "cell_type": "markdown", + "id": "66e59357-7987-4e0c-b5fa-8a261d3fedec", + "metadata": {}, + "source": [ + "The standard way of importing growbikenet:" ] }, { @@ -32,7 +40,7 @@ "id": "3", "metadata": {}, "source": [ - "### Run growbikenet with example city Bath and rank by betweenness centrality" + "## Run growbikenet on example city" ] }, { @@ -42,22 +50,53 @@ "metadata": {}, "outputs": [], "source": [ - "a_edges = gbn.growbikenet(\n", - " city_name=\"Bath\",\n", - " proj_crs=\"3857\",\n", - " ranking=\"betweenness_centrality\",\n", - " export_data=True,\n", - " export_plots=False,\n", - " export_video=False,\n", - ")" + "edges_ranked = gbn.growbikenet(\"Lyon\")" + ] + }, + { + "cell_type": "markdown", + "id": "4a20e33e-3bfa-4578-b21e-83e0a0b5993b", + "metadata": {}, + "source": [ + "## Explore results" + ] + }, + { + "cell_type": "markdown", + "id": "039083d0-91f3-42cc-a377-9e555b25d6ca", + "metadata": {}, + "source": [ + "See the contents of the resulting geodataframe:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec409ae0-4974-4ccb-984c-06c680a2c1a1", + "metadata": {}, + "outputs": [], + "source": [ + "edges_ranked.head()" ] }, { "cell_type": "markdown", - "id": "5", + "id": "bcd2409f-bac6-4e7c-89e9-d8c229eb36d2", "metadata": {}, "source": [ - "data is saved in .examples/" + "Explore the results interactively:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fac59916-d789-4e4d-8415-81dd962e8fbb", + "metadata": {}, + "outputs": [], + "source": [ + "edges_ranked.explore(tiles=\"CartoDB Positron\", # background map\n", + " style_kwds={\"weight\": 4, \"color\": \"#096a51\"}, # thick green lines\n", + " )" ] } ], diff --git a/examples/mwe.py b/examples/mwe.py index 5edb738..d68184e 100644 --- a/examples/mwe.py +++ b/examples/mwe.py @@ -2,15 +2,4 @@ import growbikenet as gbn -a_edges = gbn.growbikenet( - city_name="Oelde", - ranking="betweenness_centrality", - existing_network_spacing=None, - export_file_format="gpkg", - export_data=True, - export_plots=False, - export_video=False, - allow_edge_overlaps=False, -) - -# data is saved in current working directory +edges_ranked = gbn.growbikenet("Lyon") diff --git a/growbikenet/functions.py b/growbikenet/functions.py index 21f7c11..b199a59 100644 --- a/growbikenet/functions.py +++ b/growbikenet/functions.py @@ -1,5 +1,4 @@ -"""Utility functions for growbikenet -""" +"""Utility functions for growbikenet.""" import numpy as np import pandas as pd diff --git a/growbikenet/growbikenet.py b/growbikenet/growbikenet.py index bcfcbda..920d4c7 100644 --- a/growbikenet/growbikenet.py +++ b/growbikenet/growbikenet.py @@ -333,7 +333,7 @@ def growbikenet( if export_data: ### save data pbar = tqdm( - desc="{:<23}".format("Saving data"), + desc="{:<23}".format("Exporting data"), total=1, unit="step", bar_format='{l_bar}{bar:16}{r_bar}', @@ -389,9 +389,17 @@ def growbikenet( os.makedirs("./results/plots/ordering_"+ranking+"/video/", exist_ok=True) make_video(img_folder_name="./results/plots/ordering_"+ranking+"/", fps=5) - endtime = time.time() - print("----------------------------------------------╯") + if export_data: + print("Data exported to results/") + if export_plots: + print("Plots exported to results/plots/") + if export_video: + print("Video exported to results/plots/") + if export_data or export_plots or export_video: + print("-----------------------------------------------") + + endtime = time.time() print("FINISHED IN " + str(datetime.timedelta(seconds = round(endtime - starttime)))) print("==============================================") From 4854945f305e2edf562f5a9cd8ad14df87a6344d Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 11:48:14 +0200 Subject: [PATCH 21/25] Remove binder link for now, fix docs link --- docs/source/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c867d05..f18a51f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -112,9 +112,8 @@ .. note:: | This page was generated from `{{ docname }}`__. - | Interactive online version: :raw-html:`Binder badge` - __ https://github.com/BikeNetKit/GrowBikeNet/blob/master/docs/{{ docname }} + __ https://github.com/BikeNetKit/GrowBikeNet/blob/main/docs/source/{{ docname }} """ # noqa: E501 From b20595cdd723957c599cec6cab07a9df138783ae Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 11:53:59 +0200 Subject: [PATCH 22/25] Add a new social footer icon --- docs/source/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index f18a51f..6fded6a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -87,6 +87,16 @@ """, "class": "", }, + { + "name": "Bluesky", + "url": "https://bsky.app/profile/bikenetkit.bsky.social", + "html": """ + + + + """, + "class": "", + }, ], } From 6a04dbb02c537d099d48bc1635451708d2f0b549 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 12:24:46 +0200 Subject: [PATCH 23/25] Polish social icon --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6fded6a..e5a89f4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -91,8 +91,8 @@ "name": "Bluesky", "url": "https://bsky.app/profile/bikenetkit.bsky.social", "html": """ - - + + """, "class": "", From 3e67f836fb72bd992a00c2a69d11264c6c6c2de7 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 12:25:22 +0200 Subject: [PATCH 24/25] Change footer icon order --- docs/source/conf.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e5a89f4..5622d9c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,21 +78,21 @@ }, "footer_icons": [ { - "name": "GitHub", - "url": "https://github.com/BikeNetKit/GrowBikeNet", + "name": "Bluesky", + "url": "https://bsky.app/profile/bikenetkit.bsky.social", "html": """ - - + + """, "class": "", }, { - "name": "Bluesky", - "url": "https://bsky.app/profile/bikenetkit.bsky.social", + "name": "GitHub", + "url": "https://github.com/BikeNetKit/GrowBikeNet", "html": """ - - + + """, "class": "", From e32ebb0cfe53e2bb9130fccfaa0acb039d0bc463 Mon Sep 17 00:00:00 2001 From: Michael Szell Date: Mon, 25 May 2026 12:32:15 +0200 Subject: [PATCH 25/25] Simplify rank column name --- growbikenet/functions.py | 8 ++++---- tests/test_functions.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/growbikenet/functions.py b/growbikenet/functions.py index b199a59..b3a1135 100644 --- a/growbikenet/functions.py +++ b/growbikenet/functions.py @@ -694,16 +694,16 @@ def rank_df(df, method): Dataframe sorted by specified ranking method. """ if method == "random": # ranking is random - df["ordering_random"] = np.random.permutation(np.arange(df.shape[0])) - df = df.sort_values(by="ordering_random", ascending=False) + df["rank"] = np.random.permutation(np.arange(df.shape[0])) + df = df.sort_values(by="rank", ascending=False) df.reset_index(drop=True, inplace=True) - df["ordering_" + method] = ( + df["rank"] = ( df.index ) else: # ranking is the order of appearance in the method's ranking df = df.sort_values(by=method, ascending=False) df.reset_index(drop=True, inplace=True) - df["ordering_" + method] = ( + df["rank"] = ( df.index ) return df diff --git a/tests/test_functions.py b/tests/test_functions.py index d5c9331..b5bc8e2 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -39,7 +39,7 @@ def test_data_rank(method): @pytest.fixture def validation_data_rank(method): ranked_df = pd.DataFrame( - ([6, 0], [4, 1], [2, 2]), columns=[method, "ordering_betweenness_centrality"] + ([6, 0], [4, 1], [2, 2]), columns=[method, "rank"] ) return ranked_df