pyflowbatt 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Empa - Materials for Energy Conversion
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyflowbatt
3
+ Version: 0.2.0
4
+ Summary: Tools for analysing data from the flow battery lab at Empa
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: batterydf>=0.1.0,<0.2.0
9
+ Requires-Dist: battinfoconverter-backend>=3.2.0
10
+ Requires-Dist: impedance>=1.7.1
11
+ Requires-Dist: matplotlib>=3.10.6
12
+ Requires-Dist: pandas>=2.3.2
13
+ Requires-Dist: pyarrow>=21.0.0
14
+ Requires-Dist: xlsxwriter>=3.2.9
15
+ Requires-Dist: rocrate>=0.9
16
+ Requires-Dist: yadg>=6.2.2,<7.0.0
17
+ Requires-Dist: tomli>=2.0.0; python_version < '3.11'
18
+
19
+ # 🌊 PyFlowBatt
20
+
21
+ This Python package contains functions and a CLI for analysing data from the flow battery lab at Empa.
22
+
23
+
24
+ ## Installation
25
+
26
+ Use Python >3.10, and install with pip:
27
+ ```
28
+ pip install git+https://github.com/empaeconversion/pyflowbatt.git
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ Use in a terminal (e.g. Command Prompt or PowerShell).
34
+
35
+ To analyse data and get a full summary and ro-crate, use `pyflowbatt --folder="path/to/your/folder"`.
36
+
37
+ To zip everything at the end (e.g. to upload to Zenodo), use `pyflowbatt --folder="path/to/your/folder" --zip`.
38
+
39
+ You can also navigate to a folder e.g.
40
+ ```
41
+ cd path/to/your/folder
42
+ pyflowbatt
43
+ ```
44
+ 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.
45
+
46
+ A full analysis can take a while. You can do a 'dry run' to check what files *would* be analysed:
47
+ ```
48
+ pyflowbatt --dry
49
+ ```
50
+
51
+ ```
52
+ pyflowbatt --dry --folder="path/to/your/folder" --zip
53
+ ```
54
+ This is useful for checking everything is in order before running a long analysis.
55
+
56
+ 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.
57
+
58
+ ## Using in Python
59
+
60
+ You can also use the functions in Python, e.g.
61
+
62
+ ```python
63
+ # Use individual functions
64
+ from pyflowbatt import gcpl, lsv, cv
65
+ from pyflowbatt.read import read_to_bdf
66
+
67
+ df = read_to_bdf("path/to/my/gcpl-file")
68
+ df, cycle_df = gcpl.analyse(df)
69
+
70
+ cv_df = read_to_bdf("path/to/my/cv-file")
71
+ cv_df, cv_cycle_df, capacitance_mF = cv.analyse(cv_df)
72
+
73
+ lsv_df = read_to_bdf("path/to/my/lsv-file")
74
+ lsv_result_dict = lsv.analyse(lsv_df)
75
+
76
+ # Or run the full analysis on folders
77
+ from pyflowbatt.analysis import analyse_sample, analyse_all_samples
78
+ analyse_sample("path/to/sample/folder")
79
+ analyse_all_samples("path/to/parent/folder/of/many/samples")
80
+ ```
81
+
82
+ ## For contributors
83
+
84
+ If you find bugs, or want new features, open an *issue* on the GitHub page.
85
+
86
+ If you want to directly contribute to the project, it is easiest to use the tool 'uv':
87
+ ```
88
+ git clone https://github.com/empaeconversion/pyflowbatt.git
89
+
90
+ cd pyflowbatt
91
+
92
+ uv sync
93
+ ```
94
+ Then open this folder in an editor like VSCode.
95
+
96
+ You should always create a new branch before making edits, `main` is only for tested, working code that everyone can use.
97
+
98
+ E.g. make and switch to a new branch with
99
+ ```
100
+ git checkout -b new-feature
101
+ ```
102
+
103
+ 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.
104
+
105
+ 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.
106
+
@@ -0,0 +1,87 @@
1
+ # 🌊 PyFlowBatt
2
+
3
+ This Python package contains functions and a CLI for analysing data from the flow battery lab at Empa.
4
+
5
+
6
+ ## Installation
7
+
8
+ Use Python >3.10, and install with pip:
9
+ ```
10
+ pip install git+https://github.com/empaeconversion/pyflowbatt.git
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Use in a terminal (e.g. Command Prompt or PowerShell).
16
+
17
+ To analyse data and get a full summary and ro-crate, use `pyflowbatt --folder="path/to/your/folder"`.
18
+
19
+ To zip everything at the end (e.g. to upload to Zenodo), use `pyflowbatt --folder="path/to/your/folder" --zip`.
20
+
21
+ You can also navigate to a folder e.g.
22
+ ```
23
+ cd path/to/your/folder
24
+ pyflowbatt
25
+ ```
26
+ 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.
27
+
28
+ A full analysis can take a while. You can do a 'dry run' to check what files *would* be analysed:
29
+ ```
30
+ pyflowbatt --dry
31
+ ```
32
+
33
+ ```
34
+ pyflowbatt --dry --folder="path/to/your/folder" --zip
35
+ ```
36
+ This is useful for checking everything is in order before running a long analysis.
37
+
38
+ 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.
39
+
40
+ ## Using in Python
41
+
42
+ You can also use the functions in Python, e.g.
43
+
44
+ ```python
45
+ # Use individual functions
46
+ from pyflowbatt import gcpl, lsv, cv
47
+ from pyflowbatt.read import read_to_bdf
48
+
49
+ df = read_to_bdf("path/to/my/gcpl-file")
50
+ df, cycle_df = gcpl.analyse(df)
51
+
52
+ cv_df = read_to_bdf("path/to/my/cv-file")
53
+ cv_df, cv_cycle_df, capacitance_mF = cv.analyse(cv_df)
54
+
55
+ lsv_df = read_to_bdf("path/to/my/lsv-file")
56
+ lsv_result_dict = lsv.analyse(lsv_df)
57
+
58
+ # Or run the full analysis on folders
59
+ from pyflowbatt.analysis import analyse_sample, analyse_all_samples
60
+ analyse_sample("path/to/sample/folder")
61
+ analyse_all_samples("path/to/parent/folder/of/many/samples")
62
+ ```
63
+
64
+ ## For contributors
65
+
66
+ If you find bugs, or want new features, open an *issue* on the GitHub page.
67
+
68
+ If you want to directly contribute to the project, it is easiest to use the tool 'uv':
69
+ ```
70
+ git clone https://github.com/empaeconversion/pyflowbatt.git
71
+
72
+ cd pyflowbatt
73
+
74
+ uv sync
75
+ ```
76
+ Then open this folder in an editor like VSCode.
77
+
78
+ You should always create a new branch before making edits, `main` is only for tested, working code that everyone can use.
79
+
80
+ E.g. make and switch to a new branch with
81
+ ```
82
+ git checkout -b new-feature
83
+ ```
84
+
85
+ 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.
86
+
87
+ 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.
@@ -0,0 +1 @@
1
+ """PyFlowBatt."""