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

Added parameter entry points #15

Merged
merged 10 commits into from
Jul 8, 2024
Merged

Conversation

santacodes
Copy link
Collaborator

Additions -

  • parameter_sets.py from the main PyBaMM repository which acts as an entry point for the parameter sets mapped through the group cookie_parameter_sets.
  • Chen2020.py to test and load a parameter set through the entry point to ensure that everything works.
  • Tests to test the entry points.

Updates -

  • A nox dev session.
  • Updated rules in compliance with the main PyBaMM repository in pyproject.toml.

Accessing parameter sets through entry points here is the same as accessing it through PyBaMM. Instead using pybamm.parameter_sets here it would imply pybamm_cookiecutter.paramter_sets to access them. I think it would make it easier for current users to adapt to the template as the implementations are almost the same. Before release, the template should be modified in compliance with the module name a user would give.

@santacodes
Copy link
Collaborator Author

@arjxn-py @brosaplanella could you please review this PR?

noxfile.py Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
tests/test_entry_points.py Outdated Show resolved Hide resolved
Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Nice work, added some additional comments to Agriya's.

pyproject.toml Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Thanks @santacodes, it looks good. I've suggested some improvements. Feel free to let me know in case of something conflicting

src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
tests/test_entry_points.py Outdated Show resolved Hide resolved
noxfile.py Show resolved Hide resolved
noxfile.py Show resolved Hide resolved
Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Just a small comment, otherwise happy to merge if Agriya and Arjun are happy with it too.

LICENSES-bundled.txt Show resolved Hide resolved
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Looks good to me too, a few final comments! Thanks, @santacodes!

LICENSE Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/__init__.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/input/Chen2020.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
src/pybamm_cookiecutter/parameters/parameter_sets.py Outdated Show resolved Hide resolved
tests/test_entry_points.py Outdated Show resolved Hide resolved
tests/test_entry_points.py Outdated Show resolved Hide resolved
@arjxn-py arjxn-py mentioned this pull request Jul 8, 2024
Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Thanks @santacodes, merging this as you must have also started with model entry points so didn't want to hold this.
I hope it didn't raise any bottlenecks.

@arjxn-py arjxn-py merged commit 6636bcf into pybamm-team:main Jul 8, 2024
18 checks passed
@santacodes santacodes deleted the parametersets branch July 18, 2024 16:15
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.

None yet

4 participants