From c253a7bf584410b5e8a99b2e101c81b95ec5da4c Mon Sep 17 00:00:00 2001 From: tabbott36 Date: Mon, 8 Jul 2024 16:55:09 -0400 Subject: [PATCH] feat(linting): linting changes --- frbvoe/cli/__init__.py | 1 + frbvoe/cli/main.py | 5 ++++- frbvoe/cli/tns.py | 2 +- frbvoe/cli/voe.py | 16 ++++++++++------ frbvoe/models/voe.py | 1 + frbvoe/utilities/TNSAgent.py | 3 +-- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frbvoe/cli/__init__.py b/frbvoe/cli/__init__.py index e69de29..7ecab4a 100644 --- a/frbvoe/cli/__init__.py +++ b/frbvoe/cli/__init__.py @@ -0,0 +1 @@ +"""Client User Interface for the FRBVOE package.""" diff --git a/frbvoe/cli/main.py b/frbvoe/cli/main.py index 9a8db80..c0f09a0 100644 --- a/frbvoe/cli/main.py +++ b/frbvoe/cli/main.py @@ -1,6 +1,7 @@ """FRB VOE CLI.""" import click + from frbvoe.cli.voe import voe @@ -9,9 +10,11 @@ def cli(): """FRB VOE Command Line Interface.""" pass + @cli.command("version", help="FRB VOE version.") def version(): """FRB VOE version.""" click.echo("VOEvent Tools v0.1.0") -cli.add_command(voe) \ No newline at end of file + +cli.add_command(voe) diff --git a/frbvoe/cli/tns.py b/frbvoe/cli/tns.py index 1812904..2f85810 100644 --- a/frbvoe/cli/tns.py +++ b/frbvoe/cli/tns.py @@ -18,5 +18,5 @@ def tns(): "--sandbox", help="Set to False when submitting to the live TNS.", show_default=True ) def send(username, period, sandbox): - """submit an FRB to the TNS.""" + """Submit an FRB to the TNS.""" click.echo(f"submit FRB to TNS. {username} {period} {sandbox}") diff --git a/frbvoe/cli/voe.py b/frbvoe/cli/voe.py index 5393966..a6d26fb 100644 --- a/frbvoe/cli/voe.py +++ b/frbvoe/cli/voe.py @@ -2,19 +2,23 @@ import click + @click.group(name="voe", help="VOEvent Tools.") def voe(): """Manage workflow pipelines.""" pass + @voe.command("send", help="Send VOEvent.") +@click.option("--hostname", default="localhost", help="Destination to send the VOE.") +@click.option("--port", default=8098, help="Port to send the VOE.") @click.option( - "--hostname", - default="localhost", - help="Destination to send the VOE." + "--file", + default="./voe", + type=click.File("r"), + help="VOEvent file.", + show_default=True, ) -@click.option("--port", default=8098, help="Port to send the VOE.") -@click.option("--file", default="./voe",type=click.File("r"), help="VOEvent file.", show_default=True) def send(hostname, port): """Send VOEvent.""" - click.echo(f"Send VOEvent.{hostname}:{port}") \ No newline at end of file + click.echo(f"Send VOEvent.{hostname}:{port}") diff --git a/frbvoe/models/voe.py b/frbvoe/models/voe.py index c36f78f..f1ec9e8 100644 --- a/frbvoe/models/voe.py +++ b/frbvoe/models/voe.py @@ -26,6 +26,7 @@ class VOEvent(BaseModel): # BaseSettings """VOEvent Object. + Args: BaseSettings (BaseSettings): Pydantic BaseSettings. diff --git a/frbvoe/utilities/TNSAgent.py b/frbvoe/utilities/TNSAgent.py index 74de358..ae281cc 100644 --- a/frbvoe/utilities/TNSAgent.py +++ b/frbvoe/utilities/TNSAgent.py @@ -464,8 +464,7 @@ def search_by_internal_name(self, payload: dict) -> str: return found_name def change_prop_period(self, payload: dict) -> bool: - """Change the end date for the proprietary period for - a previously submitted FRB. + """Change proprietary period for a previously submitted FRB. Use cases include: (1) Extending the proprietary period until the