-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
2,850 additions
and
176 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will install Python dependencies and run only integration tests | ||
# This is a standalone runner such that if integration testing fails it does not | ||
# impact other runners. | ||
# Fixing OS version to avoid breaking OS changes during development stage. | ||
# Will open up OS versions before release. | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: MacOS Integration Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "dev", "main" ] | ||
|
||
jobs: | ||
build: | ||
name: Integration | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: ["macos-12"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Install java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: Check Java Install | ||
run: | | ||
java --version | ||
- name: Install mac depencies with brew # not updating brew version, issue with aom | ||
run: | | ||
brew install geos | ||
brew install osmosis | ||
shell: sh | ||
- name: Run Integration Tests Only | ||
run: | | ||
pytest -m runinteg --runinteg --ignore tests/analyse_network --deselect tests/gtfs/test_gtfs_utils.py::TestBboxFilterGtfs::test_bbox_filter_gtfs_to_date_builds_network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will install Python dependencies and run tests on Linux OS. | ||
# Fixing OS version to avoid breaking OS changes during development stage. | ||
# Will open up OS versions before release. | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Linux Full Test Suite | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "dev", "main" ] | ||
|
||
jobs: | ||
build: | ||
name: Full | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: ["ubuntu-22.04"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Install java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: Check Java Install | ||
run: | | ||
java --version | ||
- name: Install linux depencies with apt | ||
run: | | ||
sudo apt update | ||
sudo apt install -y libgeos-dev | ||
sudo apt install -y osmosis | ||
shell: sh | ||
- name: Test with pytest | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow will install OS dependencies and run a 'base' set of unit tests with Python 3.9 | ||
# The base set is selected based on dependencies that have previously caused issues on Windows | ||
# Will look to open up the windows test suite in the future. | ||
# Fixing OS version to avoid breaking OS changes during development stage. | ||
# Will open up OS versions before release. | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Windows Partial Test Suite | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "dev", "main" ] | ||
|
||
jobs: | ||
build: | ||
name: Partial | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: ["windows-2022"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Print windows version | ||
run: | | ||
cmd /c ver | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install kaleido==0.1.0.post1 # fixing kaleido version within runner, known issue: https://github.com/plotly/Kaleido/issues/134 | ||
- name: Run 'base' Tests | ||
run: | | ||
pytest --ignore tests/osm/ --ignore tests/analyse_network --deselect tests/gtfs/test_gtfs_utils.py::TestBboxFilterGtfs::test_bbox_filter_gtfs_to_date_builds_network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The transport_performance package as a whole is distributed under MIT license | ||
(see file LICENSE). The transport_performance package includes other open | ||
source software components. The following is a list of these components: | ||
|
||
* /./src/transport_performance/data/gtfs/route_lookup.pkl This table is the | ||
result of a pandas concatenation of 2 scraped HTML tables: | ||
1. [GTFS route_type table](https://gtfs.org/schedule/reference/#routestxt) | ||
©Mobility Data, distributed under | ||
[Creative Commons 3.0](https://creativecommons.org/licenses/by/3.0/) | ||
2. [Google Extended Route Type Schema](https://developers.google.com/transit/gtfs/reference/extended-route-types) | ||
©Google, distributed under | ||
[Creative Commons 4.0](https://creativecommons.org/licenses/by/4.0/) | ||
* /./tests/data/newport-2023-06-13.osm.pbf Sourced from | ||
[Geofabrik Download Server](https://www.geofabrik.de/data/download.html). | ||
©OpenStreetMap, | ||
This file is made available under the Open Database License: | ||
http://opendatacommons.org/licenses/odbl/1.0/. Any rights in individual | ||
contents of the database are licensed under the Database Contents License: | ||
http://opendatacommons.org/licenses/dbcl/1.0/ | ||
* /./tests/data/gtfs/newport-20230613_gtfs.zip ©Crown Copyright. Licensed under | ||
[Open Government Licence 3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
title = "Config for an E2E example around the Leeds area" | ||
|
||
# `override` variable in the sections below can be used to skip over stages | ||
# which take some time to execute. When running for the first time, it is | ||
# necessary to set these variables to `true` so that the intermediate and | ||
# processed data sources can be built. Afterwards, feel free to set these to | ||
# `false` to avoid rebuilding 'expensive' processed inputs. | ||
# Use the `write_outputs` flags below to control whether or not to write | ||
# geneerated outputs to file (useful if you do not want to overwrite results). | ||
|
||
[urban_centre] # configuration section for urban centre | ||
override = true | ||
input_dir = "data/external/urban_centre/" | ||
merged_path = "data/processed/urban_centre/leeds_uc_merged.tif" | ||
bbox = [ | ||
-145000.0, | ||
6247000.0, | ||
-93000.0, | ||
6282000.0 | ||
] # must in in 'ESRI:54009' | ||
centre = [-119000.0, 6264500.0] | ||
buffer_size = 12000 | ||
write_outputs = true | ||
output_map_path = "outputs/e2e/leeds/urban_centre/urban_centre_map.html" | ||
|
||
[population] # configuration section for population | ||
override = true | ||
input_dir = "data/external/population/" | ||
merged_path = "data/interim/population/pop_merged.tif" | ||
merged_resampled_path = "data/processed/population/pop_merged_resampled.tif" | ||
threshold = 1 # set small and positive, to remove 0 pop cells | ||
write_outputs = true | ||
output_map_path = "outputs/e2e/population/leeds/population_map.html" | ||
|
||
[gtfs] # configuration section for gtfs | ||
override = true | ||
input_path = "data/external/gtfs/itm_england_gtfs.zip" | ||
filtered_path = "data/interim/gtfs/itm_leeds_filtered_gtfs.zip" | ||
units = "km" | ||
write_outputs = true | ||
cleaned_path = "data/processed/gtfs/itm_leeds_filtered_cleaned_gtfs.zip" | ||
stops_map_path = "outputs/e2e/leeds/gtfs/stops_map.html" | ||
hull_map_path = "outputs/e2e/leeds/gtfs/hull_map.html" | ||
used_stops_map_path = "outputs/e2e/leeds/gtfs/used_stops_map.html" | ||
|
||
[osm] # configuration section for osm clipping | ||
override = true | ||
input_path = "data/external/osm/england-latest.osm.pbf" | ||
filtered_path = "data/processed/osm/leeds_latest_filtered.osm.pbf" | ||
tag_filter = false | ||
|
||
[analyse_network] # configuration for the analyse_network stage | ||
departure_year = 2023 | ||
departure_month = 10 | ||
departure_day = 24 # this is the date, not the day of the week | ||
departure_hour = 8 | ||
departure_minute = 0 | ||
departure_time_window = 1 # this is in hours | ||
max_time = 45 # this is in minutes | ||
write_outputs = true | ||
outputs_dir = "outputs/e2e/leeds/analyse_network/" | ||
qa_travel_times = false # set to true to qa results with `qa_path` | ||
qa_path = "outputs/e2e/leeds/analyse_network/travel_times.pkl" | ||
save_travel_times_for_qa = true # set to true to write to `save_qa_path` | ||
save_qa_path = "outputs/e2e/leeds/analyse_network/travel_times.pkl" | ||
|
||
[metrics] # configuration for the metrics stage | ||
cut_off_time = 45 # this is in minutes | ||
cut_off_distance = 11250 # this is in meters | ||
write_outputs = true | ||
outputs_dir = "outputs/e2e/leeds/metrics/" |
Oops, something went wrong.