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] Warn limit number of countries in TE request #6334

Merged
merged 10 commits into from
Apr 23, 2024

Conversation

hjoaquim
Copy link
Contributor

@hjoaquim hjoaquim commented Apr 23, 2024

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

    • Allowing more than N countries in a TE request would break with a http code of 400.
  2. What? (1-3 sentences or a bullet point list):

    • If countries are above 28 (which is the number when it usually starts to fail), adds a warning and an extra info message when it fails.
  3. Impact (1-2 sentences or a bullet point list):

    • Low - small improvement on UX.
  4. Testing Done:

    • Experiment with any amount of countries from openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/utils/countries.py:
from openbb import obb
countries = [...]
obb.economy.calendar(provider="tradingeconomics", country=countries).to_df()
  1. Reviewer Notes (optional):

    • It looks like it depends on the countries we're sending. Sometimes it fails for 28, other times 31/32. I wasn't able to get more than 32 with any combination of countries. Also, couldn't find any information related with this limit on TE API docs.
    • Limiting to the number of characters doesn't work as well, usually starts failing when url is arround len 400.
    • See also discussion on [Feature] Limit number of countries in TE request #6301
    • cc @andrewkenreich

@github-actions github-actions bot added enhancement Enhancement platform OpenBB Platform v4 PRs for v4 labels Apr 23, 2024
@IgorWounds IgorWounds added this pull request to the merge queue Apr 23, 2024
Merged via the queue into develop with commit 9bfa378 Apr 23, 2024
12 of 15 checks passed
@IgorWounds IgorWounds deleted the feature/te-country-limit branch April 24, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants