Add a 'State' section#112
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
=======================================
Coverage ? 97.01%
=======================================
Files ? 8
Lines ? 436
Branches ? 44
=======================================
Hits ? 423
Misses ? 7
Partials ? 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The current BPX standard doc allows multiple State variables to be expressed with colon-separated keys (e.g. This creates an issue in Pydantic, since the material names are not pre-defined and there's an arbitrary number of them. To handle this, each colon-separated key must be treated as “extra” fields rather than being strictly defined. This PR demonstrates that the current standard can be implemented this way, but it requires extensive regex matching and is therefore somewhat fragile - untested material names and dodgy formatting may slip through the validation. More importantly, these colon-separated variables cannot be accessed via dot notation like other variables (since we cannot predefine snake_case names for each one, and the BPX names have spaces in them). An alternative would be to slightly adapt the standard so it better reflects the current electrode structure. Instead of: we could allow each In this way each 'material' key in the electrode FYI @rtimms @ejfdickinson @martinjrobins - LMK which route you'd prefer to go with. |
|
This seems like a good idea to me on the software side, as long as we are free to modify the published standard? |
|
@pipliggins Thank you for this well-reasoned suggestion! For my part I think it would be fine to implement according to your suggested adaptation of the standard, and for @rtimms and I to advocate a matching 'patch' to the written standard at the first opportunity. |
|
@pipliggins can this be closed now in favour of #113 ? |
@rtimms Yes if everyone's happy with the implementation of #113 we can close this. |
|
Closing as superseded by #113 |
Fixes #4