loader: Split DirectoryLoader in BaseDirectoryLoader and TarballDirectoryLoader
The former is the base class and the latter is one specific implementation for tarball. Previously it was a single class. This explicits the current use for tarball directories. This will also allow to declare other directory loader implementations to deal with other origin types (vcs 'tree' as git, svn, hg). For this, developers need to provide a new class implementation per directory types. This class needs to inherit from BaseDirectoryLoader, and provide only the `fetch_directory` method. Now the BaseDirectoryLoader class is an abstract class and TarballDirectoryLoader is the first implementation in charge of ingesting 'directory' coming from a tarball. Further MRs will be opened to deal with Directory coming from Git, Hg or Svn in their respective loader package. Refs. swh/meta#4979
Showing
- swh/loader/core/__init__.py 3 additions, 3 deletionsswh/loader/core/__init__.py
- swh/loader/core/loader.py 109 additions, 68 deletionsswh/loader/core/loader.py
- swh/loader/core/tasks.py 6 additions, 6 deletionsswh/loader/core/tasks.py
- swh/loader/core/tests/conftest.py 1 addition, 1 deletionswh/loader/core/tests/conftest.py
- swh/loader/core/tests/test_loader.py 10 additions, 10 deletionsswh/loader/core/tests/test_loader.py
- swh/loader/core/tests/test_tasks.py 1 addition, 1 deletionswh/loader/core/tests/test_tasks.py
Loading
Please register or sign in to comment