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

Client: add validation for QiskitFunction and other dataclasses #1315

Open
IceKhan13 opened this issue May 7, 2024 · 0 comments
Open

Client: add validation for QiskitFunction and other dataclasses #1315

IceKhan13 opened this issue May 7, 2024 · 0 comments
Labels
priority: low Low priority project: client Label to identify features related with client project
Milestone

Comments

@IceKhan13
Copy link
Member

What is the expected enhancement?

Add validation rules for QiskitFunction and other dataclasses.

Something along those lines

@dataclass
class QiskitFunction:
  ...
  
  def __post_init__(self):
    if not self.entrypoint and not self.image:
      raise ValueError("Either entrypoint or image must be specified")
   if self.entrypoint and self.image:
      warining("Both entrypoint and image was provided. Entrypoint will be ignored as image has fixed entrypoint.")
@IceKhan13 IceKhan13 added priority: low Low priority project: client Label to identify features related with client project labels May 7, 2024
@IceKhan13 IceKhan13 added this to the Q3'24 milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Low priority project: client Label to identify features related with client project
Projects
None yet
Development

No branches or pull requests

1 participant