-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Improve "Creating Models" series #4184
base: develop
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4184 +/- ##
========================================
Coverage 99.55% 99.55%
========================================
Files 288 289 +1
Lines 21856 21918 +62
========================================
+ Hits 21759 21821 +62
Misses 97 97 ☔ View full report in Codecov by Sentry. |
I think it's ok to leave out explanations of the simulation class in this series, and just stick to the models |
The PR is not yet ready, but I have hit a point where I would really benefit from some feedback before continuing. I believe that the 3 notebooks I have written introduce all the main features needed to write models except for Broadcasts. I was originally planning on introducing broadcasts in later notebooks, but they would fit well into notebook 2. Most of the questions I have on how to proceed are related to the model refactoring area #3908. I think everything revolves around the following question: how do we envision users will write their models? Will they write everything from scratch inheriting from the Another thing to include, either in notebook 3 or future notebooks, is how to get a Basic model to work with experiments. TLDRThe three models so far document all the main features someone would need to know to write their own models. There are other features that we could show, but the usefulness of this depends on how we expect users to write models. Additional questionsHere is a list of additional questions I have. They might open several cans of worms so please only spend time on them after you have given your thoughts on the main points above.
|
+ Added `basic_reservoir.py` adopted from Ferran's draft PR - pybamm-team/PyBaMM/pull/4184. + Added the `model entry` in `pyproject.toml`.
Description
Refactor and improve the Creating Models series notebooks. I have significantly refactored the existing notebooks, but the underpinning philosophy should be similar. The first few notebooks follow very closely the material from the training session in Oxford (Apr 24) which worked quite well.
Fixes #3844
List of notebooks
Other additions
BasicReservoir
modelType of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: