Add nominal capacity to cell - #1930
Draft
be-smith wants to merge 30 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ml-evs/bump-pydantic-final-final #1930 +/- ##
====================================================================
+ Coverage 80.02% 80.07% +0.04%
====================================================================
Files 83 83
Lines 7626 7644 +18
====================================================================
+ Hits 6103 6121 +18
Misses 1523 1523
🚀 New features to boost your workflow:
|
Move back to descriptions in field docstrings and configure this with customised BaseModel More model updates for pydantic v2
Rework ITEMS_FTS_FIELDS lookup
Fixes for routes Chatblock patch; set default values in block More updates for blocks
More updates for models Fixes for models Simplify item versioning model Remove unecessary by_alias=True
…okups to mongo module
…rve out for plugins
…d versions (pydantic 1 to 2 change)
Pydantic v2's model_json_schema() uses "$defs" instead of "definitions" (Pydantic v1). Update the four item-information components to use the correct key so possibleItemStatuses is no longer undefined.
ml-evs
force-pushed
the
ml-evs/bump-pydantic-final-final
branch
from
August 9, 2026 13:10
0969519 to
6d809c7
Compare
ml-evs
force-pushed
the
bes/nominal_cell_capacity_pydanticv2
branch
from
August 9, 2026 19:07
5b2b1a9 to
014be2e
Compare
datalab
|
||||||||||||||||||||||||||||
| Project |
datalab
|
| Branch Review |
bes/nominal_cell_capacity_pydanticv2
|
| Run status |
|
| Run duration | 22m 04s |
| Commit |
|
| Committer | Ben Smith |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
548
|
| View all changes introduced in this branch ↗︎ | |
ml-evs
force-pushed
the
ml-evs/bump-pydantic-final-final
branch
2 times, most recently
from
August 13, 2026 23:12
f112cf0 to
765d3b1
Compare
ml-evs
force-pushed
the
ml-evs/bump-pydantic-final-final
branch
2 times, most recently
from
August 20, 2026 16:17
623e1da to
c075b7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds theoretical/nominal capacity fields to Cell
Adds a theoretical_capacity field (mAh/g) to the Cell model. Combined with the existing characteristic_mass (active mass), it's used to compute nominal_capacity, shown and editable in its own unit (mAh/Ah) in the UI, and updates live as you type — no save round-trip needed.
The computed value is always normalized and additionally stored in nominal_capacity_mah, so plugins/API consumers can read a unit-independent value without having to handle nominal_capacity_unit conversions themselves.
nominal_capacity/nominal_capacity_mah are derived, not user-settable — they're recomputed server-side from theoretical_capacity * characteristic_mass on every save, so the stored value can't drift from the inputs.
Test plan
Stored in
nominal_capacity_mahfor use with plugins or the API