Skip to content

Commit 678a554

Browse files
committed
Added some docstrings
1 parent 270f9c6 commit 678a554

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cwltool/cwlprov/ro.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def __str__(self) -> str:
106106
return f"ResearchObject <{self.ro_uuid}> in <{self.folder}>"
107107

108108
def _initialize(self) -> None:
109+
"""Initializes the bagit folder structure."""
109110
for research_obj_folder in (
110111
METADATA,
111112
DATA,
@@ -359,6 +360,7 @@ def add_annotation(
359360
return uri
360361

361362
def _ro_annotations(self) -> List[Annotation]:
363+
"""Append base RO and provenance annotations to the list of annotations."""
362364
annotations: List[Annotation] = []
363365
annotations.append(
364366
{
@@ -414,6 +416,7 @@ def _ro_annotations(self) -> List[Annotation]:
414416

415417
def _authored_by(self) -> Optional[AuthoredBy]:
416418
authored_by: AuthoredBy = {}
419+
"""Returns the authoredBy metadata if it was supplied on CLI"""
417420
if self.orcid:
418421
authored_by["orcid"] = self.orcid
419422
if self.full_name:
@@ -542,6 +545,7 @@ def add_to_manifest(self, rel_path: str, checksums: Dict[str, str]) -> None:
542545
checksum_file.write(line)
543546

544547
def _add_to_bagit(self, rel_path: str, **checksums: str) -> None:
548+
"""Computes file size and checksums and adds to bagit manifest."""
545549
if PurePosixPath(rel_path).is_absolute():
546550
raise ValueError(f"rel_path must be relative: {rel_path}")
547551
lpath = os.path.join(self.folder, local_path(rel_path))

0 commit comments

Comments
 (0)