Commit Graph

24 Commits

Author SHA1 Message Date
montezdesousa
f5bd14c03c Auto build sdk (#5397)
* save map of installed extensions

* allow silencing build prints

* use console class instead

* uncomment

* remove menus with empty commands

* detect changes

* build

* change warning

* rename variable

* uncomment

* remove unused variable

* check and build

* rename params

* change func name

* Update stocks.py

* Update crypto.py

* Update economy.py

* Update forex.py

* cwd

* fix test

* remove cwd

* rename var

* linters debug mode

* move code to core

* change description

* add option to avoid auto build

* unittests

* minor fix

* update readme

* readme

* Update README.md

* Update README.md

* Update package_builder.py

* ruff

* fix test
2023-09-01 20:48:09 +01:00
montezdesousa
d8ff897509 sort module map to avoid randomness in build 2023-08-31 13:05:27 +01:00
Igor Radovanovic
bc28dff7cc Linting 2023-08-31 12:14:41 +02:00
Igor Radovanovic
e1d971c754 Rebuild static assets 2023-08-31 11:42:56 +02:00
montezdesousa
52063550d7 change dunder var names to single underscore 2023-08-30 17:35:03 +01:00
montezdesousa
f89a4d7ad9 relative imports package_builder 2023-08-30 13:22:39 +01:00
Igor Radovanovic
9bc4924320 Fix futures curve 2023-08-29 12:20:54 +02:00
montezdesousa
7a2220a297 fix autocomplete (#5383) 2023-08-27 14:47:44 +01:00
Diogo Sousa
348977a36c pylint 2023-08-25 11:44:07 +01:00
montezdesousa
fa4ced7a0d Feature/move package (#5374)
* move package to openbb_sdk

* avoid test writing files

* black

* revert toml changes, will do it in another PR

* run build in a separate process

* change error msg

* rename func

* change msg

* rename func + msg

* change param name

* update readme

* lazy load some deps

* Update README.md

* modules is better

* doc
2023-08-25 11:34:36 +01:00
Diogo Sousa
25d54a31ad improve __repr__ for sdk classes 2023-08-22 01:31:10 +01:00
Igor Radovanovic
6e73b1236a Linting and improvements 2023-08-21 11:39:59 +02:00
Igor Radovanovic
374dd96aed Feature/fetcher cleanup (#5330)
* Linting

* added extra params and file cleanup in yfinance

* `yfinance` Fetcher refactored

* `cboe` Fetcher refactored, pydocstyle pass and cleanup

* `yfinance` Fetcher cleanup and pydocstyle pass

* `cboe` Fetcher cleanup

* ruff + black

* Linting

* Fetcher cleanup and typing, bug fixes

Co-authored-by: montezdesousa

* Fix CPI

* Fix CBOE typing

* Fix yfinance typing

* MyPy improvements

* remove pass

* property reorder

* update get_data_many to return raw data and refactor treasury rates

* refactor stocksplits

* stockquote

* change data one and stock peers

* stock ownership

* stock news

* stock multiples

* insider trading

* stock eod

* share stats

* sec fillings

* risk premium

* revenue business line

* revenue geographic

* price target

* black

* treasury rates descriptions

* more descriptions

* remove The from descriptions

* remove The from descriptions

* price target consensus

* polygon forex pairs

* fix `Annotated is not defined` in static files

* cboe Fetcher relisted data and pyproject cleanup

* major indices eod

* yfinance relisted data

* major indixes const

* key metrics

* key executive

* institutional ownership

* forgot futures curve

* income statement

* income statement growth

* remove unecessary var

* black

* rename var

* change generic var names

* rename abstract fetcher inner properties

* remove unused provider helpers

* add class description

* import from ParamSpec regardless of version

* specific imports hub service & ruff

* remove useless inspect import

* update comment

* remove mypy comment

* fmp Fetcher refactor, pydocstyle pass and cleanup

* ruff

* query.Dict to query.dict and set dates to 1 year diff

* polygon date interval is 1 year

* typing

* mypy

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
2023-08-18 10:59:20 +01:00
montezdesousa
4435e1cbe7 Feature/gen docstring (#5326)
* update package builder

* sort childpath

* rewrite docstrings

* black & ruff

* add futures to interface

* typo

* rename funcs

* rename vars

* rename vars

* typo

* wrong descripton news

* rebuild python interface func fix

* fix package builder tests

* update docstring tests
2023-08-16 11:47:44 +01:00
montezdesousa
1165e57b40 make some provider args optional 2023-08-04 10:56:20 +01:00
James Maslek
ce5b93ae4e Custom args to package builder (#5282) 2023-08-04 00:59:51 +01:00
montezdesousa
3018be889d add some charts PR stuff into the main repo (#5224)
* add some charts PR stuff into the main repo

* add charting method working for jupyter

* dont raise

* renamed router

* cleaner

* ruff

* remove print, add todo

* minor readme adjustment on url

* adding pandas-ta

* add pandas-ta to deps

* remove optional content

* settings env file

* Use import relative to the package instead of REPO

* using openbb_directory const instead

* optional content

* optional content

* optional content

* black

* added user styles for console

* initializing backend in the charting manager and moving things - working version

* pyling

* add defaults

* ruff

* fixing circular import

* fix backend creation

* cmd location on the args instead

* considering charting settings on ta class

* cleaning ta extension

* adding missing dependency on ta

* charts on window

* misplaced import

* rename file no_import to dummy_backend

* redirect import

* introducing debug_mode and cleaning todos on ta_class

* rename backend folder to core

* move charts inside app folder and allocate models

* move logs folder into app folder

* fixing paths

* fixing todos on openbb_figure

* setting dummy backend to warn and open in browser if pywry missing

* ruff

* write msg inside exception

* refactor the use of the theme

* change package builder module names

* removing all references to theme as global variable

* ajudsting the usage of kwargs on the charting_router

* removing references to rich style and console things

* dinamically import the backend functions on the charting manager

* add comment

* fix backend funcs import

* read debug_mode from env

* no need to fix manager, but ignore ruff inside __init__

* break command_runner __execute_func into smaller functions

* don't raise unless debug mode

* replace some errors by OpenBBError

* raise provider error if failure

* add timedelta minus 7 for eods

* 5 is better

* print chart error if any

* same print for warnings

* fixing the broken indicators and removing clutter

* warn warnings in debug mode

* fix path

* fixes on the ta examples

* bringing back the utils functions

* add error handling messages and sync debug mode

* rename base_filter to call_filter

* fix chart on api

* complete comment

* add runtime debug_mode in the static version

* removing comment

* working with dataframes in the package

* ruff

* ruff

* ruff

* readme

* ruff

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2023-07-21 09:40:04 +01:00
montezdesousa
9e8e711737 rename command_runner_wrapper and clean up refs 2023-07-12 20:07:35 +01:00
Theodore Aptekarev
e5a9a7f427 Update folder structure for the SDK v4 (#5212)
* Move openbb_provider

* Add lock file for provider core

* Move sdk core

* Move openbb-provider readme text to the correct location

* Move data providers code

* Remove decoupling leftovers

* Lower the supported python version to 3.8

* Move sdk extensions

* Rename provider imports

* Update openbb pyproject toml

* Fix import statements after the move

* Update lock files

* Change ignored path for the static assets

* Add obb mascot

* Fix providers not being available in the openbb package

* Remove providers extension in favor of the coverage router in sdk core

* username is optional

* linting

* Change openbb_sdk_core to openbb_core

* Bump ruff pre-commit to latest version

* Bump ruff to latest in github actions

* Make ruff and pylint lint only the code in diff in GHA

* Attempt to fix broken linting action

* Attempt to fix the broken linting action II

* Lint code with pre-commit

* Revert all changes to github actions

* Revert to using ruff 0.0.256

* Use dot for local imports

* Re-commit lost forex pairs

* Fix fmp's typo that made it to the openbb data points

* Add other_investing_activities field that has a typo in fmp's api

---------

Co-authored-by: montezdesousa <montezdesousa@gmail.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2023-07-12 18:43:30 +02:00
Theodore Aptekarev
38c8edc76e Fix imports for installed python packages 2023-07-07 21:28:53 +02:00
Diogo Sousa
8b4a506976 fix package builder issues 2023-07-03 13:33:36 +01:00
Diogo Sousa
b092e572d5 add back logs 2023-07-03 13:12:08 +01:00
Theodore Aptekarev
ab239f35ba Move dosctring generation code 2023-07-03 11:59:21 +02:00
Theodore Aptekarev
1febf188bb Add pyproject toml for the openbb metapackage 2023-06-30 20:29:45 +02:00