Skip to content

Issue 613 citing - #818

Merged
valentinsulzer merged 14 commits into
masterfrom
issue-613-citing
Feb 25, 2020
Merged

valentinsulzer merged 14 commits into
masterfrom
issue-613-citing

Conversation

@valentinsulzer

Copy link
Copy Markdown
Member

Description

Add citation for pybamm to readme, and add functionality to print citations for the specific parts (models/solvers/parameters) of pybamm that were used when running a simulation

Fixes #613

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

codecov Bot commented Feb 11, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #818 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #818      +/-   ##
==========================================
- Coverage   97.69%   97.68%   -0.01%     
==========================================
  Files         205      209       +4     
  Lines       10566    10587      +21     
==========================================
+ Hits        10322    10342      +20     
- Misses        244      245       +1
Impacted Files Coverage Δ
pybamm/simulation.py 94.33% <ø> (ø) ⬆️
pybamm/parameters_cli.py 0% <ø> (ø) ⬆️
...f6_Nyman2008/electrolyte_conductivity_Nyman2008.py 100% <100%> (ø)
...aphite_LGM50_electrolyte_reaction_rate_Chen2020.py 100% <100%> (ø)
pybamm/parameters/parameter_sets.py 100% <100%> (ø) ⬆️
...bamm/parameters/standard_parameters_lithium_ion.py 100% <100%> (ø) ⬆️
...20/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py 100% <100%> (ø)
...pf6_Nyman2008/electrolyte_diffusivity_Nyman2008.py 100% <100%> (ø)
pybamm/solvers/idaklu_solver.py 88.46% <0%> (-0.97%) ⬇️
... and 3 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 4a5973c...93ae55c. Read the comment docs.

@dalonsoa

Copy link
Copy Markdown
Contributor

Hi all,

Relevant to this PR, at Imperial we have created R2T2 precisely to cover this functionality. We are in the process of polishing it and making sure it serves the community, but it might be worth have a look at it and - hopefully - implement it :) . It is in PyPI and can be installed as any other dependency.

Please, have a look at it and let me know if you need some clarification or have any comment.

Best wishes,
Diego

@valentinsulzer

Copy link
Copy Markdown
Member Author

Looks great! I will change to use that and let you know if I have any questions

@dalonsoa

Copy link
Copy Markdown
Contributor

Reading the references from an external file and including the citations using a Key, which is what you use, is not implemented yet, but that specific functionality was in the backlog, so it might be a good time to implement it if that is the way you want to use it.

@valentinsulzer

Copy link
Copy Markdown
Member Author

it wouldn't be too bad, we could just keep the Citations class and then call them with @add_reference("short purpose", pybamm.citations["authorYear"]). But I'm wondering about testing that the right references are added for each functionality, and also being able to call this from a script (in case people don't like running from command line) - have messaged you on slack, might be quicker to sort out

@valentinsulzer

Copy link
Copy Markdown
Member Author

@dalonsoa I am tempted to merge this so we have it for v0.2.0 and then update to use R2T2 when that is ready, would that be ok with you?

@rtimms rtimms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks great thanks @tinosulzer ! do we also need a citation in the casadi solver?

@valentinsulzer

Copy link
Copy Markdown
Member Author

I assumed that this would be covered by convert_to_casadi but no harm adding it anyway

@rtimms

rtimms commented Feb 25, 2020

Copy link
Copy Markdown
Contributor

ah I missed that. yeah should be fine as is then

@rtimms rtimms mentioned this pull request Feb 25, 2020
6 of 8 tasks
@valentinsulzer
valentinsulzer merged commit 4bf5990 into master Feb 25, 2020
@valentinsulzer
valentinsulzer deleted the issue-613-citing branch February 25, 2020 22:06
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.

Citing PyBaMM

3 participants