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

Hotfix/weird logs #5439

Merged
merged 5 commits into from
Sep 15, 2023
Merged

Hotfix/weird logs #5439

merged 5 commits into from
Sep 15, 2023

Conversation

hjoaquim
Copy link
Contributor

@hjoaquim hjoaquim commented Sep 15, 2023

Description

Also, took the opportunity to:

  • filter empty credentials incoming from the hub

  • encapsulated the usage of a variable that is created of the cost of calling a function inside a function so we don't have unnecessary executions during initialization

  • Link # issue, if applicable.
    NA

  • Screenshot of the feature or the bug before/after fix, if applicable.
    Before
    image

After
image

  • Relevant motivation and context.
    🐛 ☠️

  • List any dependencies that are required for this change.
    NA

How has this been tested?

Just initialize the SDK: from openbb_terminal.sdk import openbb

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.
  • Make sure affected commands still run in terminal
  • Ensure the SDK still works
  • Check any related reports

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@reviewpad reviewpad bot added the feat XS Extra small feature label Sep 15, 2023
Copy link
Contributor

@piiq piiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hjoaquim

I was seeing this beyond ipython terminal and notebooks. Let me check the wheel

15 mins later...

Ok, the wheel does not give this error when pip installed

@@ -816,4 +816,7 @@ def get_spread_for_crypto_pair(
return df


POSSIBLE_CRYPTOS = list(get_erc20_tokens()["symbol"].unique())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i also thought about this. i didn't like how it was implemented as a constant but it's actually loading stuff from disk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is - my issue with it was that this file gets "loaded" before the loggers are set up, and since get_erc20_tokens gets called and will try to log something, might lead to an unexpected behavior.

@piiq
Copy link
Contributor

piiq commented Sep 15, 2023

@hjoaquim you fix mypy yourself or you need a hand?

@hjoaquim
Copy link
Contributor Author

@hjoaquim you fix mypy yourself or you need a hand?

No worries, I'm on it. Thank you, @piiq 🦋

@hjoaquim
Copy link
Contributor Author

hjoaquim commented Sep 15, 2023

Regarding 3cf7751, @montezdesousa needed to go back and define fields as it was to make mypy happy. Is it ok to filter incoming empty credentials like this, so it don't clash with the CredentialsModel definition?

@hjoaquim hjoaquim added this pull request to the merge queue Sep 15, 2023
Merged via the queue into develop with commit 41eb6de Sep 15, 2023
27 checks passed
@hjoaquim hjoaquim deleted the hotfix/weird-logs branch September 19, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat XS Extra small feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants