diff options
Diffstat (limited to 'src/ee/ds')
-rw-r--r-- | src/ee/ds/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ee/ds/__init__.py b/src/ee/ds/__init__.py index e543051..915dd6f 100644 --- a/src/ee/ds/__init__.py +++ b/src/ee/ds/__init__.py @@ -270,6 +270,11 @@ class DataSetManager(object): self._basedir = Path(basedir) self._csv = {} # type: MutableMapping[str, Tuple[str, Path]] + @property + def all_data_sets(self): + datasets = [ds.name for ds in self._basedir.iterdir() if (ds / "data-set.ini").is_file()] + return list(self._csv.keys()) + datasets + def cookie_for_ds(self, ds_name) -> Path: try: return self._csv[ds_name][1] @@ -314,7 +319,7 @@ class DataSetManager(object): @staticmethod def _load_csv(object_type: str, path: Path, freeze: bool) -> DataSet: - logger.debug("Loading CSV file {}".format(path)) + # logger.debug("Loading CSV file {}".format(path)) ds = DataSet() with open(str(path), newline='') as f: @@ -334,7 +339,7 @@ class DataSetManager(object): if freeze: ds.freeze() - logger.debug("Loaded {} objects".format(len(ds))) + # logger.debug("Loaded {} objects".format(len(ds))) return ds def _load_ini_dir(self, _path: str, freeze: bool) -> DataSet: |