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

Economy/treasury: No data found for any secondary market treasuries. Displays a blank chart. #1958

Merged
merged 4 commits into from
Jun 20, 2022

Conversation

montezdesousa
Copy link
Contributor

Description

Fixes #1946 which failed to display chart with secondary market treasuries data. I believe it was a detail on the name secondary data has in the source dataframe. Code looks for first capital first letter 'Secondary' or 'Nominal' type of treasuries, which is not in this format for the secondary type. Just lowercased both the column name and the type_string to be searched to work for both cases. Seems to have worked.

image

image

  • Summary of the change / bug fix.
  • Link # issue, if applicable.
  • Screenshot of the feature or the bug before/after fix, if applicable.
  • Relevant motivation and context.
  • List any dependencies that are required for this change.

How has this been tested?

treasury -m 3m -f daily -t secondary
treasury -m 3m -f weekly -t secondary
treasury -m 3m -t secondary
pytest tests/openbb_terminal/economy/test_econdb_model.py
pytest tests/openbb_terminal/economy/test_econdb_view.py

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@montezdesousa montezdesousa added the bug Fix bug label Jun 17, 2022
@montezdesousa montezdesousa self-assigned this Jun 17, 2022
Copy link
Contributor

@colin99d colin99d left a comment

Choose a reason for hiding this comment

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

Beautiful!

@montezdesousa montezdesousa removed the request for review from Chavithra June 18, 2022 12:04
@colin99d colin99d merged commit ac50ab0 into main Jun 20, 2022
@colin99d colin99d deleted the issue1946 branch June 20, 2022 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Economy/treasury: No data found for any secondary market treasuries. Displays a blank chart.
3 participants