From c65617e6dba0abcd1c8b98454364b0c54a5d696f Mon Sep 17 00:00:00 2001 From: Jamie Date: Thu, 18 Mar 2021 16:00:30 -0400 Subject: [PATCH] make codespell happy --- gamestonk_terminal/portfolio/README.md | 12 ++++++------ gamestonk_terminal/portfolio/port_menu.py | 6 +++--- gamestonk_terminal/portfolio/rh_api.py | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gamestonk_terminal/portfolio/README.md b/gamestonk_terminal/portfolio/README.md index 6ffdf56be13..c6fd7d69c71 100644 --- a/gamestonk_terminal/portfolio/README.md +++ b/gamestonk_terminal/portfolio/README.md @@ -6,13 +6,13 @@ Once this screen is accessed, the first command to be run is ```` login ```` -Which will use your robinhood login infomation, which should be stored as environment variables or in the config_terminal.py +Which will use your robinhood login information, which should be stored as environment variables or in the config_terminal.py Currently there are 2 options: * [hold](#hold) * Look at current (stock only) holdings -* [hist](#hist) - * Get and plot historical portfolio +* [rhhist](#rhhist) + * Get and plot rhhistorical portfolio ## hold @@ -26,10 +26,10 @@ the % change from previous close. Example: ![hold](https://user-images.githubusercontent.com/18151143/111685384-3c6ab080-87fe-11eb-80ce-9b256c396bf2.png) -## hist +## rhhist Display your RH portfolio based on provided interval and span. Based on the API data availablility, plotted as a candlestick chart. ```` -usage: hist [-s --span] [-i --interval] +usage: rhhist [-s --span] [-i --interval] ```` * -s/--span : How long to look back. Defaults to the day. Options: * [day, week, month, 3month, year, 5year, all] @@ -37,4 +37,4 @@ usage: hist [-s --span] [-i --interval] * [5minute, 10minute, hour, day, week] Example Default Output: -![hist](https://user-images.githubusercontent.com/18151143/111685390-3d9bdd80-87fe-11eb-90f9-7ca8b0c1e7f8.png) \ No newline at end of file +![rhhist](https://user-images.githubusercontent.com/18151143/111685390-3d9bdd80-87fe-11eb-90f9-7ca8b0c1e7f8.png) \ No newline at end of file diff --git a/gamestonk_terminal/portfolio/port_menu.py b/gamestonk_terminal/portfolio/port_menu.py index 8704cc752c1..51dab71b492 100644 --- a/gamestonk_terminal/portfolio/port_menu.py +++ b/gamestonk_terminal/portfolio/port_menu.py @@ -21,14 +21,14 @@ def print_port(show_login): if show_login: print(" login login") print(" hold look at current holdings") - print(" hist look at historical portfolio") + print(" rhhist look at historical portfolio") print(" ") def port_menu(): plt.close("all") port_parser = argparse.ArgumentParser(prog="port", add_help=False) - choices = ["help", "q", "quit", "hold", "hist", "login", "logoff"] + choices = ["help", "q", "quit", "hold", "rhhist", "login", "logoff"] port_parser.add_argument("cmd", choices=choices) completer = NestedCompleter.from_nested_dict({c: None for c in choices}) should_print_help = True @@ -81,7 +81,7 @@ def port_menu(): print(e) print("") - elif ns_known_args.cmd == "hist": + elif ns_known_args.cmd == "rhhist": rh_api.plot_historical(l_args) elif ns_known_args.cmd == "login": diff --git a/gamestonk_terminal/portfolio/rh_api.py b/gamestonk_terminal/portfolio/rh_api.py index 48fb872ecf9..8f8ee2eb82c 100644 --- a/gamestonk_terminal/portfolio/rh_api.py +++ b/gamestonk_terminal/portfolio/rh_api.py @@ -110,15 +110,15 @@ def plot_historical(l_args): "Invalid Span: Must be one of : day, week, month, 3month, year, 5year, all" ) - hist = r.account.get_historical_portfolio( + rhhist = r.account.get_historical_portfolio( ns_parser.interval, span=ns_parser.span ) - hist_eq = hist["equity_historicals"] + rhhist_eq = rhhist["equity_historicals"] open_eq = [] close_eq = [] time = [] - for h in hist_eq: + for h in rhhist_eq: time.append( dt.strptime(h["begins_at"], dt_format) - datetime.timedelta(hours=4) )