Skip to content

Commit

Permalink
Mark create(...) externally callable. (#1062)
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista authored Sep 26, 2024
1 parent 9b7e6ee commit a73c997
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openfl/interface/collaborator.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,17 @@ def start_(plan, collaborator_name, data_config, secure):
)
@option("-s", "--silent", help="Do not prompt", is_flag=True)
def create_(collaborator_name, data_path, silent):
create(collaborator_name, data_path, silent)


def create(collaborator_name, data_path, silent):
"""Creates a user for an experiment.
Args:
collaborator_name (str): The certified common name of the collaborator.
data_path (str): The data path to be associated with the collaborator.
silent (bool): Do not prompt.
"""

if data_path and is_directory_traversal(data_path):
echo("Data path is out of the openfl workspace scope.")
sys.exit(1)
Expand Down

0 comments on commit a73c997

Please sign in to comment.