-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Adds BaseModel
and SystemModel
#4491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might need to add this to CredentiasModel and PreferencesModel, for some reason it's not doing repr as in the parent. Maybe pydantic overrides this if not specified.
def __repr__(self) -> str:
return super().__repr__()
You can test in a Jupyter notebook with CredentialsModel()
for e.g.
…Terminal into feature/base-class
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
…Terminal into feature/base-class
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #4491 +/- ##
==========================================
Coverage ? 55.27%
==========================================
Files ? 588
Lines ? 53451
Branches ? 0
==========================================
Hits ? 29546
Misses ? 23905
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
* adding BaseModel * initial version of the system model * creating setup functions and removing constants from config_terminal * removing log_supress const * fix test * merge * system handler * fix import * centralized configs setup * repr to use the BaseModel * updating i18n dict location * ignoring warning on wrong type-var * ruff * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * Update openbb_terminal/core/models/system_model.py Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * import literal * loading env files before the plot backend is called * fix tests/openbb_terminal/test_terminal_helper.py * tests need to have i18n initialized * fix seeking_alpha tests --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
BaseModel
Adds common functionality to our data classes by adding a parent class
BaseModel
.Applied to:
SystemModel
config_terminal.py
variables into SystemModelos
to SystemModel --> TBD in a different PR