Skip to content
This repository was archived by the owner on Jul 30, 2023. It is now read-only.

ElGovanni/weather-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

622b40f · Jan 17, 2022

History

8 Commits
Jan 17, 2022
Jul 25, 2021
Jul 25, 2021
Jan 17, 2022
Jul 28, 2021
Jul 28, 2021
Jul 28, 2021
Jul 25, 2021
Jul 25, 2021
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jul 25, 2021
Jul 25, 2021
Jul 25, 2021
Jul 28, 2021

Repository files navigation

Weather api

This application integrates Musement's API with WeatherApi

example workflow

Requirements

Installation

To install application you have to execute few commands

git clone git@github.com:ElGovanni/weather-api.git
cd weather-api

Install composer dependencies

docker-compose run --rm composer install

Configuration

For proper operation of the application, you need to add an environment variable with your WeatherApi key using command below but with your key instead of <YOUR_API_KEY>.

echo "WEATHER_API_KEY=<YOUR_API_KEY>" > .env.local

Or if you want to avoid bash just create new file .env.local with WEATHER_API_KEY=<YOUR_API_KEY> in root project directory.

Usage

To display forecast for cities from Musement's API execute below command inside php container

docker-compose run --rm php bin/console app:forecast

You can change default 2 days of forecast to other in range 1:3 by using argument days, for example:

docker-compose run --rm php bin/console app:forecast 3

Tests

You should enter into docker php container using command below before you are going to execute rest of test commands below.

Unit

Master branch tests coverage report is available on project github page

docker-compose run --rm php bin/phpunit

Execute this to run tests and generate coverage report.

docker-compose run --rm php bin/phpunit --coverage-html var/coverage-report

Coding standard

Below command check coding standards in src and tests directory.

docker-compose run --rm php ./vendor/bin/ecs check

Static code analysis

Static analysis using PHPStan tool to find errors before run app.

docker-compose run --rm php ./vendor/bin/phpstan analyse

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published