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

Data Sources Fix for Installer: Second Try #2718

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

simmonsj330
Copy link
Contributor

Description

Previously, the installer was running into an error where it was not loading in the data_sources_default.json correctly.

Screen Shot 2022-10-05 at 2 04 10 PM

The file is located in OpenBBUserData folder on the user's machine, however it is empty. This is on purpose. If the user does not purposefully populate this file in some way, then the terminal should use the default sources provided by OpenBB. This bug demonstrates that this is not the case for the installer. It always looks at the sources file in the user data folder. This PR fixes this by always opening the provided default sources from the correct location first (in the case of the installer.OpenBB/) and then if there is content within the user data sources file, then it will utilize that.

How has this been tested?

This has been tested by creating an installer and doing the following:

  • Testing commands when using the provided data sources file
  • Testing commands when adding wrong content to the OpenBBUserData data sources file to make sure it fails correctly
  • Testing commands when adding correct content (copying the data_sources_default.json to the user data sources file location) to make sure it works correctly.

Others

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

@simmonsj330 simmonsj330 added bug Fix bug build Build-related work labels Oct 5, 2022
@simmonsj330 simmonsj330 self-assigned this Oct 5, 2022
@simmonsj330 simmonsj330 merged commit 2c94ef7 into OpenBB-finance:main Oct 5, 2022
@simmonsj330 simmonsj330 deleted the sources_fix_2 branch October 5, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug build Build-related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants