Skip to content

Commit 86d489f

Browse files
authored
Merge branch 'main' into feat/997
2 parents 9003687 + 24ceb1d commit 86d489f

File tree

9 files changed

+353
-134
lines changed

9 files changed

+353
-134
lines changed

.github/workflows/datasets-batch-deployer-prod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
REGION: ${{ vars.MOBILITY_FEEDS_REGION }}
1515
ENVIRONMENT: 'prod'
1616
DEPLOYER_SERVICE_ACCOUNT: ${{ vars.PROD_MOBILITY_FEEDS_DEPLOYER_SERVICE_ACCOUNT }}
17-
# every week on monday and thursday at 00:00
18-
JOB_SCHEDULE: '0 0 * * 1,4'
17+
# every day at 00:00 UTC
18+
JOB_SCHEDULE: '0 0 * * *'
1919
DATASETS_BUCKET_NAME: 'mobilitydata-datasets-prod'
2020
secrets:
2121
GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.PROD_GCP_MOBILITY_FEEDS_SA_KEY }}

.github/workflows/db-update.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,6 @@ jobs:
192192
id: getpath
193193
run: echo "PATH=$(realpath sources.csv)" >> $GITHUB_OUTPUT
194194

195-
- name: Download systems.csv
196-
run: wget -O systems.csv https://raw.githubusercontent.com/MobilityData/gbfs/master/systems.csv
197-
198-
- name: Get full path of systems.csv
199-
id: getsyspath
200-
run: echo "PATH=$(realpath systems.csv)" >> $GITHUB_OUTPUT
201-
202-
- name: GBFS - Update Database Content
203-
run: scripts/populate-db.sh ${{ steps.getsyspath.outputs.PATH }} gbfs >> populate-gbfs.log
204-
205195
- name: GTFS - Update Database Content
206196
run: scripts/populate-db.sh ${{ steps.getpath.outputs.PATH }} > populate.log
207197

@@ -212,13 +202,6 @@ jobs:
212202
name: populate-${{ inputs.ENVIRONMENT }}.log
213203
path: populate.log
214204

