From 63323205dd49de9cb3c58bc8f5da14c5cdc2ed20 Mon Sep 17 00:00:00 2001 From: Keivan Ipchi Hagh Date: Tue, 19 Mar 2024 16:58:29 +0330 Subject: [PATCH] minor improvements --- README.md | 2 +- main.py | 19 ------------------- scripts/clean.sh | 2 +- scripts/rebuild.sh | 2 +- src/rpc/athena/client.py | 4 ++-- 5 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 main.py diff --git a/README.md b/README.md index c0965ca..f025859 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# api-scheme \ No newline at end of file +# ⚡ api-scheme \ No newline at end of file diff --git a/main.py b/main.py deleted file mode 100644 index 467c0e3..0000000 --- a/main.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2023-PRESENT: Keivan Ipchi Hagh -# -# Email: keivanipchihagh@gmail.com -# GitHub: https://github.com/keivanipchihagh -# -########################################################## - -# Third-party imports -from src.rpc.athena.server import AthenaServer - - -if __name__ == '__main__': - - server = AthenaServer( - host = 'localhost', - port = 50051, - n_workers = 1 - ) - server.start() diff --git a/scripts/clean.sh b/scripts/clean.sh index 639dafc..183f7c6 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -4,4 +4,4 @@ working_dir=$(pwd) proto_dirs=($(pwd)/protos) # ./protos/ # Find all files with `pb2` and delete them -find "$proto_dirs" -type f -name "*pb2*" -delete \ No newline at end of file +find "$proto_dirs" -type f -name "*pb2*" -delete diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index c97bb93..193a03c 100644 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh @@ -4,4 +4,4 @@ echo "Clean complete." ./scripts/build.sh -echo "Build complete." \ No newline at end of file +echo "Build complete." diff --git a/src/rpc/athena/client.py b/src/rpc/athena/client.py index 157de5b..690c580 100644 --- a/src/rpc/athena/client.py +++ b/src/rpc/athena/client.py @@ -41,7 +41,7 @@ def __init__( self.health_stub = health_pb2_grpc.HealthStub(self.channel) # Healthcheck - def get_backtest(self) -> dict: + def GetBacktest(self) -> dict: request = athena_pb2.GetBacktestRequest() # Create request response = self.stub.GetBacktest(request) # Get response - return MessageToDict(response) # Return as dict + return MessageToDict(response) # Return message as dict