Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Misc improvements on the Platform CLI #6370

Merged
merged 44 commits into from
May 10, 2024

Conversation

hjoaquim
Copy link
Contributor

@hjoaquim hjoaquim commented May 7, 2024

  1. Why? (1-3 sentences or a bullet point list):

    • Iron out bugs and improve the UX of using the Platform CLI.
  2. What? (1-3 sentences or a bullet point list):

    • Add descriptions to sections: data, data processing commands, configuration and cached results
    • New setting for defining the maximum number of cached results to display on the help menu
    • Prepend of OBB to the stack of results instead of raw stack index.
    • New setting to show if a new OBBJect was added
    • Menus without description on the Platform side to use the commands as description
  3. Impact (1-2 sentences or a bullet point list):

    • Not applicable, CLI is not released yet. Also, The Majority of this PR is only UX tweeks and small improvements.
  4. Testing Done:

    • Run all commands and check style!

@github-actions github-actions bot added the enhancement Enhancement label May 7, 2024
@hjoaquim hjoaquim marked this pull request as draft May 7, 2024 09:02
hjoaquim and others added 23 commits May 7, 2024 10:10
…ance/OpenBBTerminal into feature/james-didier-feedback
* fix: cli max rows

* fix: settings menu

---------

Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com>
@hjoaquim hjoaquim marked this pull request as ready for review May 8, 2024 23:47
@IgorWounds
Copy link
Contributor

Unclear why a default doesnt work out of the box.

2024 May 09, 11:40 (🦋) /equity/ $ search --query aaple

/Users/james/miniconda3/envs/sdkv4/lib/python3.10/site-packages/openbb_core/app/query.py:58: OpenBBWarning: Parameter 'is_etf' is not supported by cboe. Available for: nasdaq.
  warnings.warn(
Results not found.

And if I pass a provider, it is still passing args not supported:


2024 May 09, 11:40 (🦋) /equity/ $ search --query aaple --provider cboe

/Users/james/miniconda3/envs/sdkv4/lib/python3.10/site-packages/openbb_core/app/query.py:58: OpenBBWarning: Parameter 'is_etf' is not supported by cboe. Available for: nasdaq.
  warnings.warn(
Results not found.

aaple?

@hjoaquim
Copy link
Contributor Author

🐛

2024 May 09, 10:36 (🦋) /account/ $ login --email jmaslek11@gmail.com --password {nice_try_github} --remember_me

local variable 'max_obbjects_exceeded' referenced before assignment

nice catch. fixed here: 03915f8

@hjoaquim
Copy link
Contributor Author

?

2024 May 09, 10:47 [jmaslek] (🦋) / $ record -n James_pr_6370

Title 'James_pr_6370' has invalid format. Please use only digits, characters and whitespaces.

We don't support the "_" in that name - not sure what's the reason behind it, it's always been like this

@hjoaquim
Copy link
Contributor Author

After running a routine and making it public, I try to run it from what is copied:

2024 May 09, 10:48 [jmaslek] (🦋) / $ exe https://my.openbb.co/u/jmaslek/routine/jamespr6370

Traceback (most recent call last):
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/cli.py", line 20, in <module>
    main()
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/cli.py", line 16, in main
    launch(dev, debug)
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/cli_controller.py", line 937, in launch
    parse_args_and_run()
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/cli_controller.py", line 918, in parse_args_and_run
    main(
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/cli_controller.py", line 830, in main
    run_cli()
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/cli_controller.py", line 601, in run_cli
    t_controller.queue = t_controller.switch(an_input)
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/base_controller.py", line 373, in switch
    getattr(
  File "/Users/james/OpenBBTerminal/OpenBBTerminal/cli/openbb_cli/controllers/cli_controller.py", line 406, in call_exe
    with open(routine_path, "w") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/james/OpenBBUserData/exports/routines/jmaslek_jamespr6370.openbb'

@jmaslek are you sure it was public at that time? I can run your routine perfectly:
image

I was also able to do a new one and run it with no issue: exe https://my.openbb.co/u/hjoaquim/routine/hjoaquim-routine-james-test

@hjoaquim
Copy link
Contributor Author

Do we have a way to set something like timeout? I thought we had a default option that could be adjusted on the plkatform in user?

2024 May 09, 11:52 (🦋) /equity/darkpool/ $ otc --symbol AAPL --timeout 3

The following args couldn't be interpreted: ['--timeout', '3']

Type -> ReadTimeout

Detail -> HTTPSConnectionPool(host='api.finra.org', port=443): Read timed out. (read timeout=2)

For now, you'd need to add your timeout preference on the user_settings.json (which I know it's not convenient at all).
We're working on putting together a solution so that user works as a menu and this kind of preferences can be edited directly on the CLI.

@hjoaquim
Copy link
Contributor Author

It's unclear what "Access and manage your cached results" is supposed to mean.

How do I access and/or manage the results? I only see an info table.

Does results --help actually help? What's the suggestion so we can improve it?

@hjoaquim
Copy link
Contributor Author

Unclear why a default doesnt work out of the box.

2024 May 09, 11:40 (🦋) /equity/ $ search --query aaple

/Users/james/miniconda3/envs/sdkv4/lib/python3.10/site-packages/openbb_core/app/query.py:58: OpenBBWarning: Parameter 'is_etf' is not supported by cboe. Available for: nasdaq.
  warnings.warn(
Results not found.

And if I pass a provider, it is still passing args not supported:


2024 May 09, 11:40 (🦋) /equity/ $ search --query aaple --provider cboe

/Users/james/miniconda3/envs/sdkv4/lib/python3.10/site-packages/openbb_core/app/query.py:58: OpenBBWarning: Parameter 'is_etf' is not supported by cboe. Available for: nasdaq.
  warnings.warn(
Results not found.

such a nice catch. indeed to provider arguments were not being properly match with the provider being used.
here is the fix: 8e9b228

@IgorWounds IgorWounds added this pull request to the merge queue May 10, 2024
Merged via the queue into develop with commit 13a6248 May 10, 2024
7 checks passed
@IgorWounds IgorWounds deleted the feature/james-didier-feedback branch May 10, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants