From ec8d6e6ba353966bbce4f6e72132987316a56cb8 Mon Sep 17 00:00:00 2001 From: Nicholas Reinicke Date: Thu, 12 Dec 2024 14:06:53 -0700 Subject: [PATCH] Rename notebooks so they get executed in order --- .github/workflows/deploy-docs.yaml | 2 +- docs/_toc.yml | 6 +++--- docs/config.md | 10 +++++----- ..._maps_example.py => 01_open_street_maps_example.py} | 2 +- ..._example.py => 02_different_powertrains_example.py} | 4 ++-- ...f_example.py => 03_time_energy_tradeoff_example.py} | 2 +- docs/installation.md | 2 +- docs/intro.md | 2 +- docs/running.md | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) rename docs/examples/{open_street_maps_example.py => 01_open_street_maps_example.py} (99%) rename docs/examples/{different_powertrains_example.py => 02_different_powertrains_example.py} (95%) rename docs/examples/{time_energy_tradeoff_example.py => 03_time_energy_tradeoff_example.py} (97%) diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index 34d7f3c5..7d5cdb47 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -25,7 +25,7 @@ jobs: - name: Install package run: | conda install -c conda-forge osmnx - pip install ".[dev]" + pip install ".[all]" - name: Build book working-directory: ${{runner.workspace}}/routee-compass/docs/ diff --git a/docs/_toc.yml b/docs/_toc.yml index 03ac1a4f..10218efe 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -11,9 +11,9 @@ parts: - caption: Examples chapters: - - file: examples/open_street_maps_example - - file: examples/different_powertrains_example - - file: examples/time_energy_tradeoff_example + - file: examples/01_open_street_maps_example + - file: examples/02_different_powertrains_example + - file: examples/03_time_energy_tradeoff_example - caption: User Reference chapters: diff --git a/docs/config.md b/docs/config.md index 7fdb2081..0efa2af7 100644 --- a/docs/config.md +++ b/docs/config.md @@ -3,7 +3,7 @@ Each `CompassApp` instance is defined by a configuration toml file. The configuration file specifies things like "Which traversal model should I use, and what are its parameters?" and "Which data sources should I use?". -If you follow the [open street maps example](examples/open_street_maps_example), the code will produce a few configuration files in the `golden_co/` folder. Let's take a look at the `osm_default_energy.toml` file. +If you follow the [open street maps example](examples/01_open_street_maps_example), the code will produce a few configuration files in the `golden_co/` folder. Let's take a look at the `osm_default_energy.toml` file. We added some annotations to describe the different sections: ```toml @@ -175,7 +175,7 @@ type = "vertex" # # instead use the graph vertex coordinates to build map geometries # # which produces far simpler route sequences as a result. # geometry_input_file = "edges-geometries-enumerated.txt.gz" - + # # optional query distance tolerance for map matching. # tolerance.distance = 15.0 # tolerance.unit = "meters" @@ -186,7 +186,7 @@ type = "vertex" # # the default map input type is a combined strategy that attempts to # # match by Point, otherwise expects the user to pass either a vertex ({origin|destination}_vertex) -# # or an edge ({origin|destination}_edge). a more restrictive strategy can be +# # or an edge ({origin|destination}_edge). a more restrictive strategy can be # # specified here with a subset of these values or a single value such as "point". # matching_type = ["point", "edge_id", "vertex_id"] ``` @@ -201,7 +201,7 @@ As opposed to vertex-oriented mapping, the edge-oriented will additionally apply [mapping] type = "edge" geometry_input_file = "edges-geometries-enumerated.txt.gz" - + # # optional query distance tolerance for map matching. # tolerance.distance = 15.0 # tolerance.unit = "meters" @@ -212,7 +212,7 @@ geometry_input_file = "edges-geometries-enumerated.txt.gz" # # the default map input type is a combined strategy that attempts to # # match by Point, otherwise expects the user to pass either a vertex ({origin|destination}_vertex) -# # or an edge ({origin|destination}_edge). a more restrictive strategy can be +# # or an edge ({origin|destination}_edge). a more restrictive strategy can be # # specified here with a subset of these values or a single value such as "point". # matching_type = ["point", "edge_id", "vertex_id"] ``` diff --git a/docs/examples/open_street_maps_example.py b/docs/examples/01_open_street_maps_example.py similarity index 99% rename from docs/examples/open_street_maps_example.py rename to docs/examples/01_open_street_maps_example.py index c385141d..082c9aaa 100644 --- a/docs/examples/open_street_maps_example.py +++ b/docs/examples/01_open_street_maps_example.py @@ -1,5 +1,5 @@ """ -# OpenStreetMap example +# OpenStreetMap Example In this example, we download a road network from OSM using the OSMNx package, and then process the result, resulting in a RouteE Compass network dataset. diff --git a/docs/examples/different_powertrains_example.py b/docs/examples/02_different_powertrains_example.py similarity index 95% rename from docs/examples/different_powertrains_example.py rename to docs/examples/02_different_powertrains_example.py index 0654e58e..a7f33da9 100644 --- a/docs/examples/different_powertrains_example.py +++ b/docs/examples/02_different_powertrains_example.py @@ -3,7 +3,7 @@ In this example, we'll showcase how you can run different powertrain technologies. -This builds off of the [Open Street Maps Example](open_street_maps_example) and assumes that we've already downloaded a road network so be sure to check that one out first. +This builds off of the [Open Street Maps Example](01_open_street_maps_example) and assumes that we've already downloaded a road network so be sure to check that one out first. """ # %% @@ -18,7 +18,7 @@ ### Load Application -Here, we'll load our application from the config file that was built in the [Open Street Maps Example](open_street_maps_example) +Here, we'll load our application from the config file that was built in the [Open Street Maps Example](01_open_street_maps_example) """ # %% diff --git a/docs/examples/time_energy_tradeoff_example.py b/docs/examples/03_time_energy_tradeoff_example.py similarity index 97% rename from docs/examples/time_energy_tradeoff_example.py rename to docs/examples/03_time_energy_tradeoff_example.py index 780d4e4e..28457659 100644 --- a/docs/examples/time_energy_tradeoff_example.py +++ b/docs/examples/03_time_energy_tradeoff_example.py @@ -3,7 +3,7 @@ In this example, we'll demonstrate how to use RouteE Compass to compare the tradeoffs between time and energy consumption. -This builds off the [Open Street Maps Example](open_street_maps_example) and assumes that we've already downloaded a road network so be sure to check that one out first. +This builds off the [Open Street Maps Example](01_open_street_maps_example) and assumes that we've already downloaded a road network so be sure to check that one out first. """ # %% diff --git a/docs/installation.md b/docs/installation.md index bca5c7e6..6b668010 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -26,7 +26,7 @@ You can also just directly install the package directly with [pip](https://pypi. pip install nrel.routee.compass ``` -This is useful if you already have a road network dataset (see [here](examples/open_street_maps_example)) on your system and you just want to compute routes. +This is useful if you already have a road network dataset (see [here](examples/01_open_street_maps_example)) on your system and you just want to compute routes. (python-from-source)= diff --git a/docs/intro.md b/docs/intro.md index 0c9ea38d..f86aeffb 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -9,4 +9,4 @@ RouteE Compass is an energy-aware routing engine for the RouteE ecosystem of sof ## Quickstart 1. Follow the [install instructions](conda-install) for the python package. -1. Follow this [example](examples/open_street_maps_example) to start routing over Open Street Maps data. +1. Follow this [example](examples/01_open_street_maps_example) to start routing over Open Street Maps data. diff --git a/docs/running.md b/docs/running.md index b869bc78..7d95e0b3 100644 --- a/docs/running.md +++ b/docs/running.md @@ -24,7 +24,7 @@ query = { result = app.run(query) ``` -For a more detailed example, head [here](examples/open_street_maps_example). +For a more detailed example, head [here](examples/01_open_street_maps_example). ## Command line application