Virtualenv and docker as explained in the original readme.
- Start the virtualenv
- Start the postgres docker container
-
The function is called clean_rides_csv inside cp_datawarehouse/etl/transform.py
-
The function is called insert_rides_list.
-
Both test for this functions are located in test_transform.py and test_load.py inside tests/etl directory.
The sql queries are located in the file requests.sql inside cp_datawarehouse/
- The three functions are located in transform.py inside cp_datawarehouse/etl/. Tests are in test_transform.py
- Composed of two functions located in transform.py :
- First one is create_chart_df and return the dataframe formated for the graph (using pivot function). test located in test_transform.py
- Second one plot the graph from a dataframe using matplotlib.
Enter your cp_dw virtualenv
# Start the Docker
$ docker-compose -f tests/tools/docker-compose.yml up -d
# Run the tests
$ PYTHONPATH=. pytest
#Run all the functions
$ PYTHONPATH=. python cp_datawarehouse/etl/run.py
-- Charles Andre --