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

Make the input_name of PipelineML a property #83

Closed
Galileo-Galilei opened this issue Oct 10, 2020 · 0 comments · Fixed by #84
Closed

Make the input_name of PipelineML a property #83

Galileo-Galilei opened this issue Oct 10, 2020 · 0 comments · Fixed by #84
Assignees
Milestone

Comments

@Galileo-Galilei
Copy link
Owner

Galileo-Galilei commented Oct 10, 2020

Description

The input_name attribute of PipelineML class must be checked with a _check_input_name function before it is set to enforce inconsistency. For now, each time it is set inside the code, _check_input_name is called first. If a user modifies it, the new name must be checked first. The behavior of PipelineML is not tested when input_name is invalid, which hinders 10% test coverage.

Possible Implementation

In the PipelineML class, decorate input_name with @Property.

    @property
    def input_name(self) -> str:
        return self._input_name

    @input_name.setter
    def input_name(self, name: str) -> None:
        self._check_input_name(name)
        self._input_name = name

and add tests accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant