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

Builder.py: Use future-proof interface to set implements_process, required_resources, implements_protocol #169

Open
phstratmann opened this issue Jan 23, 2023 · 0 comments
Assignees
Labels
0-needs-review Has to be reviewed. 1-feature New feature or request 2-not-important/not-urgent

Comments

@phstratmann
Copy link
Contributor

User story

As a user, I want to ensure that the solvers will also run in case that the Process decorators are integrated differently in the future. But at the moment, the builder.py replaces decorators in this non-future-proof way:
setattr(solver_model, "implements_process", self.solver_process) # Get requirements of parent class
super_res = solver_model.required_resources.copy() # Set new requirements not overwriting parent class requirements. setattr(solver_model, "required_resources", super_res + requirements)
setattr(solver_model, "implements_protocol", protocol)

Conditions of satisfaction

  • Above-mentioned code should use the clean interface developed as solution to issue #580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-needs-review Has to be reviewed. 1-feature New feature or request 2-not-important/not-urgent
Projects
None yet
Development

No branches or pull requests

2 participants