From 904a99627787e309e5c0d7753f5b200135607595 Mon Sep 17 00:00:00 2001 From: ErnstRoell Date: Tue, 22 Oct 2024 10:50:52 +0200 Subject: [PATCH] Added some documentation. --- mantra/datasets.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mantra/datasets.py b/mantra/datasets.py index 1626326..196c689 100644 --- a/mantra/datasets.py +++ b/mantra/datasets.py @@ -43,6 +43,10 @@ def __init__( to be met, using `latest` is recommended. """ + # The properties need to be set before the super().__init__() call to + # make sure they exist during processing. The process and download are + # called during the super call. + if manifold not in ["2", "3"]: raise ValueError( f"Manifolds should either be 2 or 3, you provided {manifold}" @@ -57,12 +61,22 @@ def __init__( @property def raw_file_names(self): + """ + Stores the raw file names that need to be present in the raw folder for + downloading to be skipped. To reference raw file names, use the property + self.raw_paths. + """ return [ f"{self.manifold}_manifolds.json", ] @property def processed_file_names(self): + """ + Stores the processed data in a file, if this file is present in the + processed folder, it will skip processing. Othewise it will run the + process function. + """ return ["data.pt"] def download(self) -> None: