@@ -473,7 +473,7 @@ def draw(self, filepath):
473473 'Cannot produce visualization of RDF, you need to install '
474474 'graphviz dependency https://graphviz.org/' )
475475
476- def publish_as_nanopub (self , use_test_server = False , force = False , ** kwargs ):
476+ def publish_as_nanopub (self , use_test_server = False , publish_steps = False , ** kwargs ):
477477 """Publish to nanopub server.
478478
479479 Publish the workflow as nanopublication to the nanopub server.
@@ -483,8 +483,9 @@ def publish_as_nanopub(self, use_test_server=False, force=False, **kwargs):
483483
484484 Args:
485485 use_test_server (bool): Toggle using the test nanopub server.
486- force (bool): Toggle publishing the workflow with force. This will publish all
487- unpublished steps first before publishing the workflow
486+ publish_steps (bool): Toggle publishing publishing all unpublished steps first before
487+ publishing the workflow. (Otherwise an exception is raised and unpublished steps
488+ need to be published manually first)
488489 kwargs: Keyword arguments to be passed to [nanopub.Publication.from_assertion](
489490 https://nanopub.readthedocs.io/en/latest/reference/publication.html#
490491 nanopub.publication.Publication.from_assertion).
@@ -497,7 +498,7 @@ def publish_as_nanopub(self, use_test_server=False, force=False, **kwargs):
497498 for step in self :
498499 if step .is_modified or not step ._is_published :
499500 self ._is_modified = True # If one of the steps is modified the workflow is too.
500- if force :
501+ if publish_steps :
501502 step .publish_as_nanopub (use_test_server = use_test_server , ** kwargs )
502503 else :
503504 raise RuntimeError (f'{ step } was not published yet, please publish steps first, '
0 commit comments