Configuration file¶
Config Example¶
An example for a minimal working config
{
"files": {
"base_directory": "", # Fill with a full path to the download dir
"child_directories": {
"gtfs_feeds": "gtfs_feeds",
"output": "output",
"filtered_feeds": "filtered_feeds",
"logs": "logs"
},
"output_file_name_regexp": "^(?P<date_str>[^_]+?)_(?P<type>\\w+)",
"output_file_type": "csv.gz"
},
"s3": {
"access_key_id": "Your Access key id", # Fill with your key parameters
"secret_access_key": "Your secret access key", # Fill with your key parameters
"s3_endpoint_url": "https://ams3.digitaloceanspaces.com",
"bucket_name": "obus-do2",
},
"use_data_from_today": false,
"date_range": ["2019-03-07", "2019-03-07"],
}
Parameters description¶
Main configuration object parameter¶
The configuration for a gtfs_stats run | |||
type | object | ||
properties | |||
|
Files object parameters | ||
|
S3 object parameters | ||
|
First and last date of the gtfs files to be download from bucket.
only relevant if use_data_from_today is set to false. {Format: YYYY-MM-DD} |
||
type | array | ||
maxLength | 2 | ||
minLength | 2 | ||
items | |||
type | string | ||
pattern | ^d{4}-d{2}-d{2}$ | ||
First and last date of the gtfs files to be download from bucket.
only relevant if use_data_from_today is set to false. {Format: YYYY-MM-DD} |
|||
type | array | ||
maxLength | 2 | ||
minLength | 2 | ||
|
Download only gtfs data from today (overrides date_range). | ||
type | boolean | ||
default | False | ||
|
Limit the maximum size of the downloaded gtfs files (in MB). If not set, the limit is only free disk space. | ||
type | integer | ||
default | sys.maxsize | ||
|
If true, displays a proggress bar while downloading. | ||
type | boolean | ||
default | False | ||
|
If true, displays file size on the download status bar. | ||
type | boolean | ||
default | False | ||
|
If true, delete the gtfs files after parsing them. | ||
type | boolean | ||
default | True | ||
|
If true, writes a filtered version of the gtfs for the specific dates. | ||
type | boolean | ||
default | False | ||
|
Lowest logging level to be printed to console. | ||
type | string | ||
enum | DEBUG, INFO, WARNING, ERROR, CRITICAL | ||
default | ‘ERROR’ | ||
additionalProperties | False | ||
The configuration for a gtfs_stats run | |||
type | object | ||
anyOf | |||
Files object parameters¶
files info would be under the files tag. | |||
type | object | ||
properties | |||
|
base directory for the created files. | ||
type | string | ||
|
A regular expression used to find existing output files. | ||
type | string | ||
|
The file type for the outputs. | ||
type | string | ||
enum | pkl.gz, csv.gz, csv | ||
|
Names of dirs that will be used (name is relative to base_directory |
||
type | object | ||
properties | |||
|
The name of the directory the GTFS files would be downloaded to. | ||
type | string | ||
|
The name of the directory for the output files. | ||
type | string | ||
|
The name of the directory for the filtered feeds, if exists. | ||
type | string | ||
|
The name of the directory for the log files. | ||
type | string | ||
additionalProperties | False | ||
Names of dirs that will be used (name is relative to base_directory |
|||
type | object | ||
additionalProperties | False | ||
files info would be under the files tag. | |||
type | object |
S3 object parameters¶
All the info about S3 connection parameters would come here (under s3 tag). | ||
type | object | |
properties | ||
|
Authorization access key id for S3. | |
type | string | |
|
Authorization secret access key for S3. | |
type | string | |
|
Connection endpoint url for S3. | |
type | string | |
|
Bucket name for S3. | |
type | string | |
|
If true, upload the analyzed results back to S3. | |
type | boolean | |
|
Prefix path on S3 for the uploaded results. | |
type | string | |
additionalProperties | False | |
All the info about S3 connection parameters would come here (under s3 tag). | ||
type | object |