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

Issue 1810 shortcuts #1822

Merged
merged 12 commits into from
Nov 25, 2021
Merged

Issue 1810 shortcuts #1822

merged 12 commits into from
Nov 25, 2021

Conversation

valentinsulzer
Copy link
Member

Description

Fixes #1810 . Should be entirely back-compatible

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 23, 2021

Codecov Report

Merging #1822 (cc21e58) into develop (6eab5e4) will increase coverage by 0.02%.
The diff coverage is 98.05%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1822      +/-   ##
===========================================
+ Coverage    99.23%   99.25%   +0.02%     
===========================================
  Files          340      340              
  Lines        18790    18773      -17     
===========================================
- Hits         18647    18634      -13     
+ Misses         143      139       -4     
Impacted Files Coverage Δ
pybamm/parameters/parameter_values.py 98.89% <94.11%> (-0.56%) ⬇️
...ollector/effective_resistance_current_collector.py 99.45% <97.82%> (+2.79%) ⬆️
pybamm/geometry/battery_geometry.py 100.00% <100.00%> (ø)
pybamm/meshes/meshes.py 97.93% <100.00%> (+0.18%) ⬆️
pybamm/meshes/one_dimensional_submeshes.py 100.00% <100.00%> (ø)
pybamm/meshes/scikit_fem_submeshes.py 100.00% <100.00%> (ø)
...m/models/full_battery_models/base_battery_model.py 99.71% <100.00%> (-0.01%) ⬇️
...l_battery_models/lead_acid/base_lead_acid_model.py 100.00% <100.00%> (ø)
...models/full_battery_models/lithium_ion/Yang2017.py 100.00% <100.00%> (ø)
...ttery_models/lithium_ion/base_lithium_ion_model.py 100.00% <100.00%> (ø)
... and 1 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 6eab5e4...cc21e58. Read the comment docs.

Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @tinosulzer !

@@ -11,7 +11,7 @@
}
)

param = pb.ParameterValues(chemistry=pb.parameter_sets.Mohtat2020)
param = pb.ParameterValues(pb.parameter_sets.Mohtat2020)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this just be "Mohtat2020"?

@@ -4,7 +4,7 @@
model = pb.lithium_ion.DFN()

chemistry = pb.parameter_sets.NCA_Kim2011
parameter_values = pb.ParameterValues(chemistry=chemistry)
parameter_values = pb.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this just be "Kim2011"?

@@ -17,7 +17,7 @@ def test_runs_Xu2019(self):

# load parameter values
chemistry = pybamm.parameter_sets.Xu2019
param = pybamm.ParameterValues(chemistry=chemistry)
param = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Xu2019"?

@@ -48,7 +48,7 @@ def test_runs_Chen2020(self):

# load parameter values
chemistry = pybamm.parameter_sets.Chen2020_plating
param = pybamm.ParameterValues(chemistry=chemistry)
param = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Chen2020_plating"?

chemistry = pybamm.parameter_sets.NCA_Kim2011
parameter_values = pybamm.ParameterValues(chemistry=chemistry)
parameter_values = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Kim2011"?

@@ -27,7 +27,7 @@ def test_load_params(self):
def test_standard_lithium_parameters(self):

chemistry = pybamm.parameter_sets.Prada2013
parameter_values = pybamm.ParameterValues(chemistry=chemistry)
parameter_values = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Prada2013"?

@@ -41,7 +41,7 @@ def test_load_params(self):
def test_standard_lithium_parameters(self):

chemistry = pybamm.parameter_sets.Chen2020
parameter_values = pybamm.ParameterValues(chemistry=chemistry)
parameter_values = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Chen2020"?

@@ -128,7 +128,7 @@ def test_functions(self):
def test_standard_lithium_parameters(self):

chemistry = pybamm.parameter_sets.ORegan2021
parameter_values = pybamm.ParameterValues(chemistry=chemistry)
parameter_values = pybamm.ParameterValues(chemistry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ORegan2021"?

@valentinsulzer valentinsulzer merged commit 0ab7c34 into develop Nov 25, 2021
@valentinsulzer valentinsulzer deleted the issue-1810-shortcuts branch November 25, 2021 19:47
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.

Add shortcuts for specifying parameter values and var_pts
2 participants