Skip to content
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

#738 check model option #739

Merged
merged 4 commits into from
Nov 26, 2019
Merged

#738 check model option #739

merged 4 commits into from
Nov 26, 2019

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Nov 20, 2019

Description

Allows users to optionally skip model checks during discretisation, as this can be slow for large systems. By default the checks are performed, and it is recommended to do the model checks when developing, testing etc.

Fixes #738

Type 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.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link

codecov bot commented Nov 20, 2019

Codecov Report

Merging #739 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #739      +/-   ##
==========================================
+ Coverage   98.27%   98.32%   +0.04%     
==========================================
  Files         175      175              
  Lines        9351    10617    +1266     
==========================================
+ Hits         9190    10439    +1249     
- Misses        161      178      +17
Impacted Files Coverage Δ
pybamm/discretisations/discretisation.py 99.82% <100%> (+0.11%) ⬆️
pybamm/simulation.py 89.37% <100%> (+3.75%) ⬆️
pybamm/solvers/idaklu_solver.py 86.53% <0%> (-0.72%) ⬇️
pybamm/solvers/base_solver.py 96.68% <0%> (-0.72%) ⬇️
...m/models/full_battery_models/base_battery_model.py 99.56% <0%> (-0.07%) ⬇️
pybamm/solvers/dae_solver.py 99.47% <0%> (-0.06%) ⬇️
pybamm/models/base_model.py 98.48% <0%> (-0.04%) ⬇️
pybamm/models/submodels/base_submodel.py 100% <0%> (ø) ⬆️
pybamm/expression_tree/exceptions.py 100% <0%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68539d3...10a44a3. Read the comment docs.

@Scottmar93
Copy link
Contributor

Looks good, also add to simulation object as an option when solving and building?

@rtimms rtimms merged commit 26ab88c into master Nov 26, 2019
@valentinsulzer valentinsulzer deleted the issue-738-check-model branch December 7, 2019 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make check model optional
2 participants