added multiple script modifications and finalized the dockerfile
This commit is contained in:
@@ -8,30 +8,32 @@ import time
|
||||
import grpc
|
||||
import argparse
|
||||
|
||||
|
||||
# initializing argument parser
|
||||
argument_parser = argparse.ArgumentParser(prog="shares saver")
|
||||
|
||||
|
||||
argument_parser.add_argument("-s", "--shares", dest="shares_data_path", action="store")
|
||||
# this argument is used for shares info location, it contains the liquidity info
|
||||
argument_parser.add_argument("-s", "--shares", type=pathlib.Path, dest="shares_data_path", action="store")
|
||||
|
||||
argument_parser.add_argument("-o", "--output-directory", dest="output_directory", action="store")
|
||||
# this argument is used to save the output into distinct dir
|
||||
argument_parser.add_argument("-o", "--output-directory", type=pathlib.Path, dest="output_directory", action="store")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cli_args = argument_parser.parse_args()
|
||||
|
||||
|
||||
# filling the shares data path, no other modes are though of
|
||||
if cli_args.shares_data_path:
|
||||
shares_path = pathlib.Path(cli_args.shares_data_path)
|
||||
else:
|
||||
raise NotImplementedError("No path provided for shares liquidity data")
|
||||
|
||||
# filling the output directory data path, where the trades would be saved
|
||||
if cli_args.output_directory:
|
||||
output_data_path = pathlib.Path(cli_args.output_directory)
|
||||
else:
|
||||
raise NotImplementedError("No path for the output data of shares")
|
||||
|
||||
|
||||
# loading shares liquidity stats gathered
|
||||
with open(shares_path, encoding="utf-8", mode="r") as shares_stats_file:
|
||||
sorted_shares_liquidity_stats = json.load(shares_stats_file)
|
||||
|
||||
Reference in New Issue
Block a user