Skip to content

Commit

Permalink
Remove unused arg and docstring (securefederatedai#1090)
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista authored and tanwarsh committed Nov 18, 2024
1 parent 9b88fbb commit 38ef1d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 50 deletions.
26 changes: 3 additions & 23 deletions openfl/interface/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,8 @@ def aggregator(context):
default="plan/cols.yaml",
type=ClickPath(exists=True),
)
@option(
"-s",
"--secure",
required=False,
help="Enable Intel SGX Enclave",
is_flag=True,
default=False,
)
def start_(plan, authorized_cols, secure):
"""
Start the aggregator service.
Args:
plan (str): Path to the federated learning plan.
authorized_cols (str): Path to the authorized collaborator list.
secure (bool): Flag to enable Intel SGX Enclave.
"""
def start_(plan, authorized_cols):
"""Start the aggregator service."""

if is_directory_traversal(plan):
echo("Federated learning plan path is out of the openfl workspace scope.")
Expand Down Expand Up @@ -163,12 +148,7 @@ def find_certificate_name(file_name):
)
@option("-s", "--silent", help="Do not prompt", is_flag=True)
def _certify(fqdn, silent):
"""Sign/certify the aggregator certificate key pair.
Args:
fqdn (str): The fully qualified domain name of aggregator node.
silent (bool): Flag to enable silent mode.
"""
"""Sign/certify the aggregator certificate key pair."""
certify(fqdn, silent)


Expand Down
30 changes: 3 additions & 27 deletions openfl/interface/collaborator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,8 @@ def collaborator(context):
required=True,
help="The certified common name of the collaborator",
)
@option(
"-s",
"--secure",
required=False,
help="Enable Intel SGX Enclave",
is_flag=True,
default=False,
)
def start_(plan, collaborator_name, data_config, secure):
"""Start a collaborator service.
Args:
plan (str): Federated learning plan.
collaborator_name (str): The certified common name of the collaborator.
data_config (str): The data set/shard configuration file.
secure (bool): Enable Intel SGX Enclave.
"""
def start_(plan, collaborator_name, data_config):
"""Start a collaborator service."""

if plan and is_directory_traversal(plan):
echo("Federated learning plan path is out of the openfl workspace scope.")
Expand Down Expand Up @@ -346,16 +331,7 @@ def register_collaborator(file_name):
help="Import the archive containing the collaborator's" " certificate (signed by the CA)",
)
def certify_(collaborator_name, silent, request_pkg, import_):
"""Certify the collaborator.
Args:
collaborator_name (str): The certified common name of the collaborator.
silent (bool): Do not prompt.
request_pkg (str): The archive containing the certificate signing
request (*.zip) for a collaborator.
import_ (str): Import the archive containing the collaborator's
certificate (signed by the CA).
"""
"""Certify the collaborator."""
certify(collaborator_name, silent, request_pkg, import_)


Expand Down

0 comments on commit 38ef1d5

Please sign in to comment.