A standalone client for the NREL Alfalfa application
Project description
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
import alfalfa_client.alfalfa_client as ac
import alfalfa_client.historian as ah
client = ac.AlfalfaClient
historian = ah.Historian
Setup and Testing
This repository is setup to use:
- pyenv for managing python versions
- poetry for managing environment
- pre-commit for managing code styling
- tox for running tests in isolated build environments. See the expected python versions in tox.ini
Assuming poetry is installed and the necessary python versions are installed, the following should exit cleanly:
git clone https://github.com/NREL/alfalfa-client.git
cd alfalfa-client
poetry run tox
This may take some time resolving on the initial run, but subsequent runs should be faster.
See this gist for additional info.
History
- The implemented client is previously referred to as Boptest, from the alfalfa/client/boptest.py implementation. It has been ported as a standalone package for easier usage across projects.
Releasing
- Merge all branches into develop, make sure tests pass
- Update the version (assume version is 0.1.2):
poetry version 0.1.2
- Update the version test file (i.e. my-repo/tests/test_version.py) to match the above version
- Make sure tests pass:
poetry run tox
- Merge develop into main (previously, master), 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alfalfa_client-0.6.0.tar.gz
(9.6 kB
view hashes)
Built Distribution
Close
Hashes for alfalfa_client-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8779d3be7debbe89abecd05f7a403f99a9f97c68efe74c9d68b815c502a8e51 |
|
MD5 | 7f0bdd6c02057eab4235eb76b99ec588 |
|
BLAKE2b-256 | ebcb4975ad7369ebca0051701e4f5d71213c86916ceebde3fbbc4d59ec52d074 |