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 613 citing #818

Merged
merged 14 commits into from Feb 25, 2020
Merged

Issue 613 citing #818

merged 14 commits into from Feb 25, 2020

Conversation

valentinsulzer
Copy link
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
Copy link

codecov bot commented Feb 11, 2020

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
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
Member Author

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

@dalonsoa
Copy link
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
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
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?

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.

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

@valentinsulzer
Copy link
Member Author

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

@rtimms
Copy link
Contributor

rtimms commented Feb 25, 2020

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

@rtimms rtimms mentioned this pull request Feb 25, 2020
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