Skip to content

Commit

Permalink
Updated error handling, updated poetry config
Browse files Browse the repository at this point in the history
  • Loading branch information
lexara-prime-ai committed Jul 8, 2024
1 parent f731f29 commit 1c831ba
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion hyper/hyper/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
FULL_PATH = FILE_PATH + "/" + FILE_NAME
SCOPES = ["https://www.googleapis.com/auth/drive"]
SERVICE_ACCOUNT_FILE = "service_account.json"
PARENT_FOLDER_ID = "1uVnscmoxu91XT1LMnZoOOn3iCTirlEII"
PARENT_FOLDER_ID = "1uVnscmoxu91XT1LMnZoOOn3iCTirlEII"
30 changes: 18 additions & 12 deletions hyper/hyper/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import csv
import os

# Utility modules.
import constants
import drive
import error_handling

import python_wrapper.python_wrapper


Expand Down Expand Up @@ -169,17 +169,23 @@ async def __call__(self):


def parse_args():
parser = argparse.ArgumentParser(description="WSPR Spot Data Server")

# Receive the [interval] from the user.
parser.add_argument(
"--interval", type=int, default=900, help="Sleep interval in seconds"
)
# Receive the [num_rows] from the user.
parser.add_argument(
"--num_rows", type=str, default="10", help="Number of rows to return"
)
return parser.parse_args()
try:
parser = argparse.ArgumentParser(description="WSPR Spot Data Server")

# Receive the [interval] from the user.
parser.add_argument(
"--interval", type=int, default=900, help="Sleep interval in seconds"
)
# Receive the [num_rows] from the user.
parser.add_argument(
"--num_rows", type=str, default="10", help="Number of rows to return"
)
return parser.parse_args()
except Exception as e:
self.error_handling.propagate_error(
f"{parse_args.__name__}",
f"Failed to parse arguments: {e}"
)


if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion hyper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
fastapi = "*"


[build-system]
Expand Down

0 comments on commit 1c831ba

Please sign in to comment.