@@ -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+ """Initialize 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+ """Compute 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