From 27ad1fb1b61b4b5729088fa688babdb653c83116 Mon Sep 17 00:00:00 2001 From: Maxime Armstrong <46797220+maximearmstrong@users.noreply.github.com> Date: Thu, 17 Feb 2022 15:26:58 -0500 Subject: [PATCH] fix: Updates scripts to modify mobilitydatabase.org to old.mobilitydatabase.org (#1108) * Updates scripts to modify mobilitydatabase.org to old.mobilitydatabase.org * Updates README.md and ACCEPTANCE_TESTS.md --- README.md | 2 +- docs/ACCEPTANCE_TESTS.md | 8 ++++---- scripts/comment_generator.py | 2 +- .../harvest_latest_versions.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 46f0af4675..51cc823b45 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Instructions to build the project from the command-line using [Gradle](https://g The architecture of the `gtfs-validator` is described on our [Architecture page](/docs/ARCHITECTURE.md). # Acceptance tests -In order to avoid sudden changes in the validation output that might declare previously valid datasets invalid, all code changes in pull requests are tested against GTFS datasets in the [MobilityDatabase](http://mobilitydatabase.org/wiki/Main_Page). The acceptance test process is described in [ACCEPTANCE_TESTS.md](docs/ACCEPTANCE_TESTS.md). +In order to avoid sudden changes in the validation output that might declare previously valid datasets invalid, all code changes in pull requests are tested against GTFS datasets in the [MobilityDatabase](http://old.mobilitydatabase.org/wiki/Main_Page). The acceptance test process is described in [ACCEPTANCE_TESTS.md](docs/ACCEPTANCE_TESTS.md). # License Code licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/docs/ACCEPTANCE_TESTS.md b/docs/ACCEPTANCE_TESTS.md index 178918c8fc..7cd1d162cc 100644 --- a/docs/ACCEPTANCE_TESTS.md +++ b/docs/ACCEPTANCE_TESTS.md @@ -12,7 +12,7 @@ If this step is skipped, newly declared invalid datasets could be rejected by GT ## Process description -For the latest version of all GTFS datasets from the [MobilityDatabase](http://mobilitydatabase.org/wiki/Main_Page), the validation report from both the proposed and the reference validator are compared. An acceptance test report is generated: it quantifies for each agency/dataset the number of new errors (as defined [here](https://github.com/MobilityData/gtfs-validator/blob/master/RULES.md#definitions)) that have been introduced. +For the latest version of all GTFS datasets from the [MobilityDatabase](http://old.mobilitydatabase.org/wiki/Main_Page), the validation report from both the proposed and the reference validator are compared. An acceptance test report is generated: it quantifies for each agency/dataset the number of new errors (as defined [here](https://github.com/MobilityData/gtfs-validator/blob/master/RULES.md#definitions)) that have been introduced. ![steps](https://user-images.githubusercontent.com/35747326/139877746-fd047437-38b3-44fa-aeb8-37d925c289e8.png) ## Github Actions @@ -23,7 +23,7 @@ This workflow: 1. packages the `output-comparator` module; 1. packages the proposed version of the validator; 1. downloads the version of the reference validator that is on the [`master` branch](https://github.com/MobilityData/gtfs-validator/tree/master); -1. defines a matrix of urls (fetched from the [MobilityDatabase](http://mobilitydatabase.org/wiki/Main_Page)) that will be used in the further validation process; +1. defines a matrix of urls (fetched from the [MobilityDatabase](http://old.mobilitydatabase.org/wiki/Main_Page)) that will be used in the further validation process; On each of these urls: 1. the reference version of the validator is executed and the validation report is output as JSON (under `reference.json`); @@ -117,9 +117,9 @@ Sample outputs: "maxPercentageCorruptedSources": 2 } ``` -Where each source id value come from the MobilityDatabase: they are a unique [property](http://mobilitydatabase.org/wiki/Property:P33) used to identify each source of data. +Where each source id value come from the MobilityDatabase: they are a unique [property](http://old.mobilitydatabase.org/wiki/Property:P33) used to identify each source of data. -The source id can be used to find all datasets versions of a source on the [MobilityDatabase](http://mobilitydatabase.org/wiki/Main_Page) for the sakes of debugging or exploration. +The source id can be used to find all datasets versions of a source on the [MobilityDatabase](http://old.mobilitydatabase.org/wiki/Main_Page) for the sakes of debugging or exploration. ## Instructions to run the pipeline diff --git a/scripts/comment_generator.py b/scripts/comment_generator.py index b71821f681..48c3f7a6a7 100644 --- a/scripts/comment_generator.py +++ b/scripts/comment_generator.py @@ -102,7 +102,7 @@ def load_content(data_path): else: comment = ( comment - + " The changes in this pull request did not trigger any new errors on known GTFS datasets from the [MobilityDatabase](http://mobilitydatabase.org/wiki/Main_Page)." + + " The changes in this pull request did not trigger any new errors on known GTFS datasets from the [MobilityDatabase](http://old.mobilitydatabase.org/wiki/Main_Page)." ) comment = ( comment diff --git a/scripts/mobility-database-harvester/harvest_latest_versions.py b/scripts/mobility-database-harvester/harvest_latest_versions.py index dba27b2d56..45fab81851 100644 --- a/scripts/mobility-database-harvester/harvest_latest_versions.py +++ b/scripts/mobility-database-harvester/harvest_latest_versions.py @@ -26,7 +26,7 @@ ############################################################################### # API constants -API_URL = "http://mobilitydatabase.org/w/api.php?" +API_URL = "http://old.mobilitydatabase.org/w/api.php?" ACTION = "action" ARCHIVES_ID_PROPERTY = "P33" CLAIMS = "claims"