battery-data-steward 0.4.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.
- battery_data_steward-0.4.0/CHANGELOG.md +132 -0
- battery_data_steward-0.4.0/LICENSE +21 -0
- battery_data_steward-0.4.0/MANIFEST.in +15 -0
- battery_data_steward-0.4.0/NOTICE.md +11 -0
- battery_data_steward-0.4.0/PKG-INFO +502 -0
- battery_data_steward-0.4.0/README.md +443 -0
- battery_data_steward-0.4.0/SECURITY.md +22 -0
- battery_data_steward-0.4.0/docs/api-reference.md +565 -0
- battery_data_steward-0.4.0/docs/bdf-compatibility.md +18 -0
- battery_data_steward-0.4.0/docs/current-sign.md +63 -0
- battery_data_steward-0.4.0/docs/diagnostics.md +179 -0
- battery_data_steward-0.4.0/docs/export-template.md +108 -0
- battery_data_steward-0.4.0/docs/fixture-contribution.md +45 -0
- battery_data_steward-0.4.0/docs/index.md +20 -0
- battery_data_steward-0.4.0/docs/integrations/battery-archive.md +103 -0
- battery_data_steward-0.4.0/docs/integrations/beep.md +93 -0
- battery_data_steward-0.4.0/docs/integrations/cellpy.md +67 -0
- battery_data_steward-0.4.0/docs/integrations/duckdb.md +85 -0
- battery_data_steward-0.4.0/docs/integrations/polars.md +78 -0
- battery_data_steward-0.4.0/docs/integrations/pybamm.md +78 -0
- battery_data_steward-0.4.0/docs/integrations/pyprobe.md +78 -0
- battery_data_steward-0.4.0/docs/integrations.md +38 -0
- battery_data_steward-0.4.0/docs/project-direction.md +50 -0
- battery_data_steward-0.4.0/docs/releasing.md +95 -0
- battery_data_steward-0.4.0/docs/schema-compatibility.md +61 -0
- battery_data_steward-0.4.0/docs/step-cycle-semantics.md +53 -0
- battery_data_steward-0.4.0/docs/supported-formats.md +87 -0
- battery_data_steward-0.4.0/docs/warning-codes.md +49 -0
- battery_data_steward-0.4.0/examples/notebooks/zenodo_stack_pressure_arbin_workbook.md +221 -0
- battery_data_steward-0.4.0/pyproject.toml +98 -0
- battery_data_steward-0.4.0/setup.cfg +4 -0
- battery_data_steward-0.4.0/src/battery_data_standard/__init__.py +99 -0
- battery_data_steward-0.4.0/src/battery_data_standard/__main__.py +5 -0
- battery_data_steward-0.4.0/src/battery_data_standard/_version.py +3 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/__init__.py +5 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/arbin.py +84 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/base.py +124 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/basytec.py +88 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/biologic.py +246 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/generic.py +40 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/landt.py +36 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/maccor.py +122 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/neware.py +1733 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/normalization.py +912 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/novonix.py +29 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/pec.py +49 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/registry.py +150 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/repower.py +57 -0
- battery_data_steward-0.4.0/src/battery_data_standard/adapters/simple.py +27 -0
- battery_data_steward-0.4.0/src/battery_data_standard/api.py +1007 -0
- battery_data_steward-0.4.0/src/battery_data_standard/archive.py +224 -0
- battery_data_steward-0.4.0/src/battery_data_standard/audit.py +678 -0
- battery_data_steward-0.4.0/src/battery_data_standard/cli.py +550 -0
- battery_data_steward-0.4.0/src/battery_data_standard/diagnostics.py +406 -0
- battery_data_steward-0.4.0/src/battery_data_standard/doctor.py +361 -0
- battery_data_steward-0.4.0/src/battery_data_standard/eis.py +467 -0
- battery_data_steward-0.4.0/src/battery_data_standard/exceptions.py +45 -0
- battery_data_steward-0.4.0/src/battery_data_standard/export.py +483 -0
- battery_data_steward-0.4.0/src/battery_data_standard/inspection.py +329 -0
- battery_data_steward-0.4.0/src/battery_data_standard/io.py +1204 -0
- battery_data_steward-0.4.0/src/battery_data_standard/kind.py +331 -0
- battery_data_steward-0.4.0/src/battery_data_standard/profiles.py +86 -0
- battery_data_steward-0.4.0/src/battery_data_standard/py.typed +1 -0
- battery_data_steward-0.4.0/src/battery_data_standard/quality.py +420 -0
- battery_data_steward-0.4.0/src/battery_data_standard/reporting.py +1072 -0
- battery_data_steward-0.4.0/src/battery_data_standard/reports.py +125 -0
- battery_data_steward-0.4.0/src/battery_data_standard/schema.py +507 -0
- battery_data_steward-0.4.0/src/battery_data_standard/summary.py +111 -0
- battery_data_steward-0.4.0/src/battery_data_standard/time_sampling.py +399 -0
- battery_data_steward-0.4.0/src/battery_data_standard/validation.py +111 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/PKG-INFO +502 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/SOURCES.txt +76 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/dependency_links.txt +1 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/entry_points.txt +2 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/requires.txt +39 -0
- battery_data_steward-0.4.0/src/battery_data_steward.egg-info/top_level.txt +2 -0
- battery_data_steward-0.4.0/src/bds/__init__.py +5 -0
- battery_data_steward-0.4.0/src/bds/py.typed +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.4.0 - 2026-10-14
|
|
6
|
+
|
|
7
|
+
- Rename the project and PyPI distribution to Battery Data Steward
|
|
8
|
+
(`battery-data-steward`) and position it around inspection, quality assurance,
|
|
9
|
+
and evidence-aware preprocessing.
|
|
10
|
+
- Preserve `bds`, the `battery_data_standard` module, public exception classes,
|
|
11
|
+
schema versions, and serialized export identifiers for compatibility.
|
|
12
|
+
- Update installation guidance, optional-extra errors, CLI branding,
|
|
13
|
+
integration documentation, and the example notebook.
|
|
14
|
+
- Document PyPI publishing migration and distinguish current capabilities from
|
|
15
|
+
planned research-readiness assessment. The new distribution must be published
|
|
16
|
+
before its PyPI installation command is available.
|
|
17
|
+
|
|
18
|
+
- Follow up on preprocessing integrity: count only eligible interpolations
|
|
19
|
+
against row limits, preserve interpolation dtypes, and report partial repairs.
|
|
20
|
+
- Align explain sampling defaults with conversion; report boundary-skipped points.
|
|
21
|
+
- Skip and report empty/repeated-header EIS rows; expose explicit phase units and
|
|
22
|
+
warn for unspecified units. Preserve per-sheet batch results across failures.
|
|
23
|
+
- Remove first-letter current-state guesses; warn when source power is preserved
|
|
24
|
+
after current-sign changes.
|
|
25
|
+
- Fix formatted duration scaling, extended durations, legacy microamp decoding,
|
|
26
|
+
dotted dates and configurable slash-date ordering.
|
|
27
|
+
- Preserve and split undirected accumulators by explicit status; remove incorrect
|
|
28
|
+
BioLogic flag/capacity fallbacks and support NEWARE Chinese headers/states.
|
|
29
|
+
- Require explicit mappings for headerless wide inputs and explicit multi-channel
|
|
30
|
+
workbook selection. Reject ambiguous comma numeric strings.
|
|
31
|
+
- Use discharge-positive current by default for PyBaMM conversion targets.
|
|
32
|
+
- Require declared reset semantics for capacity totals and use one-pass repeated
|
|
33
|
+
step detection rather than a full table scan for every cycle.
|
|
34
|
+
|
|
35
|
+
- Compute derived power after current-sign normalization.
|
|
36
|
+
- Change conversion and batch sampling defaults to warning-only; interpolation
|
|
37
|
+
requires explicit opt-in and skips known cycle/step boundaries and timer resets.
|
|
38
|
+
- Honor explicit EIS degree/radian phase units; conventional unitless phase
|
|
39
|
+
headers use degrees rather than guessing from value magnitude.
|
|
40
|
+
- Reject nonempty invalid EIS source rows instead of silently writing a partial spectrum.
|
|
41
|
+
- Reject empty EIS tables and unsupported EIS schema versions during validation.
|
|
42
|
+
|
|
43
|
+
- Write the Unicode milliohm regression fixture explicitly as UTF-8 for Windows.
|
|
44
|
+
|
|
45
|
+
- Added the unified `bds inspect` command and `bds.inspect()` API for
|
|
46
|
+
non-mutating single-file detection, mapping, validation findings, and next
|
|
47
|
+
steps.
|
|
48
|
+
- Added bounded inspection findings plus JSON, HTML, Excel, and PDF inspection
|
|
49
|
+
report writers. Target output is explicitly labeled as a mapping preview, not
|
|
50
|
+
a conformance result.
|
|
51
|
+
- Kept `doctor` and `explain` behavior and public APIs compatible.
|
|
52
|
+
|
|
53
|
+
## 0.3.1 - 2026-06-10
|
|
54
|
+
|
|
55
|
+
- Removed notebooks that contained local/private path outputs.
|
|
56
|
+
- Updated release metadata and public version checks for the 0.3.1 release.
|
|
57
|
+
|
|
58
|
+
## 0.3.0 - 2026-06-10
|
|
59
|
+
|
|
60
|
+
- Added Repower and PEC public fixture coverage.
|
|
61
|
+
- Added current-sign sanity and step/cycle semantic diagnostics to conversion
|
|
62
|
+
metadata and audit reports.
|
|
63
|
+
- Switched current-sign sanity to an opt-in adjacent-point check for files that
|
|
64
|
+
need extra sign review.
|
|
65
|
+
- Added a fixture contribution guide for privacy-preserving regression files.
|
|
66
|
+
- Added `bds doctor`, adapter `evidence_tier` metadata, and ambiguous
|
|
67
|
+
temperature-semantics warnings.
|
|
68
|
+
|
|
69
|
+
## 0.2.2 - 2026-06-05
|
|
70
|
+
|
|
71
|
+
- Added Arbin auxiliary temperature aliases for encoded `Aux_Temperature(... )_1`
|
|
72
|
+
workbook headers so they export as `Ambient Temperature (degC)`.
|
|
73
|
+
|
|
74
|
+
## 0.2.1 - 2026-06-04
|
|
75
|
+
|
|
76
|
+
- Added `bds explain` diagnostics and report writers for JSON, HTML, Excel, and
|
|
77
|
+
PDF outputs.
|
|
78
|
+
- Added `report_path="auto"` and regular time-sampling gap diagnostics for
|
|
79
|
+
conversion reports.
|
|
80
|
+
- Added public API exports for export frames, file validation, and report-writing
|
|
81
|
+
helpers.
|
|
82
|
+
- Improved audit filtering, optional-column scoring, data-kind detection aliases,
|
|
83
|
+
and current-sign evidence reuse.
|
|
84
|
+
|
|
85
|
+
## 0.2.0 - 2026-06-01
|
|
86
|
+
|
|
87
|
+
- Added export targets for DuckDB, Polars, cellpy, BEEP, PyBaMM, PyProBE, and Battery Archive workflows.
|
|
88
|
+
- Added `bds audit` and API support for intake quality scoring across raw folders.
|
|
89
|
+
- Added Repower and PEC adapters, BioLogic `.mpr` support through the optional `mpr` extra, and Gamry `.DTA` EIS reading.
|
|
90
|
+
- Lowered the supported Python floor to Python 3.10 and expanded CI coverage to Python 3.10 through 3.13.
|
|
91
|
+
|
|
92
|
+
## 0.1.2 - 2026-05-30
|
|
93
|
+
|
|
94
|
+
- Documented how to preserve raw current sign and apply explicit time-axis
|
|
95
|
+
repairs for real experimental datasets.
|
|
96
|
+
- Documented how to display user-facing export labels such as `Test Time (s)`,
|
|
97
|
+
`Voltage (V)`, and `Current (A)` from the internal normalized dataframe.
|
|
98
|
+
- Added Arbin Excel workbook hardening so `Channel_*` sheets are preferred
|
|
99
|
+
over duplicate/raw `RawData_*` sheets during automatic time-series reading.
|
|
100
|
+
- Added EIS Excel workbook hardening for Arbin/Gamry-style `ACIM_*` sheets
|
|
101
|
+
with `Freq`, `Zmod`, and `Zphz` magnitude/phase columns.
|
|
102
|
+
- Added MATLAB vector mapping improvements for Novonix-style
|
|
103
|
+
`CurrentData`/`VoltageData`/`TimeData` files and struct fields such as
|
|
104
|
+
`Dataset.U` and `Dataset.I`.
|
|
105
|
+
|
|
106
|
+
## 0.1.1 - 2026-05-27
|
|
107
|
+
|
|
108
|
+
- Improved CSV header detection for Novonix exports that place protocol and
|
|
109
|
+
step-limit sections before the `[Data]` table.
|
|
110
|
+
- Preserved Novonix attribution for files with `Date and Time`, `Run Time (h)`,
|
|
111
|
+
`Step Time (h)`, `Current (A)`, and `Potential (V)` columns after a structured
|
|
112
|
+
preamble.
|
|
113
|
+
|
|
114
|
+
## 0.1.0 - 2026-05-01
|
|
115
|
+
|
|
116
|
+
- Published the initial public package for battery cycler data conversion.
|
|
117
|
+
- Added the `battery_data_standard` Python package and the `bds` import alias.
|
|
118
|
+
- Added the `bds` command-line interface for format detection, conversion, validation,
|
|
119
|
+
schema inspection, and batch processing.
|
|
120
|
+
- Added adapters for NEWARE, Arbin, Maccor, BioLogic, Novonix, BaSyTec, LANDT,
|
|
121
|
+
and generic tabular exports.
|
|
122
|
+
- Added support for CSV, text, Excel, MATLAB, and Parquet input families where
|
|
123
|
+
time, voltage, and current data can be mapped to the standard schema.
|
|
124
|
+
- Added standardized BDS time-series outputs with validation reports,
|
|
125
|
+
column provenance, source metadata, and optional sidecar reports.
|
|
126
|
+
- Added EIS detection, reading, conversion, and validation entry points.
|
|
127
|
+
- Added archive-aware batch conversion with JSONL manifests for directories and
|
|
128
|
+
supported archive files.
|
|
129
|
+
- Added step-level and cycle-level summary helpers for normalized time-series
|
|
130
|
+
data.
|
|
131
|
+
- Set the normalized current convention to charge-positive and discharge-negative
|
|
132
|
+
by default.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Battery Data Standard contributors
|
|
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,15 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include NOTICE.md
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include SECURITY.md
|
|
6
|
+
exclude CONTRIBUTING.md
|
|
7
|
+
recursive-include docs *.md
|
|
8
|
+
recursive-include examples/notebooks *.md
|
|
9
|
+
recursive-include src/battery_data_standard py.typed
|
|
10
|
+
recursive-include src/bds py.typed
|
|
11
|
+
prune tests
|
|
12
|
+
prune tools
|
|
13
|
+
global-exclude __pycache__
|
|
14
|
+
global-exclude *.py[cod]
|
|
15
|
+
global-exclude .DS_Store
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Notices
|
|
2
|
+
|
|
3
|
+
Battery Data Steward is an independent, vendor-neutral open-source toolkit for
|
|
4
|
+
battery data inspection, quality assurance, and reviewable preprocessing. It is
|
|
5
|
+
not affiliated with, endorsed by, or certified by any cycler vendor or standards
|
|
6
|
+
body. Validation of supported tables does not certify fitness for a particular
|
|
7
|
+
scientific analysis.
|
|
8
|
+
|
|
9
|
+
The project was previously named Battery Data Standard. Historical copyright
|
|
10
|
+
notices, Python module paths, exception names, and serialized format identifiers
|
|
11
|
+
remain valid and are retained for attribution and compatibility.
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: battery-data-steward
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Evidence-aware battery data inspection, quality assurance, and preprocessing.
|
|
5
|
+
Author: Battery Data Steward contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/shiyunliu-battery/Battery-Data-Steward
|
|
8
|
+
Project-URL: Issues, https://github.com/shiyunliu-battery/Battery-Data-Steward/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/shiyunliu-battery/Battery-Data-Steward/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Documentation, https://github.com/shiyunliu-battery/Battery-Data-Steward#readme
|
|
11
|
+
Keywords: battery,cycler,data-conversion,data-quality,preprocessing,provenance,eis,neware,arbin
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: polars>=0.20
|
|
26
|
+
Requires-Dist: pandas>=2.0
|
|
27
|
+
Requires-Dist: openpyxl>=3.1
|
|
28
|
+
Requires-Dist: xlrd>=2.0
|
|
29
|
+
Requires-Dist: reportlab>=4.0
|
|
30
|
+
Provides-Extra: yaml
|
|
31
|
+
Requires-Dist: PyYAML>=6.0; extra == "yaml"
|
|
32
|
+
Provides-Extra: matlab
|
|
33
|
+
Requires-Dist: scipy>=1.10; extra == "matlab"
|
|
34
|
+
Requires-Dist: h5py>=3.8; extra == "matlab"
|
|
35
|
+
Provides-Extra: mpr
|
|
36
|
+
Requires-Dist: galvani>=0.5; extra == "mpr"
|
|
37
|
+
Provides-Extra: report
|
|
38
|
+
Requires-Dist: reportlab>=4.0; extra == "report"
|
|
39
|
+
Provides-Extra: test
|
|
40
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
41
|
+
Requires-Dist: pytest-cov>=5.0; extra == "test"
|
|
42
|
+
Requires-Dist: PyYAML>=6.0; extra == "test"
|
|
43
|
+
Requires-Dist: scipy>=1.10; extra == "test"
|
|
44
|
+
Requires-Dist: h5py>=3.8; extra == "test"
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
47
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
48
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
49
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
50
|
+
Requires-Dist: PyYAML>=6.0; extra == "dev"
|
|
51
|
+
Requires-Dist: scipy>=1.10; extra == "dev"
|
|
52
|
+
Requires-Dist: h5py>=3.8; extra == "dev"
|
|
53
|
+
Requires-Dist: galvani>=0.5; extra == "dev"
|
|
54
|
+
Requires-Dist: reportlab>=4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
56
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
57
|
+
Requires-Dist: pip-audit>=2.7; extra == "dev"
|
|
58
|
+
Dynamic: license-file
|
|
59
|
+
|
|
60
|
+
# Battery Data Steward
|
|
61
|
+
|
|
62
|
+
**Inspect. Validate. Trace. Reuse.**
|
|
63
|
+
|
|
64
|
+
Evidence-aware battery data preprocessing and quality assurance.
|
|
65
|
+
|
|
66
|
+
[](CHANGELOG.md)
|
|
67
|
+
[](pyproject.toml)
|
|
68
|
+
[](LICENSE)
|
|
69
|
+
[](pyproject.toml)
|
|
70
|
+
|
|
71
|
+
Battery Data Steward (BDS) is an open-source Python toolkit that helps researchers
|
|
72
|
+
inspect raw battery data, identify quality risks, track preprocessing decisions,
|
|
73
|
+
and prepare reviewable datasets for downstream analysis.
|
|
74
|
+
|
|
75
|
+
BDS detects supported formats, explains column and unit mappings, identifies
|
|
76
|
+
time-axis and current-sign risks, reports unsupported fields, and converts
|
|
77
|
+
supported time-series and EIS data to CSV or Parquet with review reports.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
bds inspect raw_export.csv
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Inspection is local and non-mutating. It does not modify the source file,
|
|
84
|
+
insert missing samples, or silently change current values.
|
|
85
|
+
|
|
86
|
+
The package is vendor-neutral and independent. It is not certified by any cycler
|
|
87
|
+
vendor or standards body. Adapter support describes behavior implemented and
|
|
88
|
+
validated by this project; users should verify representative exports from their
|
|
89
|
+
own cycler software before using the package in automated production workflows.
|
|
90
|
+
|
|
91
|
+
## Installation
|
|
92
|
+
|
|
93
|
+
Python 3.10 or newer is required. The renamed distribution is
|
|
94
|
+
`battery-data-steward`, starting with the planned 0.4.0 release. The PyPI command
|
|
95
|
+
below becomes available after that release is published. Until then, install
|
|
96
|
+
this checkout with `python -m pip install .`.
|
|
97
|
+
|
|
98
|
+
When migrating an environment that has the old distribution installed, first run
|
|
99
|
+
`python -m pip uninstall battery-data-standard`. Both distributions provide the
|
|
100
|
+
same import paths and CLI, so they should not be installed together.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pip install --upgrade battery-data-steward
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Optional extras are available for additional input formats:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install "battery-data-steward[yaml]"
|
|
110
|
+
pip install "battery-data-steward[matlab]"
|
|
111
|
+
pip install "battery-data-steward[mpr]"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The distribution installs the `bds` command. Use the public short import;
|
|
115
|
+
the historical module path remains compatible:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import bds
|
|
119
|
+
|
|
120
|
+
# Existing code remains supported.
|
|
121
|
+
import battery_data_standard as bds
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Features
|
|
125
|
+
|
|
126
|
+
The package can:
|
|
127
|
+
|
|
128
|
+
- inspect unfamiliar battery cycler files before conversion;
|
|
129
|
+
- detect supported cycler and data formats;
|
|
130
|
+
- explain column, unit, and current-sign mappings;
|
|
131
|
+
- report missing fields, sampling gaps, and unmapped columns;
|
|
132
|
+
- provide suggested next steps when a file cannot be processed cleanly;
|
|
133
|
+
- convert supported time-series and EIS data to CSV or Parquet;
|
|
134
|
+
- generate JSON, HTML, Excel, and PDF reports;
|
|
135
|
+
- process directories, zip archives, and tar archives locally;
|
|
136
|
+
- export staging data for PyProBE, PyBaMM, cellpy, BEEP, DuckDB, and
|
|
137
|
+
Polars workflows;
|
|
138
|
+
- use optional column-mapping profiles for lab-specific headers.
|
|
139
|
+
|
|
140
|
+
The package does not upload source data to an external service. It reads local
|
|
141
|
+
files and writes local outputs.
|
|
142
|
+
|
|
143
|
+
## Quick Start
|
|
144
|
+
|
|
145
|
+
Inspect the installed version:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
bds --version
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Inspect an unfamiliar file:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
bds inspect raw_export.csv
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Preview mappings for a downstream target:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
bds inspect raw_export.csv --target pybamm --format json
|
|
161
|
+
bds inspect raw_export.csv --target pyprobe
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Write review reports:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
bds inspect raw_export.csv --output inspect.json --output inspect.html
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Detect only the likely cycler format:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
bds detect raw_export.csv
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Convert a time-series file:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
bds convert raw_export.csv normalized.bds.csv --cycler auto --report auto
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`--report auto` writes `normalized.bds.report.json` and
|
|
183
|
+
`normalized.bds.report.pdf` next to the converted CSV. Add
|
|
184
|
+
`--report-format html` or `--report-format xlsx` when those review formats are
|
|
185
|
+
needed.
|
|
186
|
+
|
|
187
|
+
Export directly to a downstream staging format:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
bds convert raw_export.csv pybamm_drive_cycle.csv --target pybamm
|
|
191
|
+
bds convert raw_export.csv pyprobe_staging.parquet --target pyprobe --format parquet
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Validate a converted file:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
bds validate normalized.bds.csv
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Convert a directory or archive and write a JSONL manifest:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
bds batch raw_exports normalized_exports --recursive --manifest manifest.jsonl
|
|
204
|
+
bds batch raw_exports.zip normalized_exports --manifest manifest.jsonl
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Audit a raw folder before committing to conversion:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
bds audit raw_exports --recursive --json audit.json --html audit.html
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The audit report scores each raw data file and highlights conversion failures,
|
|
214
|
+
missing required fields, unit conversions, time-axis repairs, current-sign
|
|
215
|
+
evidence, duplicate timestamps, non-monotonic time, suspicious flat
|
|
216
|
+
voltage/current, and cycle/step anomalies. Optional-column coverage is reported
|
|
217
|
+
separately so small but valid fixtures are not treated as low-quality data just
|
|
218
|
+
because they omit fields such as temperature or energy.
|
|
219
|
+
|
|
220
|
+
Inspect runtime adapter metadata and the pinned schema:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
bds formats
|
|
224
|
+
bds inspect-schema
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
`bds formats` reports each adapter's support tier and evidence tier so users can
|
|
228
|
+
tell whether support is backed by public fixtures or unit tests.
|
|
229
|
+
|
|
230
|
+
## Python API
|
|
231
|
+
|
|
232
|
+
Read a supported time-series export into a Polars dataframe:
|
|
233
|
+
|
|
234
|
+
```python
|
|
235
|
+
import bds
|
|
236
|
+
|
|
237
|
+
df = bds.read("raw_export.csv", cycler="auto")
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Show the user-facing export column names defined in the export template:
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
import bds
|
|
244
|
+
|
|
245
|
+
export_df = bds.to_export_frame(df)
|
|
246
|
+
print(export_df.columns)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Preserve Raw Current Sign And Repair Time Axis
|
|
250
|
+
|
|
251
|
+
For real experimental datasets, it is often useful to preserve the current sign
|
|
252
|
+
exactly as recorded by the source file, allow documented time-axis repairs, and
|
|
253
|
+
record any regular-sampling gaps:
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
df = bds.read(
|
|
257
|
+
path,
|
|
258
|
+
cycler="auto",
|
|
259
|
+
current_sign="preserve",
|
|
260
|
+
repair_policy="repair",
|
|
261
|
+
time_sampling_policy="warn",
|
|
262
|
+
)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Use `current_sign="preserve"` when downstream analysis should keep the raw
|
|
266
|
+
charge/discharge sign convention from the instrument. Use
|
|
267
|
+
`repair_policy="repair"` when the pipeline accepts documented normalizations
|
|
268
|
+
such as shifting elapsed test time to start at zero or sorting non-monotonic time
|
|
269
|
+
values.
|
|
270
|
+
|
|
271
|
+
When a fixed sampling interval is detected, BDS reports missing time points by
|
|
272
|
+
default (`time_sampling_policy="warn"`) without inserting rows. Explicitly set
|
|
273
|
+
`time_sampling_policy="repair"` to insert samples with
|
|
274
|
+
`time_sampling_interpolation="linear"`. Repairs skip gaps across known cycle or
|
|
275
|
+
step boundaries, unknown segment identifiers, and step-time resets. If segment
|
|
276
|
+
fields are absent, BDS cannot establish protocol boundaries: review the protocol
|
|
277
|
+
before enabling interpolation. Set `time_sampling_interval_s` when the cadence
|
|
278
|
+
is known.
|
|
279
|
+
|
|
280
|
+
Use an explicit cycler when the source format is known:
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
df = bds.read("arbin_export.csv", cycler="arbin")
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Convert a file and keep the conversion report:
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
report = bds.convert(
|
|
290
|
+
"raw_export.csv",
|
|
291
|
+
"normalized.bds.csv",
|
|
292
|
+
cycler="auto",
|
|
293
|
+
report_path="auto",
|
|
294
|
+
)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
This writes the converted CSV plus JSON and PDF reports. HTML and Excel reports
|
|
298
|
+
can be added with `report_formats=("html", "xlsx")`.
|
|
299
|
+
|
|
300
|
+
Write a downstream staging table by selecting an export target:
|
|
301
|
+
|
|
302
|
+
```python
|
|
303
|
+
bds.convert("raw_export.csv", "pybamm_drive_cycle.csv", target="pybamm")
|
|
304
|
+
bds.convert("raw_export.csv", "cellpy_staging.csv", target="cellpy")
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Read data and report information in memory:
|
|
308
|
+
|
|
309
|
+
```python
|
|
310
|
+
df, report = bds.read_with_report("raw_export.csv", cycler="auto", strict=False)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Create step-level or cycle-level summaries from a normalized dataframe:
|
|
314
|
+
|
|
315
|
+
```python
|
|
316
|
+
steps = bds.summarize_steps(df)
|
|
317
|
+
cycles = bds.summarize_cycles(df, capacity_reset="cycle")
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Internal Normalized Model and Export Targets
|
|
321
|
+
|
|
322
|
+
The converter uses an internal BDS time-series table as an implementation
|
|
323
|
+
contract for parsing and export. It is not presented as a universal
|
|
324
|
+
scientific-data quality guarantee. Every successful default export contains
|
|
325
|
+
three required fields:
|
|
326
|
+
|
|
327
|
+
| Field | Unit | Description |
|
|
328
|
+
| --- | --- | --- |
|
|
329
|
+
| `Test Time (s)` | s | Elapsed time from the start of the test. |
|
|
330
|
+
| `Voltage (V)` | V | Measured cell or channel voltage. |
|
|
331
|
+
| `Current (A)` | A | Measured current. |
|
|
332
|
+
|
|
333
|
+
Additional fields, such as cycle number, step number, capacity, energy,
|
|
334
|
+
temperature, power, and internal resistance, are included when they are available
|
|
335
|
+
in the source file.
|
|
336
|
+
|
|
337
|
+
The default BDS CSV and Parquet exports use user-facing labels with units in
|
|
338
|
+
parentheses. Lower-level adapter data may use internal labels; prefer
|
|
339
|
+
`bds convert` or `to_export_frame(..., target="bds")` for public handoff.
|
|
340
|
+
|
|
341
|
+
## Supported Format Families
|
|
342
|
+
|
|
343
|
+
The package includes adapters for NEWARE, Arbin, Maccor, BioLogic, Repower, PEC,
|
|
344
|
+
Novonix, BaSyTec, LANDT, and generic tabular exports. Generic readers support
|
|
345
|
+
delimited text, Excel, MATLAB, and Parquet inputs where the file contains or can
|
|
346
|
+
be mapped to time, voltage, and current columns.
|
|
347
|
+
|
|
348
|
+
BioLogic `.mpt` text exports are supported by default. Binary BioLogic `.mpr`
|
|
349
|
+
files are supported through the optional `mpr` extra, which installs the
|
|
350
|
+
`galvani` backend.
|
|
351
|
+
|
|
352
|
+
See [docs/supported-formats.md](docs/supported-formats.md) for adapter scope and
|
|
353
|
+
support-tier definitions.
|
|
354
|
+
|
|
355
|
+
## EIS Data
|
|
356
|
+
|
|
357
|
+
EIS files use a separate standardized table from row-wise time-series data.
|
|
358
|
+
Use EIS-specific commands or API functions for known impedance files:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
bds detect-kind impedance.csv
|
|
362
|
+
bds convert-eis impedance.csv normalized.eis.csv
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
```python
|
|
366
|
+
eis = bds.read_eis("impedance.csv")
|
|
367
|
+
report = bds.convert_eis("impedance.csv", "normalized.eis.csv")
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
EIS conversion skips entirely empty rows and exact repeated header rows, records
|
|
371
|
+
cleanup notices, and rejects nonempty rows with invalid numeric data or
|
|
372
|
+
non-positive frequency. Errors identify a parsed table row, not a physical file
|
|
373
|
+
line. Explicit `deg` or `rad` phase labels determine the unit. Unitless `Zphz`,
|
|
374
|
+
`Zphase`, and `Phase` headers assume degrees with a warning; use
|
|
375
|
+
`read_eis(path, phase_unit="rad")` or `bds convert-eis ... --phase-unit rad` to
|
|
376
|
+
override that assumption. Conversion reports retain these notices.
|
|
377
|
+
|
|
378
|
+
`read()` and `convert()` are time-series entry points. `batch` and
|
|
379
|
+
`batch_convert()` can route mixed directories and archives that contain
|
|
380
|
+
time-series files, EIS files, including Gamry `.DTA` ZCURVE files, and
|
|
381
|
+
unsupported helper files.
|
|
382
|
+
|
|
383
|
+
## Column-Mapping Profiles
|
|
384
|
+
|
|
385
|
+
Profiles map lab-specific column names to canonical column names. JSON profiles
|
|
386
|
+
are supported by the base installation. YAML profiles require the `yaml` extra.
|
|
387
|
+
|
|
388
|
+
```json
|
|
389
|
+
{
|
|
390
|
+
"columns": {
|
|
391
|
+
"test_time": "time_seconds",
|
|
392
|
+
"voltage": "cell_voltage",
|
|
393
|
+
"current": "cell_current"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Use a profile from the CLI:
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
bds convert lab_export.csv normalized.bds.csv --cycler generic --profile profile.json
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
## Intake Ambiguities and Accumulator Summaries
|
|
405
|
+
|
|
406
|
+
Dotted dates such as `01.02.2023` are parsed day-first. Slash-separated dates
|
|
407
|
+
retain month-first parsing with a warning; set `"date_order": "dayfirst"` or
|
|
408
|
+
`"monthfirst"` in a mapping profile. Profiles also accept an explicit `encoding`
|
|
409
|
+
when automatic legacy encoding detection is uncertain. Ambiguous strings such
|
|
410
|
+
as `"1,000"` are rejected rather than guessing whether a comma is a decimal or
|
|
411
|
+
thousands separator. Set profile `"decimal_separator": ","` for decimal commas
|
|
412
|
+
or `"decimal_separator": "."` for decimal points and comma thousands separators.
|
|
413
|
+
|
|
414
|
+
Headerless wide files require explicit column mapping. Multiple Arbin channel
|
|
415
|
+
sheets require an explicit `sheet` or `batch --excel-sheets all`; independent
|
|
416
|
+
channels are never silently concatenated. Sheet-level batch failures retain
|
|
417
|
+
successful records and processing continues unless `fail_fast=True`.
|
|
418
|
+
|
|
419
|
+
Undirected capacity/energy values are preserved as `source_capacity_ah` or
|
|
420
|
+
`source_energy_wh`. Directional fields are derived only from recognizable
|
|
421
|
+
charge/discharge status. Reports carry `accumulator_reset_scope`, defaulting to
|
|
422
|
+
`unknown`; a profile can declare the scope after protocol review.
|
|
423
|
+
|
|
424
|
+
`summarize_cycles(df)` warns when reset scope is unknown and labels maxima as
|
|
425
|
+
recorded maxima, not transferred totals. Use `capacity_reset="cycle"` for
|
|
426
|
+
cycle-reset accumulators or `capacity_reset="step"` to sum maxima from consecutive
|
|
427
|
+
step segments. These modes require complete, zero-based accumulator coverage;
|
|
428
|
+
truncated measurements and test-wide accumulators need a separate baseline-aware
|
|
429
|
+
calculation. BDS does not invent cycle identifiers or integrate missing capacity.
|
|
430
|
+
|
|
431
|
+
## Current Sign Convention
|
|
432
|
+
|
|
433
|
+
The default current convention for reading and BDS exports is charge-positive
|
|
434
|
+
and discharge-negative. `convert(..., target="pybamm")` and batch PyBaMM exports
|
|
435
|
+
instead default to discharge-positive. An explicit `current_sign` overrides the
|
|
436
|
+
target default. Source power values are preserved; if current normalization
|
|
437
|
+
changes their corresponding current values, reports warn that the source power
|
|
438
|
+
sign convention requires review.
|
|
439
|
+
|
|
440
|
+
Use `--current-sign preserve` to retain the source sign convention, or
|
|
441
|
+
`--current-sign discharge-positive` when a downstream workflow requires
|
|
442
|
+
discharge-positive current. When a source file contains a recognizable
|
|
443
|
+
charge/discharge status column, adapters use it to normalize current sign more
|
|
444
|
+
explicitly.
|
|
445
|
+
|
|
446
|
+
BDS can record a warning-only adjacent-point current-sign sanity check in
|
|
447
|
+
conversion metadata and audit records when `current_sign` is charge-positive or
|
|
448
|
+
discharge-positive. Use `--current-sign-check adjacent` to enable this O(n)
|
|
449
|
+
heuristic for files that need extra sign review.
|
|
450
|
+
|
|
451
|
+
## Validation and Reports
|
|
452
|
+
|
|
453
|
+
Every conversion returns a machine-readable report with schema version, row
|
|
454
|
+
count, columns, validation status, warnings, provenance, adapter metadata, repair
|
|
455
|
+
operations, and time-sampling findings. With `report_path="auto"`, BDS writes
|
|
456
|
+
JSON and PDF reports by default; HTML and Excel reports are optional formats.
|
|
457
|
+
|
|
458
|
+
Strict validation is enabled by default. Repairable issues are reported with the
|
|
459
|
+
default `repair_policy="warn"`. Use `repair_policy="repair"` or
|
|
460
|
+
`--repair-policy repair` only when the pipeline explicitly accepts the documented
|
|
461
|
+
normalizations.
|
|
462
|
+
|
|
463
|
+
## Research Scope and Roadmap
|
|
464
|
+
|
|
465
|
+
Today, BDS provides data inspection, table validation, diagnostics, conversion,
|
|
466
|
+
and reports containing available provenance, parameters, warnings, and recorded
|
|
467
|
+
repair operations. These outputs help researchers review data and processing;
|
|
468
|
+
a successful conversion or validation does not establish that a dataset can
|
|
469
|
+
support SOH, RUL, EIS fitting, or a specific scientific conclusion.
|
|
470
|
+
|
|
471
|
+
The planned **Battery Data Quality & Readiness Package** would add task-specific
|
|
472
|
+
readiness criteria, explicit unresolved evidence, and review decisions. These
|
|
473
|
+
readiness gates and a full transformation evidence workflow are future work,
|
|
474
|
+
not current capabilities. See [project direction](docs/project-direction.md).
|
|
475
|
+
|
|
476
|
+
BDS focuses on input quality and preprocessing review. Battery-Feature-Lab
|
|
477
|
+
focuses on feature extraction and diagnostics; Battery Context focuses on
|
|
478
|
+
evidence packages and scientific sufficiency. These are complementary project
|
|
479
|
+
boundaries, not bundled integrations or guarantees of scientific validity.
|
|
480
|
+
|
|
481
|
+
## Documentation
|
|
482
|
+
|
|
483
|
+
Public documentation is in the `docs` directory:
|
|
484
|
+
|
|
485
|
+
- [Package migration and publishing](docs/releasing.md)
|
|
486
|
+
- [Project direction and roadmap](docs/project-direction.md)
|
|
487
|
+
- [Python API reference](docs/api-reference.md)
|
|
488
|
+
- [Supported formats](docs/supported-formats.md)
|
|
489
|
+
- [Export template](docs/export-template.md)
|
|
490
|
+
- [Export targets](docs/export-template.md#export-targets)
|
|
491
|
+
- [Schema compatibility](docs/schema-compatibility.md)
|
|
492
|
+
- [Diagnostics and audit reports](docs/diagnostics.md)
|
|
493
|
+
- [Current sign convention](docs/current-sign.md)
|
|
494
|
+
- [Step and cycle semantics](docs/step-cycle-semantics.md)
|
|
495
|
+
- [Warning and issue codes](docs/warning-codes.md)
|
|
496
|
+
- [Fixture contribution guide](docs/fixture-contribution.md)
|
|
497
|
+
- [Ecosystem integrations](docs/integrations.md)
|
|
498
|
+
|
|
499
|
+
## License and Attribution
|
|
500
|
+
|
|
501
|
+
This project is distributed under the MIT License. See [NOTICE.md](NOTICE.md)
|
|
502
|
+
for the project independence notice.
|