Skip to main content

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

  1. Merge all branches into develop, make sure tests pass
  2. Update the version (assume version is 0.1.2): poetry version 0.1.2
  3. Update the version test file (i.e. my-repo/tests/test_version.py) to match the above version
  4. Make sure tests pass: poetry run tox
  5. Merge develop into main (previously, master), make sure tests pass
  6. Create a tag: git tag 0.1.2
  7. Build: poetry build
  8. Publish poetry publish (this will push to pypi)
  9. Create a new release on the Github repository using the tag and link to PyPI

Project details


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)

Uploaded Source

Built Distribution

alfalfa_client-0.6.0-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page