The project is aimed to predict weather for a given day. If the day is not given the app will return the current day weather prediction.
The code is divided into four parts
- Console App (WeatherPredictor)
- Business Services (PredictionService)
- Data Services (DSWeatherPrediction)
- Unit Tests (BusinessServiceTests)
- Tried to follow SOLID principles, DRY, YAGNI.
- Everything is open for extension.
- Implementations are easy to be replacable.
- Clone the repo.
- Make sure to install .Net Core (3.1). Link to follow https://docs.microsoft.com/en-us/dotnet/core/install/
- Once the installation is complete. Open the terminal and check 'dotnet' command is recognized.
- Then navigate to the solution/repo folder.
- Run the following commands by then navigating to /WeatherPredictor folder. Note:- The solution has dependencies on Nuget Packages. a. dotnet build b. dotnet run
- You should be prompted with the following instructions a. Enter the month in number. b. Enter the day in number.
- The program should return the JSON response for the weather.
- Not included the option to prompt for Julian day but that is easily plugable into the console application.
- Unit tests are only for business logic.
- For now assumed to use only simple file retrieval instead of creating a database source for prediction data.
- Didn't want to overarchitecture anything but kept everything open for extension.
- Assumed we don't require to generate document either from doxygen or other alternatives.
- More unit tests and code coverage.
- Improving the data access layer for extension.
- A utility class to validate user input.
- A support service that can validate input and call various prediction implementation based on the requirements and return json response.