Skip to content

Commit

Permalink
Remove deprecated functions (#246)
Browse files Browse the repository at this point in the history
* Remove audbackend.delete()

* Remove audbackend.access()

* Remove audbackend.create()

* Remove audbackend.register()

* Fix typo in docstrings

* Fix coverage
  • Loading branch information
hagenw authored Nov 14, 2024
1 parent 78c1578 commit b8d71ac
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 372 deletions.
4 changes: 0 additions & 4 deletions audbackend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
from audbackend import backend
from audbackend import interface
from audbackend.core.api import access
from audbackend.core.api import create
from audbackend.core.api import delete
from audbackend.core.api import register
from audbackend.core.backend.base import Base as Backend # legacy
from audbackend.core.backend.filesystem import FileSystem # legacy
from audbackend.core.errors import BackendError
Expand Down
242 changes: 0 additions & 242 deletions audbackend/core/api.py

This file was deleted.

2 changes: 1 addition & 1 deletion audbackend/core/backend/artifactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _copy_file(
def _create(
self,
):
r"""Access existing repository."""
r"""Create repository."""
with requests.Session() as session:
session.auth = self.authentication
path = artifactory.ArtifactoryPath(self.host, session=session)
Expand Down
2 changes: 1 addition & 1 deletion audbackend/core/backend/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _copy_file(
def _create(
self,
):
r"""Access existing repository."""
r"""Create repository."""
if os.path.exists(self._root):
utils.raise_file_exists_error(self._root)

Expand Down
4 changes: 0 additions & 4 deletions docs/api-src/audbackend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ and functions are available.

BackendError
Repository
access
checksum
create
delete
register
12 changes: 0 additions & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import audbackend

from singlefolder import SingleFolder


# UID for test session
# Repositories on the host will be named
Expand Down Expand Up @@ -47,16 +45,6 @@ def authentication():
del os.environ[key]


@pytest.fixture(scope="package", autouse=True)
def register_single_folder():
warning = (
"register is deprecated and will be removed with version 2.2.0. "
"Use backend classes directly instead."
)
with pytest.warns(UserWarning, match=warning):
audbackend.register("single-folder", SingleFolder)


@pytest.fixture(scope="package", autouse=False)
def hosts(tmpdir_factory):
return {
Expand Down
Loading

0 comments on commit b8d71ac

Please sign in to comment.