Package: batlab
[master][develop]batlab-software-pythonis a Python library and example command line script to interact with a pool of Batlabs over USB. This tool is designed for hobbyists and more advanced users who would like to incorporate the Batlab hardware in their own cell testing workflow or environment.RequirementsPython >=3.4 is supported by this module.Python 2 is not supported.InstallationTo install the latest release you can usepip:$pipinstallbatlabTo upgrade, you can run either of:$pipinstallbatlab--upgrade$pipinstallbatlab-UDocumentationDocumentation for this library is hosted atRead the Docs. Please go there to find this README as well as the available documentation for classes and methods within this library.UsageThe library can be imported into your own programs, or you may use the provided example Batlab Utility Script.Batlab Utility ScriptThe Batlab Utility Script allows users to perform basic interactions with a pool of connected Batlab units through a simple command-line interface.To run the script, make sure thebatlabpackage is installed and then run:$batlabutilTypehelpto display the list of commands in the script and how to use them. The intention for the script is to serve as an example for users to write their own battery cell test software using the Batlab library.ContributingWhen contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository.Git branching modelWe follow the development model describedhere. Anything in themasterbranch is considered production. Most work happens in thedevelopbranch or in a feature branch that is merged intodevelopbefore being merged intomaster.DocumentingPlease document code (notably functions and classes) using doc strings according to theGoogle Python Style Guide standards. This will ensure that your notes are automatically picked up and included in the generated documentation.Running testsTo run the unit tests, from the root directory run:$pythonsetup.pytestDeploymentThis library is deployed toPyPi. Builds are generated withTravis CIwith each pushed commit. When a new tag is pushed or merged intomaster, that build is automatically deployed to end users through PyPi.To publish a new version, the workflow might look like this. First make your changes:$gitcommit-am"some changes to the develop branch"Then, updatesetup.pyanddocs/source/conf.pywith the new version number (in this case we will use the example 0.100.56). Make a commit with these changes and push it to GitHub:$gitcommit-am"rev version number to 0.100.56"$gitpushorigindevelopThen you must wait a couple of minutes to make sure the build passes on Travis. If the build fails, you will not be able to merge the commit intomaster. Once the build passes, you can merge into master, create a tagged release and push. When merging, use--no-ffto preserve the commit and branching history:$gitcheckoutmaster$gitmerge--no-ffdevelop$gittagv0.100.56$gitpushoriginmaster$gitpush--tagsChanges should automatically roll out to PyPi, and any documentation included in your code will automatically roll out to Read the Docs.LicenseThis library is licensed under LGPL-3.0 - seeLICENSEfor details.AcknowledgementsThank you to our backers onKickstarterwho made this project possible.Documentation created withguidefrom Sam Nicholls.