jwestw / Public_Transport_Efficiency

A project to measure the efficiency of public transport in the UK
MIT License
1 stars 0 forks source link

Put public and private api paramters into a file #71

Open james-westwood opened 1 year ago

james-westwood commented 1 year ago

Currently the public and private paramters are in a dictionary in the main code, which is a bit messy. This would be much better in a separate file, such as a toml, yaml, or ini

e.g. api_paramters.yaml might look like

public_parameters:
    "id": "arrive-at one-to-many search example",
    "arrival_location_ids": arrival_locations,
    "departure_location_id": departure,
    "transportation": {"type": "public_transport"},
    "arrival_time_period": "weekday_morning",
    "travel_time": 3600,
    "properties": ["travel_time"]

and the same for private parameters

Then we would need to import those as dictionaries public_parameters and private_parameters using the correct library for toml, yaml, ini or whatever has been selected.