-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add functionality for third-party parameter sets #6
Conversation
This contains the BibTeX for the Python programming language
I shall be adding documentation and tests for the same in further pull requests, but I tested this with an example project and it works as intended (the parameter set is defined in in [project.entry-points.pybamm_parameter_sets]
custom_parameters = "src.pybamm_cookiecutter.my_parameters:get_parameter_values" and testing it as follows: >>> pybamm.parameter_sets.get_docstring("custom_parameters")
'\nExample docstring for a third-party parameter set titled `my_parameters`.\n\nReferences\n----------\n\nAdd references to the relevant papers here in this format, to be parsed by\nsphinxcontrib.bibtex in the documentation through a CITATIONS.bib file. You\nmay refer to the documentation for this extension at\nhttps://sphinxcontrib-bibtex.readthedocs.io/en/latest/\n\n:footcite:`van1995python`\n\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks, @agriyakhetarpal!
import numpy as np | ||
|
||
# Extra dependencies may be imported here. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add an example function and scalar parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a sample function with scalar parameters from the OKane2022 parameter set, let me know if that suffices
I will close this to allow @santacodes to work on this further. He will be looking to start with setting up some testing infrastructure and CI/CD, some additional build backends, and he will then proceed to add some parameter sets and a data file plugin (subject to further discussion on the design for the latter). |
This PR adds: a
cookiecutter.json
configuration to ask users if they wish to register a third-party parameter set, a basic example of a parameter set, and an entry point inpyproject.toml
for using it with PyBaMM