Alfalfa Client
The purpose of this repository is to provide a standalone client for use with the Alfalfa application. It additionally includes a Historian to quickly/easily enable saving of results from Alfalfa simulations.
Usage
This repo is packaged and hosted on PyPI here.
pip install alfalfa-client
from alfalfa_client.alfalfa_client import AlfalfaClient
client = AlfalfaClient("http://localhost")
Additional documentation for the functions of alfalfa-client
can be found here.
Development
Prerequisites:
- poetry for managing environment
Cloning and Installing:
git clone https://github.com/NREL/alfalfa-client.git
cd alfalfa-client
poetry install
Running Tests:
All alfalfa-client
tests currently require a running instance of Alfalfa with at least 2 workers.
poetry run pytest -m integration
Releasing
- Finish merging PRs into develop
- Confirm all tests pass
- Update the version (assume version is 0.1.2):
poetry version 0.1.2
- Create PR to merge version update
- Rebase develop onto main, make sure tests pass
- Create a tag:
git tag 0.1.2
- Build:
poetry build
- Publish
poetry publish
(this will push to pypi) - Create a new release on the Github repository using the tag and link to PyPI