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

#958 added export_csv to parameter values and relevant tests #959

Merged
merged 3 commits into from
May 18, 2020

Conversation

Scottmar93
Copy link
Contributor

Description

Added a helper function to parameter values to export the whole dictionary as a csv file.

Fixes #958

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

@Scottmar93 Scottmar93 requested review from valentinsulzer and removed request for valentinsulzer April 15, 2020 11:15
@Scottmar93 Scottmar93 closed this Apr 15, 2020
@Scottmar93 Scottmar93 reopened this Apr 15, 2020
@codecov
Copy link

codecov bot commented Apr 15, 2020

Codecov Report

Merging #959 into develop will increase coverage by 0.00%.
The diff coverage is 97.77%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #959   +/-   ##
========================================
  Coverage    97.56%   97.56%           
========================================
  Files          233      232    -1     
  Lines        12109    12119   +10     
========================================
+ Hits         11814    11824   +10     
  Misses         295      295           
Impacted Files Coverage Δ
pybamm/parameters/parameter_values.py 99.63% <97.77%> (-0.37%) ⬇️

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 bdc5151...1ef960d. Read the comment docs.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

thanks @Scottmar93

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Having now read the issue, can you also move print_parameters to be a method of the ParameterValues class?

@valentinsulzer valentinsulzer merged commit 7d99e2a into develop May 18, 2020
@valentinsulzer valentinsulzer deleted the issue-958-parameter-values-csv branch May 18, 2020 22:11
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 ability to print all parameter values to a csv file
2 participants