audeering / audbackend

Manage file storage on different backends
https://audeering.github.io/audbackend/
Other
3 stars 0 forks source link

create(): remove return value #174

Closed frankenjoe closed 9 months ago

frankenjoe commented 9 months ago

Closes #173

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

image

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files | [Files](https://app.codecov.io/gh/audeering/audbackend/pull/174?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering) | Coverage Δ | | |---|---|---| | [audbackend/core/api.py](https://app.codecov.io/gh/audeering/audbackend/pull/174?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2FwaS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/conftest.py](https://app.codecov.io/gh/audeering/audbackend/pull/174?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2NvbmZ0ZXN0LnB5) | `100.0% <100.0%> (ø)` | |
hagenw commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

I added the following note:

image