Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

🌊 PyFlowBatt

This Python package contains functions and a CLI for analysing data from the flow battery lab at Empa.

Installation

Use Python >3.10, and install with pip:

pip install git+https://github.com/empaeconversion/pyflowbatt.git

Usage

Use in a terminal (e.g. Command Prompt or PowerShell).

To analyse data and get a full summary and ro-crate, use pyflowbatt --folder="path/to/your/folder".

To zip everything at the end (e.g. to upload to Zenodo), use pyflowbatt --folder="path/to/your/folder" --zip.

You can also navigate to a folder e.g.

cd path/to/your/folder
pyflowbatt

PyFlowBatt will automatically scan for files like GCPL, EIS, LSV, CV, as well as BattInfo Converter .xlsx files, process the data, convert to battery data format, produce summary graphs and excel reports, create a BattInfo JSON-LD metadata file, and a top level ro-crate metadata file.

A full analysis can take a while. You can do a 'dry run' to check what files would be analysed:

pyflowbatt --dry
pyflowbatt --dry --folder="path/to/your/folder" --zip

This is useful for checking everything is in order before running a long analysis.

You can override some settings by adding a pyflowbatt.toml file to a sample folder, parent folder, or your home folder. Use pyflowbatt init to create a template file and see what can be modified.

Using in Python

You can also use the functions in Python, e.g.

# Use individual functions
from pyflowbatt import gcpl, lsv, cv
from pyflowbatt.read import read_to_bdf

df = read_to_bdf("path/to/my/gcpl-file")
df, cycle_df = gcpl.analyse(df)

cv_df = read_to_bdf("path/to/my/cv-file")
cv_df, cv_cycle_df, capacitance_mF = cv.analyse(cv_df)

lsv_df = read_to_bdf("path/to/my/lsv-file")
lsv_result_dict = lsv.analyse(lsv_df)

# Or run the full analysis on folders
from pyflowbatt.analysis import analyse_sample, analyse_all_samples
analyse_sample("path/to/sample/folder")
analyse_all_samples("path/to/parent/folder/of/many/samples")

For contributors

If you find bugs, or want new features, open an issue on the GitHub page.

If you want to directly contribute to the project, it is easiest to use the tool 'uv':

git clone https://github.com/empaeconversion/pyflowbatt.git

cd pyflowbatt

uv sync

Then open this folder in an editor like VSCode.

You should always create a new branch before making edits, main is only for tested, working code that everyone can use.

E.g. make and switch to a new branch with

git checkout -b new-feature

You have now branched off the main PyFlowBatt into your own branch called e.g. new-feature. Now you can do whatever you like and it won't affect the main branch.

When you have made and committed some changes that add a feature or fix a problem, and you want to put them into main, open a pull request on GitHub.

Metadata

Release files for pyflowbatt 0.2.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyflowbatt 0.2.0rc2
File Size Uploaded
pyflowbatt-0.2.0rc2.tar.gz 38.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyflowbatt 0.2.0rc2
File Interpreter ABI Platform
pyflowbatt-0.2.0rc2-py3-none-any.whl Python 3 none any Details

Total release size: 80.3 kB

Release files / pyflowbatt-0.2.0rc2.tar.gz

Download URL pyflowbatt-0.2.0rc2.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5584e3b6eb3a9cddf84b8890f7474a9f84bf26147f49ebc66c669a77b20cf826
BLAKE2b-256 checksum
How to use checksums
bc33590d4657bb88645afabc54c2225e3e42e76da0c57c77015f64d1d13b215c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyflowbatt-0.2.0rc2-py3-none-any.whl

Download URL pyflowbatt-0.2.0rc2-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98ceaad8218655cd6e1fa0951a7b1cd4fbed97ab246b009e8cbe23f4fb57b1a0
BLAKE2b-256 checksum
How to use checksums
74feeca6cf31570c5a54f08b91a9e1152040a96ee13eafa51ce5078075c92287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page