Empty data directory and script for adding sample data #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Users with existing data should not have to remove sample data.
For them the data dir should be empty.
For users without data, provide a script that creates sample data.
The trips in the sample data shall be current, e.g for $tomorrow.
Thats why we can not have static sample data.
TBD the data dir could be in amarillo-core and/or amarillo-compose
Use case
If there are many trips, I wouldn't cram it all into the one script, rather separate the data.
Actually, a good way i can think of is to write this as a python script, have a list of locations, then generate connections between them. This way we can compactly define many trips and also easily scale up and down how many trips are generated
Create a bash script.
If there is no data on startup, prompt user to run the script
I created the sample data script
71942e852fTBD: Since the enhancer is stateless, it has no idea that there are new trips from running the sample script that need to be enhanced. Normally amarillo sends requests to enhance trips, but here we are creating trips from outside. We need to change it so the main amarillo recognizes on startup that there are some trips that are not enhanced and send them to enhancer.
This is done in #24
Status:
These 4 trips are included in the /sampledata folder of amarillo-compose.
There is an update_sample_data.sh script that can replace the dates in the sample data for current ones.