Test service to collect weather data from web page and saves them to MySQL database. Everything happens inside Docker containers.
- MySQL database is accessible on: http://localhost:3306
- Administration tools is accessible on: http://localhost:8080
- Database name: weather
- Table name: weather_data
- login details are defined and can be adjusted inside properties file (check .env below)
- Weather data from this website is used: http://meteo.arso.gov.si/met/sl/service/
- Source URL for specific location can be adjusted using WEATHER_DATA_XML_URL property.
- Data is saved inside weather_data table
- Official MySQL image is used: https://hub.docker.com/_/mysql
Adminer tool is used for administration and be reached here: http://localhost:8080
- The official website: https://www.adminer.org/
- Docker image: https://hub.docker.com/_/adminer
- It has to be created from .env.template file!
- Properties are defined and be adjusted inside this file.
- Check file for details.
- Template for properties file.
- Check file for details.
- Properties file used for tests.
- Start collecting data
- Database is automatically prepared if needed.
- Prepare database
- Start composing Docker container and run collection of data
- Basic tests
- Run DB tests (using Docker container)
Create virtual environment:
- virtualenv -p $(which python3) <env_dir>
- source <env_dir>/bin/activate
- pip3 install -r scripts/requirements.txt
- pip3 install -r scripts/tests/testRequirements.txt (just for testing)