Skip to content

Commit

Permalink
Added some documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnstRoell committed Oct 22, 2024
1 parent 8fdf5c0 commit 904a996
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mantra/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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:
Expand Down

0 comments on commit 904a996

Please sign in to comment.