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

create(): remove return value #174

Merged
merged 10 commits into from
Jan 26, 2024
Merged

create(): remove return value #174

merged 10 commits into from
Jan 26, 2024

Conversation

frankenjoe
Copy link
Collaborator

@frankenjoe frankenjoe commented Jan 25, 2024

Closes #173

This (officially) removes the return value from audbackend.create(). For legacy reasons we still return an instance of audbackend.interface.Versioned.

image

@frankenjoe frankenjoe requested a review from hagenw January 25, 2024 14:50
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (232a140) 100.0% compared to head (71793a3) 100.0%.

Additional details and impacted files
Files Coverage Δ
audbackend/core/api.py 100.0% <100.0%> (ø)
audbackend/core/conftest.py 100.0% <100.0%> (ø)

@hagenw
Copy link
Member

hagenw commented Jan 25, 2024

In the text of the docstring the BackendError is also discussed. I think we can remove the paragraph as it is repeated in the Raises section.

frankenjoe and others added 4 commits January 25, 2024 19:13
Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>
Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>
@frankenjoe
Copy link
Collaborator Author

In the text of the docstring the BackendError is also discussed. I think we can remove the paragraph as it is repeated in the Raises section.

Good point. Changed it also for access().

@hagenw
Copy link
Member

hagenw commented Jan 26, 2024

Cool, thanks.

Should we maybe add a note to the docstring of audbackend.create() stating that it still returns an interface object. but that it will be removed in a future version. Or should we stay silent about it as it's also not that important?

@frankenjoe
Copy link
Collaborator Author

Should we maybe add a note to the docstring of audbackend.create() stating that it still returns an interface object. but that it will be removed in a future version. Or should we stay silent about it as it's also not that important?

Yes, I guess a note would not hurt. One problem is of course that we cannot show a deprecation warning, since we do not know when the user uses the returned value. So maybe we simply say it might be removed in a future version?

And one more thing I noticed. Lately we started to talk about "repository" instead of "backend object" (see description). To me it makes more sense since the common user will not directly interact with the backend object anyway and repository is probably more descriptive. But maybe we should unify it across all api functions. In available() we still talk about backend objects, for instance. Maybe something to keep in mind in #171.

@hagenw
Copy link
Member

hagenw commented Jan 26, 2024

Yes, I also switched talking more about repository in #171 (but so far restricted to the usage section of the documentation).

I would simply write future version in the notes as it is not so easy to forsee the upcoming versions of audbackend ;)

@frankenjoe
Copy link
Collaborator Author

I added the following note:

image

@hagenw hagenw merged commit 71e1770 into main Jan 26, 2024
9 checks passed
@hagenw hagenw deleted the create-no-return-value branch January 26, 2024 09:53
hagenw added a commit that referenced this pull request May 3, 2024
* create(): remove interface argument

* TST: update

* DOC: update

* create(): add legacy note

* Update audbackend/core/api.py

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>

* Update audbackend/core/api.py

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>

* DOC: remove redudant description

* DOC: remove redudant description

* fix linter errors

* Doc: add not one undocumnted return value

---------

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>
hagenw added a commit that referenced this pull request May 3, 2024
* create(): remove interface argument

* TST: update

* DOC: update

* create(): add legacy note

* Update audbackend/core/api.py

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>

* Update audbackend/core/api.py

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>

* DOC: remove redudant description

* DOC: remove redudant description

* fix linter errors

* Doc: add not one undocumnted return value

---------

Co-authored-by: Hagen Wierstorf <hwierstorf@audeering.com>
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.

Change audbackend.create() to not return an interface
2 participants