-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored zenodo into repository sub package
- Loading branch information
1 parent
03b61a8
commit 1a60b3b
Showing
19 changed files
with
529 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,7 @@ | ||
from . import lazy | ||
from ..utils import create_tbx_logger | ||
from .hdfdb import FileDB, FilesDB, GroupDB | ||
from ..utils import create_tbx_logger | ||
|
||
logger = create_tbx_logger('database') | ||
|
||
# class Folder: | ||
# """Folder with HDF5 files as a database | ||
# | ||
# Parameters | ||
# ---------- | ||
# folder : pathlib.Path | ||
# folder with HDF5 files | ||
# pattern : str, optional | ||
# pattern to search for, by default '*.hdf' | ||
# rec : bool, optional | ||
# search recursively for hdf files within the given folder, by default True | ||
# """ | ||
# | ||
# def __init__(self, folder: pathlib.Path, pattern='*.hdf', rec: bool = True): | ||
# folder = pathlib.Path(folder) | ||
# if not folder.is_dir(): | ||
# raise ValueError(f'{folder} is not a directory') | ||
# self.folder = folder | ||
# if rec: | ||
# self.filenames = list(self.folder.rglob(pattern)) | ||
# else: | ||
# self.filenames = list(self.folder.glob(pattern)) | ||
# self.rec = rec | ||
# | ||
# def __repr__(self): | ||
# return f'<{self.__class__.__name__} (root="{self.folder}", nfiles={len(self)}, recursive={self.rec})>' | ||
# | ||
# def __len__(self): | ||
# return len(self.filenames) | ||
# | ||
# def __getitem__(self, item) -> File: | ||
# return File(self.filenames[item]) | ||
# | ||
# def find(self, | ||
# flt: Union[Dict, str], | ||
# objfilter=None, rec: bool = True, | ||
# ignore_attribute_error: bool = False): | ||
# """Find""" | ||
# with Files(self.filenames, file_instance=File) as h5: | ||
# return h5.find(flt, objfilter, rec, ignore_attribute_error) | ||
# | ||
# def find_one(self, | ||
# flt: Union[Dict, str], | ||
# objfilter=None, | ||
# rec: bool = True, | ||
# ignore_attribute_error: bool = False): | ||
# """Find one occurrence""" | ||
# with Files(self.filenames, file_instance=File) as h5: | ||
# return h5.find_one(flt, objfilter, rec, ignore_attribute_error) | ||
# | ||
# def find_one_per_file(self, | ||
# flt: Union[Dict, str], | ||
# objfilter=None, | ||
# rec: bool = True, | ||
# ignore_attribute_error: bool = False): | ||
# """Find one occurrence""" | ||
# with Files(self.filenames, file_instance=File) as h5: | ||
# return h5.find_one_per_file(flt, objfilter, rec, ignore_attribute_error) | ||
|
||
|
||
__all__ = ['logger', 'lazy', 'FileDB', 'FilesDB', 'GroupDB'] |
Oops, something went wrong.