API for hosting nowcasting solar predictions. Will just return 'dummy' numbers until about mid-2022!
We use FastAPI.
Documentation can be viewed at /docs
. This is automatically generated from the code.
This can be done it two different ways: With Python or with Docker.
python3 -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
cd src && uvicorn main:app --reload
To run local pytests you need to
- add
src
to python pathexport PYTHONPATH=$PYTHONPATH:./src
- run pytests:
pytest
- Make sure docker is installed on your system.
- Use
docker-compose up
in the main directory to start up the application. - You will now be able to access it on
http://localhost:80
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:
- Install pre-commit
- Check the install worked via
pre-commit --version
- Install the git hooks script via
pre-commit install
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"
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!