File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ def derivations(self) -> Iterable["Derivation"]:
383383 return self ._records (ProvDerivation , Derivation , PROV_ATTR_USED_ENTITY )
384384
385385 def secondary_files (self ) -> list [Any ]:
386+ """Return any SecondaryFiles for this Entity."""
386387 return [
387388 d .generated_entity ()
388389 for d in self .derivations ()
Original file line number Diff line number Diff line change @@ -183,17 +183,20 @@ def _uriref(
183183
184184 @property
185185 def conformsTo (self ) -> set [str ]:
186+ """Find which things this RO conforms to."""
186187 resource = self ._uriref ()
187188 return set (map (str , self .manifest .objects (resource , DCTERMS .conformsTo )))
188189
189190 @property
190191 def createdBy (self ) -> set ["Agent" ]:
192+ """Find the set of Agents who created this RO."""
191193 resource = self ._uriref ()
192194 new_agent = partial (Agent , self .manifest )
193195 return set (map (new_agent , self .manifest .objects (resource , PAV .createdBy )))
194196
195197 @property
196198 def authoredBy (self ) -> set ["Agent" ]:
199+ """Find the set of Agents who authored this RO."""
197200 resource = self ._uriref ()
198201 new_agent = partial (Agent , self .manifest )
199202 return set (map (new_agent , self .manifest .objects (resource , PAV .authoredBy )))
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ class Status(IntEnum):
130130
131131
132132def parse_args (args : Optional [list [str ]] = None ) -> argparse .Namespace :
133+ """Parse the command line arguments."""
133134 parser = argparse .ArgumentParser (
134135 description = "cwlprov explores Research Objects containing provenance of "
135136 "Common Workflow Language executions. <https://w3id.org/cwl/prov/>"
@@ -485,8 +486,10 @@ def _set_log_level(quiet: Optional[bool] = None, verbose: int = 0) -> None:
485486
486487
487488class Tool (ContextManager ["Tool" ]):
489+ """The cwlprov-py tool."""
490+
488491 def __init__ (self , args : Optional [list [str ]] = None ) -> None :
489- """Create a Tool and open the output stream."""
492+ """Open the output stream."""
490493 self .args = parse_args (args )
491494 if self .args .output != "-" :
492495 self .output : Optional [TextIO ] = open (
@@ -1505,6 +1508,7 @@ def run(self) -> int:
15051508
15061509
15071510def main (args : Optional [list [str ]] = None ) -> int :
1511+ """Run the cwlprov-py tool."""
15081512 with Tool (args ) as tool :
15091513 try :
15101514 return tool .main ()
You can’t perform that action at this time.
0 commit comments