audeering / audbackend

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

Raise ValueError if backend path ends with "/" #208

Closed frankenjoe closed 3 months ago

frankenjoe commented 3 months ago

Closes #206

All backend fucntions now raise a ValueError if a backend path ends on '/' with the exception of ls(), split() and join() as those functions support sub-paths as argument.

The Raises section in the docstrings is changed to:

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 (01ad631) to head (58ec540). Report is 3 commits behind head on dev.

Additional details and impacted files | [Files](https://app.codecov.io/gh/audeering/audbackend/pull/208?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/backend/base.py](https://app.codecov.io/gh/audeering/audbackend/pull/208?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/interface/unversioned.py](https://app.codecov.io/gh/audeering/audbackend/pull/208?src=pr&el=tree&filepath=audbackend%2Fcore%2Finterface%2Funversioned.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS91bnZlcnNpb25lZC5weQ==) | `100.0% <ø> (ø)` | | | [audbackend/core/interface/versioned.py](https://app.codecov.io/gh/audeering/audbackend/pull/208?src=pr&el=tree&filepath=audbackend%2Fcore%2Finterface%2Fversioned.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS92ZXJzaW9uZWQucHk=) | `100.0% <100.0%> (ø)` | | | [audbackend/core/utils.py](https://app.codecov.io/gh/audeering/audbackend/pull/208?src=pr&el=tree&filepath=audbackend%2Fcore%2Futils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL3V0aWxzLnB5) | `100.0% <100.0%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/audeering/audbackend/pull/208/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering)
hagenw commented 3 months ago

The new error message is missing in the docstrings of:

frankenjoe commented 3 months ago

The new error message is missing in the docstrings of:

* `copy_file()`

* `get_archive()`

* `get_file()`

* `move_file()`

* `put_archive()`

* `put_file()`

Thanks, I updated those as well.

frankenjoe commented 3 months ago

I fixed the typo in the docstrings and added the missing tests (hopefully we have everything covered now).

hagenw commented 3 months ago

Thanks.