Closed OriHoch closed 3 years ago
Clone both repositories: open-bus-gtfs-etl and open-bus-stride-db:
git clone https://github.com/hasadna/open-bus-gtfs-etl.git
git clone https://github.com/hasadna/open-bus-stride-db.git
Create virtual environs and activate it:
python3.8 -m venv open-bus-gtfs-etl/venv
. open-bus-gtfs-etl/venv/bin/activate
Install requirement packages and install open-bus-stride-db package
python -m pip install -r open-bus-stride-db/requirements.txt
python -m pip install -r open-bus-gtfs-etl/requirements.txt
python -m pip install -e open-bus-stride-db
Create .env file with database connection string:
echo "export SQLALCHEMY_URL=postgresql://postgres:123456@localhost" > open-bus-gtfs-etl/.env
before executing the app, you need to activate the virtual environment and the .env file:
. venv/bin/activate
. .env
python -m open_bus_gtfs_etl.cli --help
Usage: python -m open_bus_gtfs_etl.cli [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
`analyze-gtfs-stat` Analyze GTFS files into stat route and trips
`create-gtfs-metadata` Create metadata file of existed GTFS files
`download-gtfs` Download GTFS file from MOT FTP server
`upload-gtfs-stat-to-db` Main endpoint for GTFS ETL.
This ETL could be summarized into 3 main steps:
As you can see, each command described above in the CLI documentation, represent one step:
I disabled the wiki feature, copied the page here for reference ^
i added new section about the 3 operations the app should support and about the env. variables that the app using. https://github.com/hasadna/open-bus-gtfs-etl#supported-operations-and-configurations
Please have all documentation as part of the code, as they are related and updated together
Curretnly, I think not much more detail is availble in docs, so nothing needs to be changed, maybe just update the CLI commands help messages
I updated the README to conform to the other stride repos to include all relevant details for using with Docker compose or for local development