Skip to content

sixtedemaupeou/nowcasting_api

 
 

Repository files navigation

Nowcasting API

All Contributors

codecov

API for hosting nowcasting solar predictions. Will just return 'dummy' numbers until about mid-2022!

We use FastAPI.

Documentation

Documentation can be viewed at /docs. This is automatically generated from the code.

Setup and Run

This can be done it two different ways: With Python or with Docker.

Python

Create a virtual env

python3 -m venv ./venv
source venv/bin/activate

Install Requirements and Run

pip install -r requirements.txt
cd src && uvicorn main:app --reload

Local pytest

To run local pytests you need to

  1. add src to python path export PYTHONPATH=$PYTHONPATH:./src
  2. run pytests: pytest

Docker

  1. Make sure docker is installed on your system.
  2. Use docker-compose up in the main directory to start up the application.
  3. You will now be able to access it on http://localhost:80

Development

We use pre-commit to manage various pre-commit hooks. All hooks are also run as Actions when code is pushed to GitHub.

You can run the formatters and linters locally. To do that:

  1. Install pre-commit
  2. Check the install worked via pre-commit --version
  3. Install the git hooks script via pre-commit install

Deployment

This API is temporarily deployed on AWS Elastic Beanstalk. We will move it to a more stable service once the API matures.

If you want to deploy a new release, then please adjust the version in docker-compose.yml.

eb init
eb deploy --message="Add message here"

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Peter Dudfield

💻

Mohammed Faisal

💻

Bodale Denis

💻

Souhit Dey

💻

Flo

💻

Shanmukh

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

API for hosting nowcasting solar predictions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 51.8%
  • Jupyter Notebook 46.7%
  • Dockerfile 1.5%