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

Rename _separate to forward_wav #337

Merged
merged 10 commits into from
Nov 25, 2020
Merged

Rename _separate to forward_wav #337

merged 10 commits into from
Nov 25, 2020

Conversation

mpariente
Copy link
Collaborator

@mpariente mpariente commented Nov 19, 2020

Proposition: rename _separate to forward_wav in BaseModel.

This is something that was a bit discussed in #305 : asking users to overwrite a private method doesn't feel right. This fixes it.

Possibly in conflict with #305

Comment on lines 179 to 181
if is_overridden("_separate", self, parent=BaseModel):
return self._separate(wav, *args, **kwargs)
return self(wav, *args, **kwargs)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, maybe the is_overriden is completely overkill..
Removing _separate from the base class and hasattr(self,"_separate") + raise warning if it does would have been enough.
Hahah, I happy to write that function anyway 😅

@mpariente
Copy link
Collaborator Author

This is ready IMO.
Waiting for review.

asteroid/models/base_models.py Outdated Show resolved Hide resolved
asteroid/models/base_models.py Outdated Show resolved Hide resolved
asteroid/separate.py Outdated Show resolved Hide resolved
asteroid/utils/deprecation_utils.py Outdated Show resolved Hide resolved
@jonashaag
Copy link
Collaborator

See comments, otherwise LGTM

@mpariente
Copy link
Collaborator Author

/rebase

Co-authored-by: Jonas Haag <jonas@lophus.org>
@mpariente mpariente merged commit c7464de into master Nov 25, 2020
@mpariente mpariente deleted the forward_wav branch November 25, 2020 15:20
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.

2 participants