audeering / audbackend

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

Deprecate create(), delete(), register() #203

Closed hagenw closed 3 months ago

hagenw commented 3 months ago

Closes #197

This deprecates audbackend.create(), audbackend.delete(), and audbackend.register() and marks it to be removed in version 2.2.0, assuming that the current dev branch will be released as version 2.0.0.

It also replaces audbackend.delete() with DoctestFileSystem.delete() in audbackend/core/conftest.py, which I overlooked in https://github.com/audeering/audbackend/pull/202.

In addition, it updates the string representations of backends and interfaces to list the command that is used to instantiate them:

>>> backend = audbackend.backend.FileSystem("host", "repo")
>>> backend
audbackend.backend.FileSystem('host', 'repo')
>>> audbackend.interface.Versioned(backend)
audbackend.interface.Versioned(audbackend.backend.FileSystem('host', 'repo'))

image

image

image

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 100.0%. Comparing base (332845c) to head (a64b4ce). Report is 1 commits behind head on dev.

Additional details and impacted files | [Files](https://app.codecov.io/gh/audeering/audbackend/pull/203?dropdown=coverage&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/203?src=pr&el=tree&filepath=audbackend%2Fcore%2Fapi.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2FwaS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/backend/base.py](https://app.codecov.io/gh/audeering/audbackend/pull/203?src=pr&el=tree&filepath=audbackend%2Fcore%2Fbackend%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2JhY2tlbmQvYmFzZS5weQ==) | `100.0% <100.0%> (ø)` | | | [audbackend/core/conftest.py](https://app.codecov.io/gh/audeering/audbackend/pull/203?src=pr&el=tree&filepath=audbackend%2Fcore%2Fconftest.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2NvbmZ0ZXN0LnB5) | `100.0% <100.0%> (ø)` | | | [audbackend/core/interface/base.py](https://app.codecov.io/gh/audeering/audbackend/pull/203?src=pr&el=tree&filepath=audbackend%2Fcore%2Finterface%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS9iYXNlLnB5) | `100.0% <100.0%> (ø)` | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/audeering/audbackend/pull/203/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering)
frankenjoe commented 3 months ago

Since you started removing docstring examples from other API functions, wouldn't it make sense to extend this PR to deprecate also the other functions?

hagenw commented 3 months ago

I thought it would be better to have single commits for deprecating the other functions as well, but if you prefer, we can also integrate it here.

frankenjoe commented 3 months ago

I think we can go with one PR since those functions are closely linked.

hagenw commented 3 months ago

OK, it also makes it easier for me to combine all into one pull request. Should be ready again for review.