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

Add validator for plugin entrys #503

Open
superstar54 opened this issue Oct 10, 2023 · 0 comments
Open

Add validator for plugin entrys #503

superstar54 opened this issue Oct 10, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@superstar54
Copy link
Member

superstar54 commented Oct 10, 2023

QeApp plugin uses the dictionary to collect the items that to be added. For example

# this is the entry point of the plugin
hello_world ={
"outline": Outline,
"setting": Setting,
"workchain": workchain_and_builder,
"result": Result,
}

The workchain

# register the workchain and builder
workchain_and_builder = {
    "workchain": HelloWorldWorkChain,
    "get_builder": get_builder,
    }

It is better to add a validator if the plugin developer passes the wrong keywords and data type. Pydantic could be a solution.

@superstar54 superstar54 added the enhancement New feature or request label Oct 10, 2023
@superstar54 superstar54 self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant