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

implementing phase space plugin in picmi #5278

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

mafshari64
Copy link
Contributor

No description provided.

@mafshari64 mafshari64 marked this pull request as draft February 14, 2025 15:01

@typeguard.typechecked
class Plugin(RenderedObject):
"""general interface for all plugins"""
Copy link
Member

@BrianMarre BrianMarre Feb 18, 2025

Choose a reason for hiding this comment

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

you could implement as a safeguard a constructor to make sure nobody instantiates the base class directly

   def __init__(self):
       raise RunTimeError("abstract base class only")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess you mean RuntimeError instead of RunTimeError?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but I'd rather suggest using NotImplementedError. That's more specific.

@BrianMarre
Copy link
Member

you need to update the return type here:
https://github.com/mafshari64/picongpu/blob/de3c459189af365a1d69b96c5f2d62f8f593e053/lib/python/picongpu/picmi/simulation.py#L343

to this:

 def __get_init_manager(self) -> tuple[pypicongpu.species.InitManager, typing.Dict[Species, pypicongpu.species.Species]]:

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.

3 participants