215-
- name: GBFS - Upload log file for verification
216-
if: ${{ always() }}
217-
uses: actions/upload-artifact@v4
218-
with:
219-
name: populate-gbfs-${{ inputs.ENVIRONMENT }}.log
220-
path: populate-gbfs.log
221-
222205
update-gcp-secret:
223206
name: Update GCP Secrets
224207
if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
The Mobility Feed API service a list of open mobility data sources from across the world. This repository is the effort the initial effort to convert the current [The Mobility Database Catalogs](https://github.com/MobilityData/mobility-database-catalogs) in an API service. [More info about the Mobility Database can be found on the website](https://mobilitydatabase.org/).
88

9+
The contents of the database is available in csv format [here](https://files.mobilitydatabase.org/feeds_v2.csv). This includes all feeds, including ones we automatically import from sources outside the catalogs repo.
10+
11+
The schema for the csv file is available [here](docs/SpreadsheetSchemaV2.md).
912

1013
## GBFS Feeds
1114
The repository also includes GBFS feeds extracted from [`systems.csv`](https://github.com/MobilityData/gbfs/blob/master/systems.csv) in the [GBFS repository](https://github.com/MobilityData/gbfs). However, these feeds are not being served yet. The supported versions of these feeds are specified in the file [api/src/scripts/gbfs_utils/gbfs_versions.py](https://github.com/MobilityData/mobility-feed-api/blob/main/api/src/scripts/gbfs_utils/gbfs_versions.py).

docs/OperationsAPI.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ info:
33
version: 1.0.0
44
title: Mobility Database Catalog Operations
55
description: |
6-
API for the Mobility Database Catalog Operations. See [https://mobilitydatabase.org/](https://mobilitydatabase.org/).
6+
API for the Mobility Database Catalog Operations. See [https://mobilitydatabase.org/](https://mobilitydatabase.org/).
77
This API was designed for internal use and is not intended to be used by the general public.
88
The Mobility Database Operation API uses Auth2.0 authentication.
99
termsOfService: https://mobilitydatabase.org/terms-and-conditions
@@ -33,29 +33,29 @@ paths:
3333
required: false
3434
schema:
3535
type: string
36-
enum: [wip, published]
36+
enum: [ wip, published ]
3737
- name: data_type
3838
in: query
3939
description: Filter feeds by data type.
4040
required: false
4141
schema:
4242
type: string
43-
enum: [gtfs, gtfs_rt]
43+
enum: [ gtfs, gtfs_rt ]
4444
- name: offset
4545
in: query
4646
description: Number of items to skip for pagination.
4747
required: false
4848
schema:
49-
type: integer
50-
default: 0
49+
type: string
50+
default: "0"
5151
- name: limit
5252
in: query
5353
description: Maximum number of items to return.
5454
required: false
5555
schema:
56-
type: integer
57-
default: 50
58-
maximum: 100
56+
type: string
57+
default: "50"
58+
example: "100"
5959
responses:
6060
200:
6161
description: List of feeds retrieved successfully.
@@ -86,7 +86,7 @@ paths:
8686
- "operations"
8787
operationId: updateGtfsFeed
8888
security:
89-
- ApiKeyAuth: []
89+
- ApiKeyAuth: [ ]
9090
requestBody:
9191
description: Payload to update the specified GTFS feed.
9292
required: true
@@ -118,7 +118,7 @@ paths:
118118
- "operations"
119119
operationId: updateGtfsRtFeed
120120
security:
121-
- ApiKeyAuth: []
121+
- ApiKeyAuth: [ ]
122122
requestBody:
123123
description: Payload to update the specified GTFS-RT feed.
124124
required: true
@@ -179,7 +179,7 @@ components:
179179
$ref: "#/components/schemas/SourceInfo"
180180
operational_status:
181181
type: string
182-
enum: [wip, published]
182+
enum: [ wip, published ]
183183
description: Current operational status of the feed.
184184
created_at:
185185
type: string
@@ -245,10 +245,10 @@ components:
245245
type: integer
246246
description: Total number of feeds matching the criteria.
247247
offset:
248-
type: integer
248+
type: string
249249
description: Current offset for pagination.
250250
limit:
251-
type: integer
251+
type: string
252252
description: Maximum number of items per page.
253253
feeds:
254254
type: array
@@ -285,13 +285,13 @@ components:
285285
example: Los Angeles Department of Transportation (LADOT, DASH, Commuter Express)
286286
feed_name:
287287
description: >
288-
An optional description of the data feed, e.g to specify if the data feed is an aggregate of
288+
An optional description of the data feed, e.g to specify if the data feed is an aggregate of
289289
multiple providers, or which network is represented by the feed.
290290
type: string
291291
example: Bus
292292
note:
293-
description: A note to clarify complex use cases for consumers.
294-
type: string
293+
description: A note to clarify complex use cases for consumers.
294+
type: string
295295
feed_contact_email:
296296
description: Use to contact the feed producer.
297297
type: string
@@ -344,13 +344,13 @@ components:
344344
example: Los Angeles Department of Transportation (LADOT, DASH, Commuter Express)
345345
feed_name:
346346
description: >
347-
An optional description of the data feed, e.g to specify if the data feed is an aggregate of
347+
An optional description of the data feed, e.g to specify if the data feed is an aggregate of
348348
multiple providers, or which network is represented by the feed.
349349
type: string
350350
example: Bus
351351
note:
352-
description: A note to clarify complex use cases for consumers.
353-
type: string
352+
description: A note to clarify complex use cases for consumers.
353+
type: string
354354
feed_contact_email:
355355
description: Use to contact the feed producer.
356356
type: string
@@ -396,7 +396,7 @@ components:
396396
properties:
397397
producer_url:
398398
description: >
399-
URL where the producer is providing the dataset.
399+
URL where the producer is providing the dataset.
400400
Refer to the authentication information to know how to access this URL.
401401
type: string
402402
format: url
@@ -405,7 +405,7 @@ components:
405405
$ref: "#/components/schemas/Authentication_type"
406406
authentication_info_url:
407407
description: >
408-
Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created.
408+
Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created.
409409
This field is required for `authentication_type=1` and `authentication_type=2`.
410410
type: string
411411
format: url
@@ -500,4 +500,4 @@ components:
500500
in: header
501501

502502
security:
503-
- ApiKeyAuth: []
503+
- ApiKeyAuth: [ ]

0 commit comments

Comments
 (0)