Create OpenBB Platform Installer with conda constructor (#6587)
* add snowflake integration video (#6339) * [HotFix] Fix broken URLs in docs page. (#6368) * Fix broken URLs * use full URL to other docs pages. * [Release] 4.2.0 (#6422) * [Docs] Remove Reference to `to_chart` in OBBject. (#6096) * remove reference to to_chart in OBBject. * put chart description back in OBBject properties * [Feature] - Create openbb assets folder (#6101) * create openbb assets folder * fix unittest * rebuild --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Fixes to_df() where the date series contains multiple TZ-offsets. (#6099) * allow mixed utc offset in a tz-aware date column * enforce ascending from all providers for price.historical * fix tests * add comments and apply treatment to basemodel_from_df before JSON output * yfinance consistency * add unit test * add unit test * better test * ruff --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Update the quantitative extension to make more sense (#6087) * Split out a rolling submenu for the rolling functions * Make a performance and a stats submenu. * Test the statistics functions * lint * lint * dupe test * pylint * ruff * Try tests quick * black magic signature funcs * fix my custom tests * Fix the existing imports/urls * push the api update * okay I figured out whats going on * this should be all of them * Correct docstringing examples --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [BugFix] Fix ECB Yield Curve (#6108) * fix ecb yield curve * standard model update * Update unit-test workflow to check for changes to openbb_platform (#6109) * [Bug fix] - Fix package mypy (#6110) * fix: package mypy * types * black * [Feature] - Equity router descriptions & examples (#6103) * feat: equity/calendar * feat: compare router * fix descriptions * darkpool + discovery * fix paragraph issues * fix descriptions * fundamental part 1 * fundamental part2 * transcipts * ownership * fix * price * shorts * Update darkpool_router.py * minor fix * shorts examples * examples * ruff * black --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Feature] - Add `exception_handler` decorator to static (#6112) * add exception handler decorator * add exception handler decorator code * updated static * rebuild to fix docstring indentation --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * update extensions list (#6114) * add missing field descriptions to yfinance equity price historical (#6116) Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * remove charting extension env var (#6118) * [BugFix] Fix Company News (#6111) * fix company news * update tests * multiple symbols for polygon * don't include pageSize in Benzinga querystring, fixed as 100 * remove extra space * black * unused imports * make benzinga test cassette smaller * missing params * clear empty strings --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Allow Multiple Symbols in `equity.fundamental.metrics()` from `yfinance` (#6124) * allow multiple symbols in key_metrics from yfinance * field order thing * remove unnecessary function (#6125) * [Docs] Update OpenBB Copilot docs (#6106) * WIP: Tweak description. * WIP: Experimenting with react-player * WIP: Add copilot docs. * fixes videos width/height * WIP: Refine videos and copy. * WIP: Add last videos and sections. * Add bring-your-own-copilot section. * Tweak grammar. * Add copilot link. * Fix typos. --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * [Enhancement] Add Previous Close to DATA_DESCRIPTIONS (#6120) * add data description for previous close * ..just the one * update the model tripped by this change --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * added australia as a country also (#6131) * [Bug fix] - Fix regulator cik map standard model (#6129) * Fix regulator cik map standard model * fix description * Update cik_map.py * increase timeout to 30 (#6115) Co-authored-by: James Maslek <jmaslek11@gmail.com> * clean up some v3 deps (#6105) * clean up some v3 deps * forgot we need to do the requirements txt files * not sure it matters, but run ruff + black * am addicted to bug fixes --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Bug fix] - explicit multiple items docstring (#6127) * explicit multiple items docstring * rebuiild * rebuild again --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Feature] Pretty Pydantic `ValidationError` exceptions (#6130) * fix validator in fmp IndexHistorical model * make ValidationError pretty * modify arg error * linting fmp IndexHistorical * black * remove unused code * tmx etf info (#6132) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * [Feature] - Platform V4 Markdown Generator V2 (#6094) * add recent `openapi.json` * fix data types in models * removed `openapi.json` * set default date value as None in PolygonCurrencyPairs class * add function to generate reference.json file * reworked function to improve readability * reword function to add seo metadata * add functions for creating markdown sections * add code to extract data card markdown title * add additional functions for generating index and data models file * extract first sentence of the description for cards * code cleanup and documentation * linting * linting polygon models * add openbb import statement in create_reference_markdown_examples function * add POST method functions * cleanup; reworked generate_reference_index_files function * moved development section to 7th position in the sidebar * fix POST function params default value add standard flag to QueryParams and Data fields cleanup * add type expansion from package_builder.MethodDefinition * sort data models cards alphabetically make printing less verbose * make MAX_CARDS global display less content in cards in Commannds section * cleanup * Remove '_' from the cards under Commands section * " to ' in econometrics/causality * replace ' with " in ReferenceCard for reference dir index files * remove extra . from the quantile function description * shoutout to @deeleeramone for finding POST method description bug! * set correct value for standard field * handle BaseModel types in provider data fields * unit tests for the platform markdown generator v2 * yeet 'Default' and 'Optional' columns in the 'Data' section * last minute bug fix * add info for multiple symbols * make multiple items info same as platform static * organize sections properly * sort reference sub-directories alphabetically * extra space in 'OBBject extra' description * add type expansion for fields with multiple items POST method cleanup --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Docs] Adds Example Notebook for the Implied Earnings Move (#6128) * adds example notebook for the implied earnings move * remove commented out line --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] - Sync with new openapi.json (#6137) * feat: create data tabs * fix: uncomment * fix: remove unecessary comment * sort side bar * comment * uncomment * use .dev functions.json + clean traverse * fix futures example * fix example * point to .co * Fix the v3 markdown generation workflow (#6138) * fix workflow * debug time * see if the docs generate at least * ahhhh i found it * getting there * put the test first * some keys cleanup * small change to error message * update functions.json (#6140) * fix intraday check in charting ta_class (#6119) Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * [BugFix] Display EconDB as source for macro (#6143) * [BugFix] Disable Intrinio `InstitutionalOwnership` model (#6142) * disable fetcher in init and fetcher tests * disable provider test params from equity python and api tests * updated static * add more examples into findSymbols (#6139) Co-authored-by: James Maslek <jmaslek11@gmail.com> * [BugFix] Fix SEC ETF Holdings Parsing Exception (#6121) * fix etf holdings * linting * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/update xl docs (#6145) * remove print * update obb.get docs * example * md lint * fix get reference (#6147) * [BugFix] Filter OECD data using `start_date` and `end_date` parameters (#6144) * move constant dicts to constants.py filter by start_date and end_date * black * black again again * Merge 'main' into 'develop' (#6151) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply… * Release/4.2.1 (#6456) * tmx etf info (#6132) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * [Feature] - Platform V4 Markdown Generator V2 (#6094) * add recent `openapi.json` * fix data types in models * removed `openapi.json` * set default date value as None in PolygonCurrencyPairs class * add function to generate reference.json file * reworked function to improve readability * reword function to add seo metadata * add functions for creating markdown sections * add code to extract data card markdown title * add additional functions for generating index and data models file * extract first sentence of the description for cards * code cleanup and documentation * linting * linting polygon models * add openbb import statement in create_reference_markdown_examples function * add POST method functions * cleanup; reworked generate_reference_index_files function * moved development section to 7th position in the sidebar * fix POST function params default value add standard flag to QueryParams and Data fields cleanup * add type expansion from package_builder.MethodDefinition * sort data models cards alphabetically make printing less verbose * make MAX_CARDS global display less content in cards in Commannds section * cleanup * Remove '_' from the cards under Commands section * " to ' in econometrics/causality * replace ' with " in ReferenceCard for reference dir index files * remove extra . from the quantile function description * shoutout to @deeleeramone for finding POST method description bug! * set correct value for standard field * handle BaseModel types in provider data fields * unit tests for the platform markdown generator v2 * yeet 'Default' and 'Optional' columns in the 'Data' section * last minute bug fix * add info for multiple symbols * make multiple items info same as platform static * organize sections properly * sort reference sub-directories alphabetically * extra space in 'OBBject extra' description * add type expansion for fields with multiple items POST method cleanup --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Docs] Adds Example Notebook for the Implied Earnings Move (#6128) * adds example notebook for the implied earnings move * remove commented out line --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] - Sync with new openapi.json (#6137) * feat: create data tabs * fix: uncomment * fix: remove unecessary comment * sort side bar * comment * uncomment * use .dev functions.json + clean traverse * fix futures example * fix example * point to .co * Fix the v3 markdown generation workflow (#6138) * fix workflow * debug time * see if the docs generate at least * ahhhh i found it * getting there * put the test first * some keys cleanup * small change to error message * update functions.json (#6140) * fix intraday check in charting ta_class (#6119) Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * [BugFix] Display EconDB as source for macro (#6143) * [BugFix] Disable Intrinio `InstitutionalOwnership` model (#6142) * disable fetcher in init and fetcher tests * disable provider test params from equity python and api tests * updated static * add more examples into findSymbols (#6139) Co-authored-by: James Maslek <jmaslek11@gmail.com> * [BugFix] Fix SEC ETF Holdings Parsing Exception (#6121) * fix etf holdings * linting * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/update xl docs (#6145) * remove print * update obb.get docs * example * md lint * fix get reference (#6147) * [BugFix] Filter OECD data using `start_date` and `end_date` parameters (#6144) * move constant dicts to constants.py filter by start_date and end_date * black * black again again * Merge 'main' into 'develop' (#6151) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: tehcoderer <me@tehcoderer.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Hotfix/pypi openbb terminal (#5719) * renaming the project * documentation changes * Finishing touches to the publishing procedure (#5728) * finishing touches to the publishing procedure * grammar improvements * Run tests on develop (#5725) * Run tests on develop * Add a check that files changes in platform * Seprate Intrinio financials data tags into a different command (#5723) * add `ebit` field in income statement standard model * only add required data tags * remove calculations data * use `name` key instead of `tag` key * set `period` as required in data * remove `period` and `cik` from provider models * add `equity/fundamental/search_financial_attributes` with tests * clean descriptions file * add `equity/fundamental/financial_attributes` with tests * set `value` as `Optional` * Fix threadpool test error (#5734) * Remove ultima from deps (#5736) * remove ultima from deps * skip ultima test * black * change skip location * try except statement to avoid error on the ci * new currency reference rates pr (#5724) * point files to linters (#5739) * remove news from equity (#5741) * Add tiingo provider (#5740) * first commit * things * Add news endpoints * CryptoHistorical * Add currency and trailing dividend yield * things working * deps * fix pre commit things * tests? * black on the tests * pratty told me to add it * integration tests * added helpers * crypto revamped * currency revamped * trailing dividend yield revamped * equity historical revamped * company news overhauled * global news overhauled * remove `tags` param from news models * crypto correct `exchanges` description * james smh * re-recorded fetcher tests * fixed integration tests * econometrics smh * james smh again --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Add `derivatives` extension for `futures` and `options` (#5742) * removed options and futures * add derivatives extension * cleanup * bug #5649 (#5722) * bug #5649 * fixing --a upmom, downmom --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Rename the fmp search -> screener (#5744) * Rename the fmp search -> screener * misses some * i cant copy paste * docs/fix-urls: Updates the Terminal About URLs to match `/develop` (#5720) * update Terminal about URLs and some other broken links * ruff * intro * changing the heading levels * dependency management sections * structure * developer guides * structure * contributor guides * keywords and descriptions * broken urls * cool cards * Cool cards (#5727) * tidy up terminal/content * some more tidy up * fix styling for platform that was missing * more tidy up * improve color for dark and light mode * create new reference card for more basic cards * rename back to menus * implement all index.md for terminal, except reference * improve bot title * more refactoring * fix remaining index * header styling * more styling * heheheheheheeh * Revert "heheheheheheeh" This reverts commit7d095fcfd2. * Ccards (#5733) * links * more links * improved styling and chevron aligned to title * fix index.mdx urls for Terminal * update package.json * update index.mdx * fix generation * spelling * toolkit_extensions * update data extensions * couple of links * add tiingo to data extensions list --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: James Maslek <jmaslek11@gmail.com> * Stock leftover cleanup (#5745) * change to equity in `.md` files * `HistoricalStockSplits`->`HistoricalSplits` * `StockInsiderTrading`->`InsiderTrading` * sorry fmp * `EquityHistorical` cleanup * `EquityNBBO` cleanup * .md leftover * the last of stocks * Hotfix/urllib to dev group (#5732) * use the urllib3 dependency on the dev group instead * adapt the version script for the nightlies - if it's a nightly the package distribution name will have a different name * add dev dependencies to the dev installation bc of the ci * updating the import on validate_call according to: https://docs.pydantic.dev/latest/concepts/validation_decorator/ the way we were importing it breaks if pydanti… * [Docs] Guides for Metadata and AnnotatedResult (#6457) * [Docs] Redirect contributing URL (#6460) * redirect url * order * [Release] 4.2.2 (#6480) * Docs/update xl docs (#6145) * remove print * update obb.get docs * example * md lint * fix get reference (#6147) * [BugFix] Filter OECD data using `start_date` and `end_date` parameters (#6144) * move constant dicts to constants.py filter by start_date and end_date * black * black again again * Merge 'main' into 'develop' (#6151) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: tehcoderer <me@tehcoderer.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Hotfix/pypi openbb terminal (#5719) * renaming the project * documentation changes * Finishing touches to the publishing procedure (#5728) * finishing touches to the publishing procedure * grammar improvements * Run tests on develop (#5725) * Run tests on develop * Add a check that files changes in platform * Seprate Intrinio financials data tags into a different command (#5723) * add `ebit` field in income statement standard model * only add required data tags * remove calculations data * use `name` key instead of `tag` key * set `period` as required in data * remove `period` and `cik` from provider models * add `equity/fundamental/search_financial_attributes` with tests * clean descriptions file * add `equity/fundamental/financial_attributes` with tests * set `value` as `Optional` * Fix threadpool test error (#5734) * Remove ultima from deps (#5736) * remove ultima from deps * skip ultima test * black * change skip location * try except statement to avoid error on the ci * new currency reference rates pr (#5724) * point files to linters (#5739) * remove news from equity (#5741) * Add tiingo provider (#5740) * first commit * things * Add news endpoints * CryptoHistorical * Add currency and trailing dividend yield * things working * deps * fix pre commit things * tests? * black on the tests * pratty told me to add it * integration tests * added helpers * crypto revamped * currency revamped * trailing dividend yield revamped * equity historical revamped * company news overhauled * global news overhauled * remove `tags` param from news models * crypto correct `exchanges` description * james smh * re-recorded fetcher tests * fixed integration tests * econometrics smh * james smh again --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Add `derivatives` extension for `futures` and `options` (#5742) * removed options and futures * add derivatives extension * cleanup * bug #5649 (#5722) * bug #5649 * fixing --a upmom, downmom --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Rename the fmp search -> screener (#5744) * Rename the fmp search -> screener * misses some * i cant copy paste * docs/fix-urls: Updates the Terminal About URLs to match `/develop` (#5720) * update Terminal about URLs and some other broken links * ruff * intro * changing the heading levels * dependency management sections * structure * developer guides * structure * contributor guides * keywords and descriptions * broken urls * cool cards * Cool cards (#5727) * tidy up terminal/content * some more tidy up * fix styling for platform that was missing * more tidy up * improve color for dark and light mode * create new reference card for more basic cards * rename back to menus * implement all index.md for terminal, except reference * improve bot title * more refactoring * fix remaining index * header styling * more styling * heheheheheheeh * Revert "heheheheheheeh" This reverts commit7d095fcfd2. * Ccards (#5733) * links * more links * improved styling and chevron aligned to title * fix index.mdx urls for Terminal * update package.json * update index.mdx * fix generation * spelling * toolkit_extensions * update data extensions * couple of links * add tiingo to data extensions list --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: James Maslek <jmaslek11@gmail.com> * Stock leftover cleanup (#5745) * change to equity in `.md` files * `HistoricalStockSplits`->`HistoricalSplits` * `StockInsiderTrading`->`InsiderTrading` * sorry fmp * `EquityHistorical` cleanup * `EquityNBBO` cleanup * .md leftover * the last of stocks * Hotfix/urllib to dev group (#5732) * use the urllib3 dependency on the dev group instead * adapt the version script for the nightlies - if it's a nightly the package distribution name will have a different name * add dev dependencies to the dev installation bc of the ci * updating the import on validate_call according to: https://docs.pydantic.dev/latest/concepts/validation_decorator/ the way we were importing it breaks if pydantic=2.5 @montezdesousa * loosing urllib3 version specification on the provider and adding it to platform dev deps * rmeoving urllib from top level deps; and removing --with dev flag * changing to ^ instead * Revert "changing to ^ instead" This reverts commit7300904e9f. * unnecessary dep --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> * feature/v4-bop - Add ECB Balance of Payments (Replaces #5716) (#5726) * add ecb balance of payments * missing __init__.py files * Nasdaq calendar earnings and fix FMP calendar earnings (#5718) Co-authored-by: James Maslek <jmaslek11@gmail.com> * feature/us-treasury-auctions: Adds Treasury Auctions endpoint and provider for US Government Data. (#5746) * add government_us provider and treasury auctions endpoint * black * add param for cusip * move logic for setting default start/end date * Update hub<>platform credentials map (#5749) * update hub<>platform credentials map * typo * Add API settings schema to system settings (#5743) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * Skip checking creds (#5737) * skip checking creds * fix bug * ok mypy * add comment * rename required_credentials * fix * fix top_retail bug * don't require creds in some nasdaq fetchers * black * this was not here before * fix tests * update fetcher test * update contributing guidelines * Fix Quote (#5752) * Fix Quote * fixed return type and model validation --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Wrap up renaming global news to world news on a model level (#5750) * Wrap up renaming global news to world news on a model level * cleanup --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Remove eod from docstrings (#5751) * Wrap up renaming global news to world news on a model level * Remove "end of day" from historical price model docstrings --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Massive docstring cleanup (#5755) * sec router remove command * standard models cleanup * fmp cleanup * av cleanup * benzinga cleanup * biztoc cleanup * cboe cleanup * ecb cleanup * finra cleanup * fred cleanup * us cleanup * intrinio cleanup * nasdaq cleanup * oecd cleanup * polygon cleanup * sec cleanup * seeking alpha cleanup * stockgrid cleanup * tiingo cleanup * tradingeconomics cleanup * ultima cleanup * wsj cleanup * yfinance cleanup * sec router lint * fix date query param description * Updates system and api settings (#5753) * remove uncessary import on rest api * remove FrozenField and add api.version * allow setup from json * remove id tag * computed field is better * formatting --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Squeeze build time (#5756) * squeeze build time * bug fix * fix test * typo? * rebuild * keep tradingeconomics * docs/working-docs: Working V4 Docs PR (#5747) * post-install clarification, fix links * more links * change word * toolkit cleanup * rename 'contributing' to 'development' * update extensions * some urls * Update sdk-platform and v4-develop in urls (#5730) * Update sdk-platform and v4-develop in urls * Seprate Intrinio financials data tags into a different command (#5723) * add `ebit` field in income statement standard model * only add required data tags * remove calculations data * use `name` key instead of `tag` key * set `period` as required in data * remove `period` an… * [Docs] Fix Broken URLs (#6494) * fix broken urls * couple more * remove poetry install openbb_platform from docs generation. * Try it this way. * [Docs] Excel docs update (#6504) * update xl docs * update xl files * Release/4.2.3 (#6517) * [Release] 4.1.5 to `develop` (#6192) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: tehcoderer <me@tehcoderer.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Hotfix/pypi openbb terminal (#5719) * renaming the project * documentation changes * Finishing touches to the publishing procedure (#5728) * finishing touches to the publishing procedure * grammar improvements * Run tests on develop (#5725) * Run tests on develop * Add a check that files changes in platform * Seprate Intrinio financials data tags into a different command (#5723) * add `ebit` field in income statement standard model * only add required data tags * remove calculations data * use `name` key instead of `tag` key * set `period` as required in data * remove `period` and `cik` from provider models * add `equity/fundamental/search_financial_attributes` with tests * clean descriptions file * add `equity/fundamental/financial_attributes` with tests * set `value` as `Optional` * Fix threadpool test error (#5734) * Remove ultima from deps (#5736) * remove ultima from deps * skip ultima test * black * change skip location * try except statement to avoid error on the ci * new currency reference rates pr (#5724) * point files to linters (#5739) * remove news from equity (#5741) * Add tiingo provider (#5740) * first commit * things * Add news endpoints * CryptoHistorical * Add currency and trailing dividend yield * things working * deps * fix pre commit things * tests? * black on the tests * pratty told me to add it * integration tests * added helpers * crypto revamped * currency revamped * trailing dividend yield revamped * equity historical revamped * company news overhauled * global news overhauled * remove `tags` param from news models * crypto correct `exchanges` description * james smh * re-recorded fetcher tests * fixed integration tests * econometrics smh * james smh again --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Add `derivatives` extension for `futures` and `options` (#5742) * removed options and futures * add derivatives extension * cleanup * bug #5649 (#5722) * bug #5649 * fixing --a upmom, downmom --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Rename the fmp search -> screener (#5744) * Rename the fmp search -> screener * misses some * i cant copy paste * docs/fix-urls: Updates the Terminal About URLs to match `/develop` (#5720) * update Terminal about URLs and some other broken links * ruff * intro * changing the heading levels * dependency management sections * structure * developer guides * structure * contributor guides * keywords and descriptions * broken urls * cool cards * Cool cards (#5727) * tidy up terminal/content * some more tidy up * fix styling for platform that was missing * more tidy up * improve color for dark and light mode * create new reference card for more basic cards * rename back to menus * implement all index.md for terminal, except reference * improve bot title * more refactoring * fix remaining index * header styling * more styling * heheheheheheeh * Revert "heheheheheheeh" This reverts commit7d095fcfd2. * Ccards (#5733) * links * more links * improved styling and chevron aligned to title * fix index.mdx urls for Terminal * update package.json * update index.mdx * fix generation * spelling * toolkit_extensions * update data extensions * couple of links * add tiingo to data extensions list --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: James Maslek <jmaslek11@gmail.com> * Stock leftover cleanup (#5745) * change to equity in `.md` files * `HistoricalStockSplits`->`HistoricalSplits` * `StockInsiderTrading`->`InsiderTrading` * sorry fmp * `EquityHistorical` cleanup * `EquityNBBO` cleanup * .md leftover * the last of stocks * Hotfix/urllib to dev group (#5732) * use the urllib3 dependency on the dev group instead * adapt the version script for the nightlies - if it's a nightly the package distribution name will have a different name * add dev dependencies to the dev installation bc of the ci * updating the import on validate_call according to: https://docs.pydantic.dev/latest/concepts/validation_decorator/ the way we were importing it breaks if pydantic=2.5 @montezdesousa * loosing urllib3 version specification on the provider and adding it to platform dev deps * rmeoving urllib from top level deps; and removing --with dev flag * changing to ^ instead * Revert "changing to ^ instead" This reverts commit7300904e9f. * unnecessary dep --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> * feature/v4-bop - Add ECB Balance of Payments (Replaces #5716) (#5726) * add ecb balance of payments * missing __init__.py files * Nasdaq calendar earnings and fix FMP calendar earnings (#5718) Co-authored-by: James Maslek <jmaslek11@gmail.com> * feature/us-treasury-auctions: Adds Treasury Auctions endpoint and provider for US Government Data. (#5746) * add government_us provider and treasury auctions endpoint * black * add param for cusip * move logic for setting default start/end date * Update hub<>platform credentials map (#5749) * update hub<>platform credentials map * typo * Add API settings schema to system settings (#5743) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * Skip checking creds (#5737) * skip checking creds * fix bug * ok mypy * add comment * rename required_credentials * fix * fix top_retail bug * don't require creds in some nasdaq fetchers * black * this was not here before * fix tests * update fetcher test * update contributing guidelines * Fix Quote (#5752) * Fix Quote * fixed return type and model validation --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Wrap up renaming global news to world news on a model level (#5750) * Wrap up renaming global news to world news on a model level * cleanup --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Remove eod from docstrings (#5751) * Wrap up renaming global news to world news on a model level * Remove "end of day" from historical price model docstrings --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Massive docstring cleanup (#5755) * sec router remove command * standard models cleanup * fmp cleanup * av cleanup * benzinga cleanup * biztoc cleanup * cboe cleanup * ecb cleanup * finra cleanup * fred cleanup * us cleanup * intrinio cleanup * nasdaq cleanup * oecd cleanup * polygon cleanup * sec cleanup * seeking alpha cleanup * stockgrid cleanup * tiingo cleanup * tradingeconomics cleanup * ultima cleanup * wsj cleanup * yfinance cleanup * sec router lint * fix date query param description * Updates system and api settings (#5753) * remove uncessary import on rest api * remove FrozenField and add api.version * allow setup from json * remove id tag * computed field is better * formatting --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Squeeze build time (#5756) * squeeze build time * bug fix * fix test * typo? * rebuild * keep tradingeconomics * docs/working-docs: Working V4 Docs PR (#5747) * post-install clarification, fix links * more links * change word * toolkit cleanup * rename 'contributing' to 'development' * update extensions * some urls * Update sdk-platform and v4-develop in urls (#5730) * Update sdk-platform and v4-develop in urls * Seprate Intrinio financials data tags into a different command (#5723) * add `ebit` field in income statement standard model * only add required data tags * remove calculations data * use `name` key instead of `tag` key * set `period` as required in data * remove `period` and `cik` from provider models * add `equity/fundamental/search_financial_attributes` with tests * clean descriptions file * add `equity/fundamental/financial_attributes` with tests * set `value` as `Optional` * Fix threadpool test error (#5734) * Remove ultima from deps (#5736) * remove ultima from deps * … * fix: openapi bug (#6525) * Update pyproject.toml * undo biztoc lock changes * Add conda constructor code and assets * Unpin setuptools in cli * Exclude construct.yaml from linting * Try fixing regex in gha yaml linting * Don't regex gitignore * Revert "Try fixing regex in gha yaml linting" This reverts commit3fa1cd6206. * Update requirements to use pypi vs local packages * Update constructor specs * Add pro backend to the bundle * Update post install scripts and assets * Replace pinned dependencies management with the latest pypi versions * Windows Edits * [Feature] Conda Installer (#6604) * reopen PR * updating some windows things * text file edit * couple touch ups * update post_install.sh to install via poetry * readme * poetry.toml * try windows scripts * fixes * vbs poetry env use * codespell * expose uvicorn kwargs * try windows version of modified launcher * try something else * try something else * vbs api shortcut * wrong shortcut * launch windows shortcuts with cmd * windows conclusion script * add WorkingDirectory * windows python path is not in /bin * missed a shortcut WorkingDirectory * notebook windows arg syntax * cwd for notebooks * do a cd .. move * cli wrapper typo * openbb-cli * yaml * add conda * merge branch develop * fix reset_index erasing the name of the column (#6619) * handle edge case where user_settings is not formatted as expected * add welcome message and entry point for python interface build script * flag to not install conda on PATH * add condarc * condarc setting * update requirements.txt * use poetry groups for flexible post-install config * update folder structure * post install * try something for windows * no nsi_template * some updates * remove leading space. * update aiohttp for dependabot (#6621) * example extensions * install examples script * update readme * [BugFix] Fix Pandas FutureWarning In `derivatives.futures.curve` Chart (#6626) * fix Pandas FutureWarning in derivatives.futures.curve * black * codespell * [BugFix] `obb.news.world` Add Validators To Providers Where Symbol Is Mandatory (#6625) * add validators to enforce mandatory symbols in providers where required * linter * fmp 3.9 test cassette --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * data.__fields__ is deprecated - use data.model_fields instead (#6629) * some updates * difflib check * merge prompt * windows updates * cmd cwd --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Remove redundant environment files * Fix markdown formatting * Attribute the installer metapackage to openbb * notebook launch dir * update widgets script for breaking changes and separate api entry point as an OpenBB extension. * codespell * add integration directory to openbb_platform_api * add Bls to 'to_caps' * linters * linters and typos * grammar police * grammar police * more linting * mypy * pylint * some fixes * pylint * duplicate text in welcome * add python basics notebook to examples * Improve wording and formatting in readme and installer text files * Rename OpenBB API to OpenBB Platform API to differentiate from our hosted API * user_settings bug * update multiSelect * label stuff * update readme * Rename platform api extension folder to exclude openbb. Update package name to use - vs _ * Expose a distinct endpoint per provider for each command * Refactor module files to reduce cognitive load * Minor code style improvement * Add package unit tests * Update the constructor file after platform api wrapper refactoring * Add support for get only routers * Flatten out the logic of the main function * Refactor package structure * Update schema parsing and widget generation * Return a lost function * Fix handling of parameters with optional boolean types * Update tests * Remove unused string constants * exclude envs and pkgs folders from condarc * Refactor Widgets Builder For columnsDefs (#6675) * refactor for columnsDefs * column_def field * linting * linting * linting... * fix custom provider name * don't add provider param to custom GET routers * fix some tests * fix key error in test * try fixing it another way * fix column defs edge case * Add implementation of widget filtering based on local json configuration (#6724) * Add implementation of widget filtering based on local json configuration * Update to comply with the widget_settings schema * Add --no-filter command line launch argument * Get openbb-platform-api from pypi versus local copy * Fix tests * Bring back the macos build action * Hack GHA to run the workflow right now * Fix typo and revert run on push * Try build on push again * Specify minimum python and constructor versions * Specify the constructor version * Don't just use tar bz * Add missing packages to constructor dependencies * Revert using only tar-bz * Add entitlements for code signing * Try signing the pkg using constructors native tools * Use codesigning identity name instead of ID * Get creds for James to debug * platform api readme * Add installer identity name * Fix typo in action file * codespell * Try signing _conda with application codesign id * Separate signing and deep signing into 2 steps * Comment out the Intel build action * Change --options to -o and add verbosity * Add notarization identity name to construct * Try using hash vs name for notarization * Clean up * Add Intel build * Run build scripts only on dispatch * Test if shorter widget name is working on pro * Update tests * some updates * patch openbb-platform-api * clean up empty_model * update url in root response message * silly one to build * make it start * make it not start :D * update 1 README detail * fix boolean parsing from command line and turn off uvicorn colors for Windows * linting * codespell * lazy formatting in logger * '%s' --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Michael Struwig <mnicstruwig@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: capital0 <72140796+capital0@users.noreply.github.com> Co-authored-by: Ben Van Doren <benvandoren@users.noreply.github.com> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> Co-authored-by: tehcoderer <me@tehcoderer.com> Co-authored-by: Ramazan <guvencramazan@yandex.com> Co-authored-by: omahs <73983677+omahs@users.noreply.github.com> Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Co-authored-by: Ayrton Parkinson <ayrton.parkinson1@gmail.com> Co-authored-by: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Co-authored-by: Luqman <luqman.bello@openbb.finance> Co-authored-by: Eric Li <38477812+EricLi-Dev@users.noreply.github.com> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com> Co-authored-by: Disorder AA <disorrder@gmail.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Jingyi Z <zhao.elton@gmail.com>
2
.codespell.skip
vendored
@@ -1,5 +1,6 @@
|
||||
./tests
|
||||
.git
|
||||
*.bat
|
||||
*.css
|
||||
*.csv
|
||||
*.html
|
||||
@@ -8,6 +9,7 @@
|
||||
*.js
|
||||
*.json
|
||||
*.lock
|
||||
*.nsi
|
||||
*.scss
|
||||
*.txt
|
||||
*.yaml
|
||||
|
||||
2
.github/workflows/README.md
vendored
@@ -71,7 +71,7 @@ It consists of two jobs: `code-linting` and `markdown-link-check`.
|
||||
The first job, `code-linting`, runs on an Ubuntu machine and performs several linting tasks on the code in the repository, including:
|
||||
|
||||
- Checking out the code from the repository
|
||||
- Setting up Python 3.9
|
||||
- Setting up Python 3.10
|
||||
- Installing a number of Python packages necessary for the linting tasks
|
||||
- Running `bandit` to check for security vulnerabilities
|
||||
- Running `black` to check the code formatting
|
||||
|
||||
3
.github/workflows/general-linting.yml
vendored
@@ -91,3 +91,6 @@ jobs:
|
||||
- name: json-yaml-validate
|
||||
id: json-yaml-validate
|
||||
uses: GrantBirki/json-yaml-validate@v2.0.0
|
||||
with:
|
||||
yaml_exclude_regex: "construct.yaml"
|
||||
use_gitignore: false
|
||||
|
||||
218
.github/workflows/macos-build.yml
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
name: MacOS Build
|
||||
|
||||
env:
|
||||
OPENBB_LOG_COLLECT: false
|
||||
OPENBB_USE_PROMPT_TOOLKIT: false
|
||||
OPENBB_FILE_OVERWRITE: true
|
||||
PIP_DEFAULT_TIMEOUT: 100
|
||||
PYTHONNOUSERSITE: 1
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
M1-MacOs-Build:
|
||||
name: M1 MacOS Build
|
||||
runs-on: [self-hosted, macos, ARM64]
|
||||
steps:
|
||||
# Checkout repository main branch. this allows for the commit hashes to line up
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Git Log
|
||||
run: git log
|
||||
# The following commands to clear previous PATHS and restore to defaults since we have to maintain the instance ourselves
|
||||
- name: Clean Previous Path
|
||||
run: |
|
||||
export PATH=""
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
echo $PATH
|
||||
# Set up caching for conda env so that the workflow runs quickly after the first time
|
||||
- name: Setup Conda Caching
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/conda_pkgs_dir
|
||||
key: conda-macos-3-10-${{ hashFiles('build/conda/environments/constructor.yml') }}
|
||||
# Set up miniconda using the environment yaml file within the repo
|
||||
- name: Setup Miniconda
|
||||
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||
with:
|
||||
miniconda-version: "latest"
|
||||
auto-update-conda: true
|
||||
channels: conda-forge,defaults
|
||||
show-channel-urls: true
|
||||
channel-priority: flexible
|
||||
environment-file: build/conda/environments/constructor.yml
|
||||
activate-environment: constructor
|
||||
auto-activate-base: false
|
||||
|
||||
- name: Creating Application Keychain
|
||||
env:
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }}
|
||||
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
|
||||
run:
|
||||
| # when pushing to main, make to generate new cert, and utilize secrets to store new password, and identity
|
||||
echo "Ensuring Keychain with same name does not exist"
|
||||
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
|
||||
echo "Decoding certificate"
|
||||
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
||||
echo "Creating Keychain"
|
||||
security create-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
|
||||
echo "Setting Default Keychain"
|
||||
security default-keychain -s build.keychain
|
||||
echo "Unlocking Keychain"
|
||||
security unlock-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
|
||||
echo "Importing Keychain"
|
||||
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
|
||||
echo "Setting Partition List"
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain
|
||||
|
||||
- name: Create Signed Package
|
||||
env:
|
||||
MACOS_INSTALLER_KEYCHAIN_PWD: ${{ secrets.MACOS_INSTALLER_KEYCHAIN_PWD }}
|
||||
MACOS_INSTALLER_SIGNING_IDENTITY_NAME: ${{ secrets.MACOS_CODESIGN_INSTALLER_IDENTITY_NAME }}
|
||||
MACOS_APPLICATION_SIGNING_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
|
||||
run: |
|
||||
security unlock-keychain -p $MACOS_INSTALLER_KEYCHAIN_PWD install.keychain
|
||||
echo "signing_identity_name: $MACOS_INSTALLER_SIGNING_IDENTITY_NAME" >> build/conda/installer/construct.yaml
|
||||
echo "notarization_identity_name: $MACOS_APPLICATION_SIGNING_IDENTITY" >> build/conda/installer/construct.yaml
|
||||
cd build/conda && constructor installer/. && cd ../../
|
||||
mv build/conda/OpenBB-Platform-MacOSX-arm64.pkg OpenBB-Platform-MacOSX-arm64.pkg
|
||||
shell: bash -l {0}
|
||||
|
||||
- name: Deleting Previous Keychain
|
||||
run: |
|
||||
echo "Deleting Previous Keychain to Clean Instance"
|
||||
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
|
||||
|
||||
- name: Clean up Build Artifacts
|
||||
run: |
|
||||
rm -rf build/conda/tmp
|
||||
|
||||
- name: Notarize DMG
|
||||
env:
|
||||
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
|
||||
NOTARIZE_APPLE_PWD: ${{ secrets.NOTARIZE_APPLE_PWD }}
|
||||
NOTARIZE_APPLE_TEAM_ID: ${{ secrets.NOTARIZE_APPLE_TEAM_ID }}
|
||||
run: |
|
||||
xcrun notarytool submit OpenBB-Platform-MacOSX-arm64.pkg --apple-id "$NOTARIZE_APPLE_ID" --password "$NOTARIZE_APPLE_PWD" --team-id "$NOTARIZE_APPLE_TEAM_ID" --wait
|
||||
|
||||
- name: Staple
|
||||
run: |
|
||||
xcrun stapler staple OpenBB-Platform-MacOSX-arm64.pkg
|
||||
|
||||
- name: Save Build Artifact PKG
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OpenBBM1.pkg
|
||||
path: OpenBB-Platform-MacOSX-arm64.pkg
|
||||
|
||||
- name: Clean up Build Artifacts
|
||||
run: |
|
||||
rm OpenBB-Platform-MacOSX-arm64.pkg
|
||||
|
||||
# Job to build the MacOS Intel version of the Terminal===================================
|
||||
Intel-MacOs-Build:
|
||||
name: Intel MacOS Build
|
||||
runs-on: [self-hosted, macos, x64]
|
||||
steps:
|
||||
# Checkout repository main branch. this allows for the commit hashes to line up
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Git Log
|
||||
run: git log
|
||||
# The following commands to clear previous PATHS and restore to defaults since we have to maintain the instance ourselves
|
||||
- name: Clean Previous Path
|
||||
run: |
|
||||
export PATH=""
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
echo $PATH
|
||||
# Set up caching for conda env so that the workflow runs quickly after the first time
|
||||
- name: Setup Conda Caching
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/conda_pkgs_dir
|
||||
key: conda-macos-3-10-${{ hashFiles('build/conda/environments/constructor.yml') }}
|
||||
# Set up miniconda using the environment yaml file within the repo
|
||||
- name: Setup Miniconda
|
||||
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||
with:
|
||||
miniconda-version: "latest"
|
||||
auto-update-conda: true
|
||||
channels: conda-forge,defaults
|
||||
show-channel-urls: true
|
||||
channel-priority: flexible
|
||||
environment-file: build/conda/environments/constructor.yml
|
||||
activate-environment: constructor
|
||||
auto-activate-base: false
|
||||
|
||||
- name: Creating Application Keychain
|
||||
env:
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }}
|
||||
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
|
||||
run:
|
||||
| # when pushing to main, make to generate new cert, and utilize secrets to store new password, and identity
|
||||
echo "Ensuring Keychain with same name does not exist"
|
||||
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
|
||||
echo "Decoding certificate"
|
||||
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
||||
echo "Creating Keychain"
|
||||
security create-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
|
||||
echo "Setting Default Keychain"
|
||||
security default-keychain -s build.keychain
|
||||
echo "Unlocking Keychain"
|
||||
security unlock-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
|
||||
echo "Importing Keychain"
|
||||
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
|
||||
echo "Setting Partition List"
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain
|
||||
|
||||
- name: Create Signed Package
|
||||
env:
|
||||
MACOS_INSTALLER_KEYCHAIN_PWD: ${{ secrets.MACOS_INSTALLER_KEYCHAIN_PWD }}
|
||||
MACOS_INSTALLER_SIGNING_IDENTITY_NAME: ${{ secrets.MACOS_CODESIGN_INSTALLER_IDENTITY_NAME }}
|
||||
MACOS_APPLICATION_SIGNING_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
|
||||
run: |
|
||||
security unlock-keychain -p $MACOS_INSTALLER_KEYCHAIN_PWD install.keychain
|
||||
echo "signing_identity_name: $MACOS_INSTALLER_SIGNING_IDENTITY_NAME" >> build/conda/installer/construct.yaml
|
||||
echo "notarization_identity_name: $MACOS_APPLICATION_SIGNING_IDENTITY" >> build/conda/installer/construct.yaml
|
||||
cd build/conda && constructor installer/. && cd ../../
|
||||
mv build/conda/OpenBB-Platform-MacOSX-x86_64.pkg OpenBB-Platform-MacOSX-x86_64.pkg
|
||||
shell: bash -l {0}
|
||||
|
||||
- name: Deleting Previous Keychain
|
||||
run: |
|
||||
echo "Deleting Previous Keychain to Clean Instance"
|
||||
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
|
||||
|
||||
- name: Clean up Build Artifacts
|
||||
run: |
|
||||
rm -rf build/conda/tmp
|
||||
|
||||
- name: Notarize DMG
|
||||
env:
|
||||
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
|
||||
NOTARIZE_APPLE_PWD: ${{ secrets.NOTARIZE_APPLE_PWD }}
|
||||
NOTARIZE_APPLE_TEAM_ID: ${{ secrets.NOTARIZE_APPLE_TEAM_ID }}
|
||||
run: |
|
||||
xcrun notarytool submit OpenBB-Platform-MacOSX-x86_64.pkg --apple-id "$NOTARIZE_APPLE_ID" --password "$NOTARIZE_APPLE_PWD" --team-id "$NOTARIZE_APPLE_TEAM_ID" --wait
|
||||
|
||||
- name: Staple
|
||||
run: |
|
||||
xcrun stapler staple OpenBB-Platform-MacOSX-x86_64.pkg
|
||||
|
||||
- name: Save Build Artifact PKG
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OpenBBIntel.pkg
|
||||
path: OpenBB-Platform-MacOSX-x86_64.pkg
|
||||
|
||||
- name: Clean up Build Artifacts
|
||||
run: |
|
||||
rm OpenBB-Platform-MacOSX-x86_64.pkg
|
||||
6
.gitignore
vendored
@@ -55,3 +55,9 @@ openbb_platform/openbb/package/*
|
||||
|
||||
# Dev Container env
|
||||
obb/*
|
||||
|
||||
# OpenBB Distribution
|
||||
!build/conda/installer/*.sh
|
||||
*.pkg
|
||||
*.exe
|
||||
build/conda/tmp
|
||||
|
||||
1
.pre-commit-config.yaml
vendored
@@ -3,6 +3,7 @@ repos:
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
exclude: 'construct.yaml'
|
||||
- id: end-of-file-fixer
|
||||
exclude_types: [css, markdown, text, svg]
|
||||
- id: trailing-whitespace
|
||||
|
||||
38
build/conda/README.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# OpenBB Platform Installer
|
||||
|
||||
The code in this folder creates a packaged installer for the OpenBB Platform, using Conda Constructor.
|
||||
|
||||
The installers can be created for Windows (.exe), MacOS (.pkg).
|
||||
|
||||
The installer is distributed with a Conda environment that contains Python and package management tools.
|
||||
|
||||
The dependencies required to run the application are installed from PyPI by the constructor's post_install script. They are installed by poetry and are defined in the `installer/assets/openbb_platform_installer/pyproject.toml` file.
|
||||
|
||||
The version of Python is defined in the `construct.yaml` file. It is set for 3.12.
|
||||
|
||||
## Build Instructions
|
||||
|
||||
**In order to build the installer, conda should be already installed and initialized your current shell profile.**
|
||||
|
||||
Navigate into the `build/conda` folder and then begin.
|
||||
|
||||
1. Create the Conda environment.
|
||||
- `conda env create --file environments/constructor.yml`
|
||||
2. Activate the environment.
|
||||
- `conda activate constructor`
|
||||
3. Build the installer.
|
||||
- `constructor installer/.`
|
||||
|
||||
## For when we have a full NSIS
|
||||
|
||||
To check nsis file - run
|
||||
|
||||
```batch
|
||||
miniconda3\envs\constructor\NSIS\makensis.exe /V2 assets\installer.nsi
|
||||
```
|
||||
|
||||
gives better output for errors
|
||||
|
||||
```batch
|
||||
miniconda3\envs\constructor\NSIS\makensis.exe /V4 assets\installer.nsi
|
||||
```
|
||||
10
build/conda/environments/constructor.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: constructor
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- conda-build
|
||||
- constructor>=3.9.3
|
||||
- six
|
||||
- urllib3
|
||||
- requests
|
||||
247
build/conda/installer/README.md
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
# OpenBB Platform
|
||||
|
||||
Thanks for installing the OpenBB Platform. To get the most out of your experience, we recommend reviewing the contents of this document.
|
||||
|
||||
If you have never used Python before, don't worry, your first time is just a double-click away. The sections below outline everything you need to know for getting started.
|
||||
|
||||
## What Did I Install?
|
||||
|
||||
This is a kitted out development container for Pythonic, open source, financial research. It has everything you need to get started immediately.
|
||||
|
||||
Included, is a complete installation of the OpenBB Platform and CLI, along with Conda and Jupyter Notebook, in an isolated Python 3.12 Conda environment.
|
||||
|
||||
If you already have an installation of Conda or Anaconda, the version in this folder will not rely on, interfere, or share base environment paths with, existing versions.
|
||||
|
||||
Tools for managing, updating, and building environments allow you to take full control of your installation, as well as quickly spin up new containers within this project folder.
|
||||
|
||||
Follow the quick start steps below to get started using right away; or, open one of the shortcuts described below.
|
||||
|
||||
If you want to build your own end points, connections, and features, try installing the [example extensions](#examples)
|
||||
|
||||
## OpenBB Terminal Pro Quick Start
|
||||
|
||||
- Login to the [OpenBB Hub](https://my.openbb.co)
|
||||
- Optionally, add API keys for remote authorization on the page [here](https://my.openbb.dev/app/platform/credentials).
|
||||
- If credentials have been added, from the sidebar, click on 'Personal Access Token'.
|
||||
- Generate a token and copy the value to the clipboard.
|
||||
- Optionally, from the sidebar, click on 'Widgets' to filter out any provider extensions or endpoints you wish to exclude.
|
||||
- Without filtering, there will be well over 300 individual widgets. This will narrow the field and focus on only what you need.
|
||||
- After configuring, download the file ("widget_settings.json") and save it to, `~/.openbb_platform`. The "Settings" shortcut takes you there.
|
||||
- Double-click on the `openbb-api` shortcut.
|
||||
- If you generated a personal access token, paste the values that were copied to the clipboard and hit the return key.
|
||||
- Enter y/n to persist the downloaded credentials on the local machine for future sessions.
|
||||
|
||||
- By default, the server will be running on: [http://127.0.0.1:6900](http://127.0.0.1:6900)
|
||||
|
||||
- Login to OpenBB Terminal Pro [here](https://pro.openbb.co)
|
||||
- From the sidebar, click on, "Data Connectors".
|
||||
- Then click on the button, "Add Data".
|
||||
- In the pop-up menu, select "Custom Backend".
|
||||
- Enter a name for the connection - i.e, "OpenBB Platform"
|
||||
- Enter the address the server is running on - i.e, "http://127.0.0.1:6900"
|
||||
- **Ensure that "Validate Widgets" is set to "No".**
|
||||
- Click on the "Test" button.
|
||||
- Finally, click on the "Add" button.
|
||||
|
||||
The OpenBB Platform API widgets can now be added to any dashboard. For a more detailed version of these instructions, see the documentation page [here](https://docs.openbb.co/pro/custom-backend)
|
||||
|
||||
## Shortcuts
|
||||
|
||||
At the root of the installation folder (where this document is) are shortcuts for launchers and to key file locations.
|
||||
|
||||
- Bash (Windows: CMD): Opens a command line shell with the base Conda environment activated. Activate the OpenBB environment with:
|
||||
- Mac/Linux: `source activate obb`
|
||||
- Windows: `conda activate obb`
|
||||
- Environments: Shortcut to the root "envs" folder, where the `obb` and any created environments are stored.
|
||||
- "widgets.json" is located in the "assets" subdirectory.
|
||||
- openbb-api: Opens a Terminal window and launches the OpenBB API, with optional prompts to login with your OpenBB Hub PAT.
|
||||
- openbb-cli: Opens a Terminal window and launches the OpenBB CLI (formerly OpenBB Terminal).
|
||||
- openbb-ipython: Opens a Terminal window and starts an IPython session with the OpenBB Platform package imported.
|
||||
- openbb-notebook: Opens a Terminal window, starts the Jupyter development server, and opens a browser window with the Notebook application.
|
||||
- OpenBBUserData: Shortcut to the OpenBBUserData folder. Files exported from CLI are saved here.
|
||||
- Settings: Shortcut to the `~/.openbb_platform` location where `.env` files and `user_settings.json` are stored.
|
||||
- If you cannot see the ".env" file, set Finder/Explorer to display hidden/system files.
|
||||
- Update: Opens a Terminal window and updates the OpenBB Platform environment (obb) and packages.
|
||||
|
||||
## Command Line Entry Points
|
||||
|
||||
There are several command line entry points available when either:
|
||||
- The OpenBB Platform environment (obb) is active.
|
||||
- The "openbb_platform_installer" package has been installed in the active Python environment.
|
||||
|
||||
### OpenBB Entry Points
|
||||
|
||||
- openbb: Launches the OpenBB CLI.
|
||||
- openbb-api: Launches the API and accepts select arguments.
|
||||
- All args/kwargs available to `uvicorn run` are exposed.
|
||||
- `--login`: True/False. Defeats the login prompt when False.
|
||||
- `--no-build`: Skips building "widgets.json"
|
||||
- openbb-build: Runs the build script that generates the static assets for the OpenBB Python interface.
|
||||
- Run this after installing/uninstalling/updating OpenBB extensions
|
||||
- Automatically run when `openbb-update` is run.
|
||||
- openbb-update: Updates the environment packages defined in `pyproject.toml` and `poetry.lock` and rebuilds the OpenBB Python interface.
|
||||
- Location of Poetry files: "/extensions/openbb_platform_installer"
|
||||
- Passes all args/kwargs to `poetry install`.
|
||||
|
||||
### Starting The OpenBB Platform API With Optional Arguments
|
||||
|
||||
1. Open the `Bash` (`CMD` on Windows) shortcut.
|
||||
2. Activate the `obb` environment
|
||||
- Unix: `source activate obb`
|
||||
- Windows: `conda activate obb`
|
||||
3. Run `openbb-api` with `--parameter value` to add any `uvicorn.run` parameter.
|
||||
|
||||
### OpenBB Platform API Over HTTPS
|
||||
|
||||
To run the API over the HTTPS protocol, you must first create a self-signed certificate and the associated key. After steps 1 & 2 above, you can generate the files by entering this to the command line:
|
||||
|
||||
```sh
|
||||
openssl req -x509 -days 3650 -out localhost.crt -keyout localhost.key -newkey rsa:4096 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <( \
|
||||
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
|
||||
```
|
||||
|
||||
Two files will be created, in the current working directory, that are passed as keyword arguments to the `openbb-api` entry point.
|
||||
|
||||
```sh
|
||||
openbb-api --ssl_keyfile localhost.key --ssl_certfile localhost.crt
|
||||
```
|
||||
|
||||
**Note**: Adjust the command to include the full path to the file if the current working directory is not where they are located.
|
||||
|
||||
|
||||
The certificate - `localhost.crt` - will need to be added to system's trust store. The process for this will depend on the operating system and the user account privilege.
|
||||
|
||||
A quick solution is to visit the server's URL, show the details of the warning, and choose to continue anyways.
|
||||
|
||||
Contact the system administrator if you are using a work device and require additional permissions to complete the configuration.
|
||||
|
||||

|
||||
|
||||
## Installed Folder Structure
|
||||
|
||||
At the root of the installation (where this document is), there will be three folders:
|
||||
|
||||
- conda (Windows: This is named after the last folder path if the default was not used)
|
||||
- extensions
|
||||
- notebooks
|
||||
|
||||
### Conda
|
||||
|
||||
This is the folder where Conda is installed and all environment data (site-packages, etc.) is stored. The "Environments" shortcuts takes you to the root of the "envs" folder.
|
||||
|
||||
### Extensions
|
||||
|
||||
This folder contains two subfolders:
|
||||
|
||||
### Notebooks
|
||||
|
||||
This folder contains tutorial notebooks with examples for getting started with Python and the OpenBB Platform. They can be opened by launching the `openbb-notebook` shortcut.
|
||||
|
||||
#### examples
|
||||
|
||||
Contains empty example extensions for the three types of OpenBB Platform extensions:
|
||||
|
||||
- Router
|
||||
- Provider
|
||||
- OBBject
|
||||
|
||||
To install all three examples in the OpenBB Platform environment, open the Bash/CMD shortcut and enter:
|
||||
|
||||
```console
|
||||
source activate obb # CMD: conda activate obb
|
||||
cd extensions/examples
|
||||
python install_examples.py
|
||||
```
|
||||
|
||||
#### openbb_platform_installer
|
||||
|
||||
This is a meta package for installing and managing OpenBB Platform installation within any Python environment.
|
||||
Poetry is used to update and resolve any dependencies that are defined in the `pyproject.toml` file.
|
||||
|
||||
The `poetry.lock` file is updated every time the `Update` shortcut is run.
|
||||
|
||||
There are several configurations available, via combinations of `--with`, `--without`, and `--only` parameters, when running `poetry install`.
|
||||
|
||||
Choices are:
|
||||
|
||||
- main
|
||||
- openbb-all
|
||||
- cli
|
||||
- notebook
|
||||
|
||||
Each parameter will accept multiple items, but `--without` takes priority for solving for the environment.
|
||||
|
||||
## Uninstallation
|
||||
|
||||
Mac/Linux users can uninstall by deleting the folder, while Windows users can run the Uninstall shortcut.
|
||||
|
||||
The leftover artifacts will include:
|
||||
|
||||
- Global configuration files stored by Poetry, PIP, Conda, and Jupyter.
|
||||
- Third-party Python package caches and `.env` files.
|
||||
- Folders:
|
||||
- ~/.openbb_platform
|
||||
- ~/OpenBBUserData
|
||||
|
||||
Windows users will also need to remove the parent folder where it was originally installed, after running Uninstall.
|
||||
|
||||
Your OpenBB Hub account can be deleted, along with all associated data, from the Account page in [my.openbb.co](https://my.openbb.co)
|
||||
|
||||
## Additional Information
|
||||
|
||||
### Conda Install vs. PIP Install vs. Poetry Install
|
||||
|
||||
The three ways to install packages may appear to accomplish the same objectives - installing Python packages - but each has a distinctly different purpose.
|
||||
|
||||
An easy way to think about the difference is, both `pip` and `poetry` require an existing Python installation; `conda` installs Python so that you can run `pip install poetry`.
|
||||
|
||||
In general, you use:
|
||||
|
||||
- `conda`
|
||||
- When a new environment has been created. Packages here can be included in the creation command, `conda create`.
|
||||
- When the specific package is only distributed through Conda or the `conda-forge` channel.
|
||||
- When changing the version of Python used within the environment.
|
||||
- For interactions with the machine code layer of the system - e.g., compilers, and bridges to "outside of Python" land.
|
||||
- `pip`
|
||||
- When installing/uninstalling packages to the activated Python environment.
|
||||
- Resort to `conda install` when packages fail to install, or wheels cannot be built, from PyPI.
|
||||
- `poetry`
|
||||
- Installing a local Python package.
|
||||
- Syncing all package dependencies according to provided specs in `pyproject.toml` and `poetry.lock` files.
|
||||
- Building and distributing Python packages.
|
||||
|
||||
Conda is for container management and machine code level operations, Poetry resolves the project's dependencies and provides build/distribution tools within the current Python environment, while `pip` is for installing Python packages - typically from [PyPI](https://pypi.org).
|
||||
|
||||
### Documentation Resources
|
||||
|
||||
### OpenBB
|
||||
- [OpenBB Pro](https://docs.openbb.co/pro)
|
||||
- [OpenBB Pro Data Connectors](https://docs.openbb.co/pro/data-connector)
|
||||
- [widgets.json](https://docs.openbb.co/pro/custom-backend/widgets.json)
|
||||
- [OpenBB Platform](https://docs.openbb.co/platform)
|
||||
- [OpenBB Platform Quckstart](https://docs.openbb.co/platform/getting_started/quickstart)
|
||||
- [OpenBB CLI](https://docs.openbb.co/cli)
|
||||
- [OpenBB User Settings](https://docs.openbb.co/platform/user_guides/settings_and_environment_variables)
|
||||
- [API Keys and Authorization](https://docs.openbb.co/platform/getting_started/api_keys)
|
||||
- [REST API Requests](https://docs.openbb.co/platform/getting_started/api_requests)
|
||||
- [OpenBB Platform Architecture Overview](https://docs.openbb.co/platform/developer_guide/architecture_overview)
|
||||
- [Create A New Router Extension](https://docs.openbb.co/platform/getting_started/create_new_router_extension)
|
||||
- [OpenBB Charting](https://github.com/OpenBB-finance/OpenBB/tree/develop/openbb_platform/obbject_extensions/charting#readme)
|
||||
- [PyWry](https://github.com/OpenBB-finance/pywry)
|
||||
|
||||
### External
|
||||
|
||||
- [python](https://docs.python.org/3/)
|
||||
- [conda create](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#managing-environments)
|
||||
- [pyproject.toml](https://python-poetry.org/docs/pyproject/)
|
||||
- [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/)
|
||||
- [pip](https://pip.pypa.io/en/stable/)
|
||||
- [poetry config](https://python-poetry.org/docs/configuration)
|
||||
- [pydantic](https://docs.pydantic.dev/latest/)
|
||||
- [uvicorn](https://www.uvicorn.org/)
|
||||
- [fastapi](https://fastapi.tiangolo.com/)
|
||||
- [jupyter](https://docs.jupyter.org/en/latest/)
|
||||
- [pandas](https://pandas.pydata.org/docs/)
|
||||
- [numpy](https://numpy.org/doc/)
|
||||
- [Plotly Graph Objects](https://plotly.com/python/graph-objects/)
|
||||
|
||||
BIN
build/conda/installer/assets/Installer_horizontal.bmp
vendored
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
build/conda/installer/assets/Installer_horizontal2.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
build/conda/installer/assets/Installer_vertical2.bmp
vendored
Normal file
|
After Width: | Height: | Size: 349 KiB |
70
build/conda/installer/assets/create_shortcut.vbs
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
Set objShell = CreateObject("WScript.Shell")
|
||||
sdesktopPath = objShell.SpecialFolders("Desktop")
|
||||
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
prefixPath = objShell.ExpandEnvironmentStrings("%PREFIX%")
|
||||
userProfilePath = objShell.ExpandEnvironmentStrings("%USERPROFILE%")
|
||||
currentPath = fso.GetAbsolutePathName(prefixPath)
|
||||
parentFolder = fso.GetParentFolderName(currentPath)
|
||||
shortcutFolder = parentFolder
|
||||
|
||||
Set objFSO = CreateObject("Scripting.FileSystemObject")
|
||||
If Not objFSO.FolderExists(shortcutFolder) Then
|
||||
objFSO.CreateFolder(shortcutFolder)
|
||||
End If
|
||||
|
||||
If prefixPath = "%PREFIX%" Or userProfilePath = "%USERPROFILE%" Then
|
||||
WScript.Echo "Environment variables %PREFIX% or %USERPROFILE% are not set correctly."
|
||||
WScript.Quit 1
|
||||
End If
|
||||
|
||||
Sub CreateShortcut(name, targetPath, iconPath)
|
||||
Set objShell = CreateObject("WScript.Shell")
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\" & name & ".lnk")
|
||||
objShortcut.TargetPath = objShell.ExpandEnvironmentStrings(targetPath)
|
||||
objShortcut.IconLocation = objShell.ExpandEnvironmentStrings(iconPath)
|
||||
objShortcut.Description = name
|
||||
objShortcut.Save
|
||||
End Sub
|
||||
|
||||
CreateShortcut "openbb-cli", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "openbb-api", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "openbb-notebook", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "openbb-ipython", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "Update", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "CMD", "C:\Windows\System32\cmd.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "Environments", prefixPath & "\envs", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "Settings", userProfilePath & "\.openbb_platform", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "OpenBBUserData", userProfilePath & "\OpenBBUserData", prefixPath & "\assets\openbb_icon.ico"
|
||||
CreateShortcut "Uninstall", prefixPath & "\Uninstall-OpenBB.exe", prefixPath & "\assets\openbb_icon.ico"
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\openbb-notebook.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate " & prefixPath & "\envs\obb && cd " & shortcutFolder & " && jupyter-notebook && exit"
|
||||
objShortcut.WorkingDirectory = shortcutFolder
|
||||
objShortcut.Save
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\openbb-ipython.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate " & prefixPath & "\envs\obb && ipython -c ""from openbb import obb;obb"" -i"
|
||||
objShortcut.WorkingDirectory = prefixPath
|
||||
objShortcut.Save
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\openbb-api.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate " & prefixPath & "\envs\obb && call openbb-api --login && exit"
|
||||
objShortcut.WorkingDirectory = prefixPath
|
||||
objShortcut.Save
|
||||
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\Update.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate " & prefixPath & "\envs\obb && call openbb-update && exit"
|
||||
objShortcut.WorkingDirectory = prefixPath
|
||||
objShortcut.Save
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\CMD.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate base && echo Conda base environment is active. Use this shell to create new environments. && echo To activate the OpenBB environment, run 'conda activate obb'."
|
||||
objShortcut.WorkingDirectory = shortcutFolder
|
||||
objShortcut.Save
|
||||
|
||||
Set objShortcut = objShell.CreateShortcut(shortcutFolder & "\openbb-cli.lnk")
|
||||
objShortcut.Arguments = "/k PATH " & prefixPath & ";" & prefixPath & "\Scripts;" & prefixPath & "\Library\bin;%PATH% && activate " & prefixPath & "\envs\obb && call openbb && exit"
|
||||
objShortcut.WorkingDirectory = prefixPath
|
||||
objShortcut.Save
|
||||
86
build/conda/installer/assets/custom_conclusion.nsi
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
|
||||
|
||||
Page Custom muiExtraPages_Create
|
||||
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
var IntroText
|
||||
var InstallationLink
|
||||
var ExampleImg
|
||||
var ExampleImgCtl
|
||||
var PARENTDIR
|
||||
|
||||
Function muiExtraPages_Create
|
||||
Push $0
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT_PAGE \
|
||||
"${PRODUCT_NAME}" \
|
||||
"Installation Successfully Complete"
|
||||
|
||||
${GetParent} "$INSTDIR" $PARENTDIR
|
||||
|
||||
nsDialogs::Create /NOUNLOAD 1018
|
||||
${NSD_CreateLabel} 10u 10u 280u 40u "Click the link below to open the installation folder:"
|
||||
Pop $IntroText
|
||||
|
||||
${NSD_CreateLink} 10u 55u 200u 10u $PARENTDIR
|
||||
Pop $InstallationLink
|
||||
${NSD_OnClick} $InstallationLink LaunchLinkOne
|
||||
|
||||
nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP}|${SS_REALSIZECONTROL} 0 10u 90u 280u 40u ""
|
||||
Pop $ExampleImgCtl
|
||||
StrCpy $0 $PLUGINSDIR\openbb_win.png
|
||||
System::Call 'user32::LoadImage(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}|${LR_LOADTRANSPARENT}|${LR_LOADMAP3DCOLORS}) i.s'
|
||||
Pop $ExampleImg
|
||||
SendMessage $ExampleImgCtl ${STM_SETIMAGE} ${IMAGE_BITMAP} $ExampleImg
|
||||
|
||||
nsDialogs::Show
|
||||
|
||||
System::Call 'gdi32:DeleteObject(i $ExampleImg)'
|
||||
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
!define MUI_FINISHPAGE_TEXT "Select a resource to open.$\r$\n$\r$\n"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "OpenBB Platform Documentation"
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLinkTwo"
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFinishShow
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE MyFinishLeave
|
||||
|
||||
var CheckboxLinkThree
|
||||
var CheckboxLinkFour
|
||||
|
||||
Function LaunchLinkOne
|
||||
ExecShell "open" "$PARENTDIR"
|
||||
FunctionEnd
|
||||
|
||||
Function LaunchLinkTwo
|
||||
ExecShell "open" "https://docs.openbb.co/platform"
|
||||
FunctionEnd
|
||||
|
||||
Function MyFinishShow
|
||||
${NSD_CreateCheckbox} 120u 110u 100% 10u "OpenBB CLI Documentation"
|
||||
Pop $CheckboxLinkThree
|
||||
${NSD_Check} $CheckboxLinkThree
|
||||
SetCtlColors $CheckboxLinkThree "" "ffffff"
|
||||
|
||||
${NSD_CreateCheckbox} 120u 130u 100% 10u "OpenBB Pro Documentation"
|
||||
Pop $CheckboxLinkFour
|
||||
${NSD_Check} $CheckboxLinkFour
|
||||
SetCtlColors $CheckboxLinkFour "" "ffffff"
|
||||
FunctionEnd
|
||||
|
||||
Function MyFinishLeave
|
||||
${NSD_GetState} $CheckboxLinkThree $0
|
||||
${If} $0 <> 0
|
||||
ExecShell "open" "https://docs.openbb.co/cli"
|
||||
${EndIf}
|
||||
|
||||
${NSD_GetState} $CheckboxLinkFour $0
|
||||
${If} $0 <> 0
|
||||
ExecShell "open" "https://docs.openbb.co/pro"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
41
build/conda/installer/assets/custom_welcome.nsi
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# Below is an example of creating multiple pages after the welcome page of the installer.
|
||||
#
|
||||
# This file contains code that is inserted where the @CUSTOM_WELCOME_FILE@ is located
|
||||
# in the main.nsi.tmpl. The main mechanism for extra pages occurs with the
|
||||
# "Page Custom muiExtraPagesAfterWelcome_Create" line, which
|
||||
# references the function "muiExtraPagesAfterWelcome_Create" for page creation.
|
||||
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipPageIfUACInnerInstance
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
Page Custom muiExtraPagesAfterWelcome_Create
|
||||
|
||||
var IntroAfterWelcomeText
|
||||
var InstallationAfterWelcomeLink
|
||||
var ExampleAfterWelcomeImg
|
||||
var ExampleImgAfterWelcomeCtl
|
||||
|
||||
Function muiExtraPagesAfterWelcome_Create
|
||||
Push $0
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT_PAGE \
|
||||
"${PRODUCT_NAME}" \
|
||||
"Welcome to OpenBB Platform Installer"
|
||||
|
||||
nsDialogs::Create /NOUNLOAD 1018
|
||||
${NSD_CreateLabel} 10u 10u 280u 120u "Welcome to the OpenBB Platform Installer.$\r$\n$\r$\nThis application will install the latest version of the OpenBB Platform on your computer as a self-contained, Python 3.12, Conda environment.$\r$\n$\r$\nIn order to install you need access to the Internet.$\r$\n$\r$\nInstallation requires between 1-2 GB of storage space, with a minimum of 4GB RAM.$\r$\n$\r$\nWhen a non-default installation path is chosen, it requires a depth of two - i.e, User/MyUserAccount/OpenBB/conda, where OpenBB is the target folder, and conda is the name of the folder where Conda and the installed environments live. The path, including username, should not contain any spaces."
|
||||
Pop $IntroAfterWelcomeText
|
||||
|
||||
nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP}|${SS_REALSIZECONTROL} 0 10u 90u 280u 40u ""
|
||||
Pop $ExampleImgAfterWelcomeCtl
|
||||
StrCpy $0 $PLUGINSDIR\openbb_win.png
|
||||
System::Call 'user32::LoadImage(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}|${LR_LOADTRANSPARENT}|${LR_LOADMAP3DCOLORS}) i.s'
|
||||
Pop $ExampleAfterWelcomeImg
|
||||
SendMessage $ExampleImgAfterWelcomeCtl ${STM_SETIMAGE} ${IMAGE_BITMAP} $ExampleAfterWelcomeImg
|
||||
|
||||
nsDialogs::Show
|
||||
|
||||
System::Call 'gdi32:DeleteObject(i $ExampleAfterWelcomeImg)'
|
||||
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
BIN
build/conda/installer/assets/dmg_volume.icns
vendored
Normal file
40
build/conda/installer/assets/examples/README.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Example Extension Templates
|
||||
|
||||
The extensions in this folder represent starting points for creating your own OpenBB extensions. The types of extensions that can be created are:
|
||||
|
||||
- Router
|
||||
- Create a new router path and define the functions for the app.
|
||||
- Provider
|
||||
- Add a new data provider source.
|
||||
- OBBject
|
||||
- Extend the response object returned by every command.
|
||||
|
||||
## Installation
|
||||
|
||||
### All Examples
|
||||
|
||||
To install all example extensions, activate the environment, then run:
|
||||
|
||||
```sh
|
||||
python install_examples.py
|
||||
```
|
||||
|
||||
### Individual Example
|
||||
|
||||
To install an individual extension to the existing OpenBB environment, activate it, then navigate into the folder of the desired extension and enter:
|
||||
|
||||
```sh
|
||||
poetry install --only-root
|
||||
```
|
||||
|
||||
Then, rebuild the OpenBB Python interface with:
|
||||
|
||||
```sh
|
||||
openbb-build
|
||||
```
|
||||
|
||||
The new extension(s) will be available by importing the OpenBB package.
|
||||
|
||||
```python
|
||||
from openbb import obb
|
||||
```
|
||||
9
build/conda/installer/assets/examples/empty_obbject/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Empty OBBject Extension
|
||||
|
||||
This is an empty OpenBB Platform OBBJECT (Response Object) Extension.
|
||||
|
||||
Install this extension locally with:
|
||||
|
||||
```console
|
||||
poetry install --only-root
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
"""Empty OBBject extension."""
|
||||
|
||||
import warnings
|
||||
|
||||
from openbb_core.app.model.extension import Extension
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
|
||||
warnings.filterwarnings(
|
||||
"ignore", lineno=0
|
||||
) # This suppresses a warning you might see with IPython and OBBject Extensions on import and initialize.
|
||||
|
||||
ext = Extension(name="empty")
|
||||
|
||||
# OBBject Accessors are used to extend the functionality of the OBBject class.
|
||||
# The name given to the Extension creates a new namespace in every output object of the Router.
|
||||
# This is useful for formatting/processing the output of the function calls, where universal application is desired.
|
||||
|
||||
|
||||
@ext.obbject_accessor
|
||||
class Empty:
|
||||
"""An Empty OBBject extension."""
|
||||
|
||||
def __init__(self, obbject):
|
||||
"""Creates an instance of the Empty OBBject extension."""
|
||||
self._obbject: OBBject = obbject
|
||||
|
||||
@staticmethod
|
||||
def hello():
|
||||
"""Print a greeting message."""
|
||||
print("Hello from the Empty OBBject extension!") # noqa: T201
|
||||
19
build/conda/installer/assets/examples/empty_obbject/pyproject.toml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
[tool.poetry]
|
||||
name = "empty-obbject"
|
||||
version = "0.0.1"
|
||||
description = "An empty OBBject extension"
|
||||
authors = ["OpenBB Team <hello@openbb.co>"]
|
||||
readme = "README.md"
|
||||
packages = [{ include = "empty_obbject" }]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9,<3.13"
|
||||
openbb-core = "^1"
|
||||
openbb-platform-api = "^1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.plugins."openbb_obbject_extension"]
|
||||
empty = "empty_obbject:ext"
|
||||
9
build/conda/installer/assets/examples/empty_provider/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Empty Provider Extension
|
||||
|
||||
This is an empty OpenBB Platform Provider Extension.
|
||||
|
||||
Install this extension locally with:
|
||||
|
||||
```console
|
||||
poetry install --only-root
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
"""Empty Provider Module."""
|
||||
|
||||
# Import the fetchers from each model.
|
||||
from openbb_core.provider.abstract.provider import Provider
|
||||
|
||||
from empty_provider.models.empty_model import EmptyFetcher
|
||||
|
||||
empty_provider = Provider(
|
||||
name="empty",
|
||||
website="http://empty.io",
|
||||
description="""The empty provider is a supplier of promises.""",
|
||||
# credentials=["api_key"], # Credentials added here are mapped to `user_settings.json` in the `credentials` key.
|
||||
fetcher_dict={
|
||||
"Empty": EmptyFetcher # The key is the name of the model defined in the @router decorator.
|
||||
},
|
||||
)
|
||||
|
||||
# Every provider follows this same pattern, so it is possible to import the fetchers from other providers
|
||||
# and map them to the fetcher_dict above.
|
||||
# from openbb_yfinance import yfinance_provider
|
||||
# yfinance_fetchers = yfinance_provider.fetcher_dict.copy()
|
||||
@@ -0,0 +1 @@
|
||||
"""Empty Provider Models."""
|
||||
@@ -0,0 +1,93 @@
|
||||
"""Empty Fetcher Model. This model is used in conjunction with the 'empty_router' extension."""
|
||||
|
||||
# pylint: disable=unused-import
|
||||
# flake8: noqa: F401
|
||||
|
||||
from datetime import (
|
||||
date as dateType,
|
||||
datetime,
|
||||
)
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from openbb_core.provider.abstract.data import Data
|
||||
from openbb_core.provider.abstract.fetcher import Fetcher
|
||||
from openbb_core.provider.abstract.query_params import QueryParams
|
||||
from pydantic import Field
|
||||
|
||||
|
||||
class EmptyQueryParams(QueryParams):
|
||||
"""Empty Query Params"""
|
||||
|
||||
some_param: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Some param",
|
||||
)
|
||||
|
||||
|
||||
class EmptyData(Data):
|
||||
"""Empty Data"""
|
||||
|
||||
date: Optional[dateType] = Field(
|
||||
default=None,
|
||||
description="Date of the data.",
|
||||
)
|
||||
title: Optional[str] = Field(
|
||||
default=None,
|
||||
description="Title of the data.",
|
||||
)
|
||||
|
||||
|
||||
class EmptyFetcher(
|
||||
Fetcher[
|
||||
EmptyQueryParams,
|
||||
EmptyData, # Change the Typing when returning a list of models - i.e, records.
|
||||
]
|
||||
):
|
||||
"""Empty Fetcher."""
|
||||
|
||||
@staticmethod
|
||||
def transform_query(params: Dict[str, Any]) -> EmptyQueryParams:
|
||||
"""Transform query params."""
|
||||
transformed_params = params.copy()
|
||||
# if transformed_params.get("some_param"):
|
||||
# do something
|
||||
#
|
||||
# This is where you can set default values for query parameters.
|
||||
# Essentially, `@model_validate(mode='before')`.
|
||||
return EmptyQueryParams(**transformed_params)
|
||||
|
||||
@staticmethod
|
||||
async def aextract_data(
|
||||
query: EmptyQueryParams,
|
||||
credentials: Optional[Dict[str, str]],
|
||||
**kwargs: Any,
|
||||
) -> Dict: # Typing here should match the 'data' input of 'transform_data'.
|
||||
"""Extract data."""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
# from openbb_core.provider.utils.helpers import (
|
||||
# make_request,
|
||||
# amake_request,
|
||||
# amake_requests,
|
||||
# get_querystring,
|
||||
# ) Use these to make HTTP requests.
|
||||
|
||||
# We import here so that items are imported on execution, not on initialization.
|
||||
# Critical for modules that introduce a heavy load on the system.
|
||||
# Generally, any module required for data retrieval and parsing should be 'lazy' imported.
|
||||
# This is to ensure that the module is only imported when needed.
|
||||
|
||||
print(query.some_param) # noqa: T201
|
||||
results = {
|
||||
"date": datetime.now().date(),
|
||||
"title": "Hello from the Empty Provider extension!",
|
||||
}
|
||||
return results
|
||||
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
query: EmptyQueryParams,
|
||||
data: Dict, # Typing here matches the output of '(a)extract_data'.
|
||||
**kwargs: Any,
|
||||
) -> EmptyData: # Typing here matches the Fetcher's definition.
|
||||
"""Transform data."""
|
||||
return EmptyData.model_validate(data)
|
||||
@@ -0,0 +1 @@
|
||||
"""Utilities and Helpers."""
|
||||
20
build/conda/installer/assets/examples/empty_provider/pyproject.toml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
[tool.poetry]
|
||||
name = "empty-provider"
|
||||
version = "0.0.1"
|
||||
description = "Empty provider extension for OpenBB"
|
||||
authors = ["OpenBB Team <hello@openbb.co>"]
|
||||
readme = "README.md"
|
||||
packages = [{ include = "empty_provider" }]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9,<3.13"
|
||||
openbb-core = "^1"
|
||||
openbb-platform-api = "^1"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.plugins."openbb_provider_extension"]
|
||||
empty = "empty_provider:empty_provider"
|
||||
9
build/conda/installer/assets/examples/empty_router/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Empty Router Extension
|
||||
|
||||
This is an empty OpenBB Platform Router Extension.
|
||||
|
||||
Install this extension locally with:
|
||||
|
||||
```console
|
||||
poetry install --only-root
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
"""An Empty OpenBB Router extension."""
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Empty Router Extenision for OpenBB Platform."""
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.example import APIEx, PythonEx
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
StandardParams,
|
||||
)
|
||||
from openbb_core.app.query import Query
|
||||
from openbb_core.app.router import Router
|
||||
from openbb_core.provider.abstract.data import Data
|
||||
|
||||
router = Router(prefix="", description="An Empty OpenBB Router Extension.")
|
||||
|
||||
# The first function call will take longer than the rest, as modules are loaded on the first call.
|
||||
|
||||
# Note that all routers must return an instance of `OBBject`, where the output is the `results` attribute.
|
||||
|
||||
|
||||
# This is a standard router "get" command.
|
||||
@router.command(
|
||||
methods=["GET"],
|
||||
examples=[
|
||||
PythonEx(
|
||||
description="Say Hello.",
|
||||
code=[
|
||||
"result = obb.empty.hello()",
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
async def hello() -> (
|
||||
OBBject[dict]
|
||||
): # The output of every router command must be an instance of `OBBject`.
|
||||
"""OpenBB Hello World."""
|
||||
return OBBject(
|
||||
results={
|
||||
datetime.now().strftime(
|
||||
"%Y-%m-%d"
|
||||
): "Hello from the Empty Router extension!"
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
# This uses the Provider Interface to call the empty provider fetcher.
|
||||
@router.command(
|
||||
model="Empty",
|
||||
examples=[
|
||||
APIEx(parameters={"provider": "empty"}),
|
||||
PythonEx(
|
||||
description="Say Hello.",
|
||||
code=[
|
||||
"result = obb.empty.empty_function()",
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
async def empty_function(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> OBBject[Data]:
|
||||
"""An empty function using the Provider Interface."""
|
||||
return await OBBject.from_query(Query(**locals()))
|
||||
@@ -0,0 +1,29 @@
|
||||
"""Views for the Empty Extension."""
|
||||
|
||||
# pylint: disable=unused-import
|
||||
# flake8: noqa: F401
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Dict, Tuple
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from openbb_charting.core.openbb_figure import OpenBBFigure
|
||||
|
||||
# If `openbb-charting` was installed, this will be used to create a chart.
|
||||
# Process the data by accessing, "kwargs["obbject_item"]", the function results.
|
||||
# The return is a Tuple of the OpenBBFigure and a Dict of the data, so it can be
|
||||
# returned to the Fast API endpoint. Use `fig.to_plotly_json()` to convert the
|
||||
# OpenBBFigure to a JSON serializable object.
|
||||
|
||||
|
||||
class EmptyViews:
|
||||
"""Empty Views."""
|
||||
|
||||
# @staticmethod
|
||||
# def empty_hello( # noqa: PLR0912
|
||||
# **kwargs,
|
||||
# ) -> Tuple["OpenBBFigure", Dict[str, Any]]:
|
||||
# """Get Derivatives Price Historical Chart."""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
# from openbb_charting.charts.price_historical import price_historical
|
||||
|
||||
# return price_historical(**kwargs)
|
||||
19
build/conda/installer/assets/examples/empty_router/pyproject.toml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
[tool.poetry]
|
||||
name = "empty-router"
|
||||
version = "0.0.1"
|
||||
description = "An empty OpenBB Router extension"
|
||||
authors = ["OpenBB Team <hello@openbb.co>"]
|
||||
readme = "README.md"
|
||||
packages = [{ include = "empty_router" }]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9,<3.13"
|
||||
openbb-core = "^1"
|
||||
openbb-platform-api = "^1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.plugins."openbb_core_extension"]
|
||||
empty = "empty_router.empty_router:router"
|
||||
48
build/conda/installer/assets/examples/install_examples.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Script to install the example extensions in develop mode to the current Python environment."""
|
||||
|
||||
|
||||
def main():
|
||||
"""Run the setup script."""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
import openbb # noqa: F401 # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
subprocess.check_call("openbb-build", shell=True) # noqa: S602, S607
|
||||
|
||||
base_dir = Path(__file__).parent
|
||||
|
||||
directories = [
|
||||
os.path.join(base_dir, d)
|
||||
for d in os.listdir(base_dir)
|
||||
if os.path.isdir(os.path.join(base_dir, d))
|
||||
and glob.glob(os.path.join(base_dir, d, "*.toml"))
|
||||
]
|
||||
|
||||
for directory in directories:
|
||||
subprocess.check_call(
|
||||
[ # noqa: S603
|
||||
os.sys.executable,
|
||||
"-m",
|
||||
"poetry",
|
||||
"install",
|
||||
"-C",
|
||||
directory,
|
||||
"--only-root",
|
||||
]
|
||||
)
|
||||
|
||||
subprocess.check_call("openbb-build", shell=True) # noqa: S602, S607
|
||||
|
||||
print( # noqa: T201
|
||||
"\nExample extensions have been installed and are ready-to-use."
|
||||
"\nTo connect the examples to OpenBB Pro and edit the code live, run: openbb-api --reload\n"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
3848
build/conda/installer/assets/examples/python_basics.ipynb
vendored
Normal file
BIN
build/conda/installer/assets/header_win.png
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
264
build/conda/installer/assets/installer.nsi
vendored
Normal file
@@ -0,0 +1,264 @@
|
||||
;--------------------------------
|
||||
; Includes
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include "logiclib.nsh"
|
||||
|
||||
|
||||
#if enable_debugging is True
|
||||
# Special logging build needed for ENABLE_LOGGING
|
||||
# See https://nsis.sourceforge.io/Special_Builds
|
||||
!define ENABLE_LOGGING=True
|
||||
#endif
|
||||
|
||||
# Comes from https://nsis.sourceforge.io/Logging:Enable_Logs_Quickly
|
||||
!define LogSet "!insertmacro LogSetMacro"
|
||||
!macro LogSetMacro SETTING
|
||||
!ifdef ENABLE_LOGGING
|
||||
LogSet ${SETTING}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!define LogText "!insertmacro LogTextMacro"
|
||||
!macro LogTextMacro INPUT_TEXT
|
||||
!ifdef ENABLE_LOGGING
|
||||
LogText ${INPUT_TEXT}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
; Custom defines
|
||||
!define NAME "OpenBB Platform"
|
||||
!define COMPANY "OpenBB"
|
||||
!define VERSION "1.0.0"
|
||||
!define SLUG "${NAME} v${VERSION}"
|
||||
|
||||
;--------------------------------
|
||||
; General
|
||||
Name "${NAME}"
|
||||
InstallDir "${PROFILE}\OpenBB"
|
||||
RequestExecutionLevel user
|
||||
|
||||
;--------------------------------
|
||||
; UI
|
||||
|
||||
!define MUI_ICON "assets\openbb_icon.ico"
|
||||
!define MUI_UNICON "assets\openbb_icon.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "assets\installer_vertical2.bmp"
|
||||
!define MUI_HEADERIMAGE_BITMAP "assets\installer_horizontal.bmp"
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_WELCOMEPAGE_TITLE "${SLUG} Setup"
|
||||
!define UninstId "OpenBBPlatform" ; You might want to use a GUID here
|
||||
|
||||
;--------------------------------
|
||||
; Pages
|
||||
|
||||
; Installer pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "assets\installer_license.txt"
|
||||
; !insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
; Uninstaller pages
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
; Set UI language
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
|
||||
; Var /GLOBAL installerPath
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; StrContains
|
||||
; This function does a case sensitive searches for an occurrence of a substring in a string.
|
||||
; It returns the substring if it is found.
|
||||
; Otherwise it returns null("").
|
||||
; Written by kenglish_hi
|
||||
; Adapted from StrReplace written by dandaman32
|
||||
|
||||
|
||||
Var STR_HAYSTACK
|
||||
Var STR_NEEDLE
|
||||
Var STR_CONTAINS_VAR_1
|
||||
Var STR_CONTAINS_VAR_2
|
||||
Var STR_CONTAINS_VAR_3
|
||||
Var STR_CONTAINS_VAR_4
|
||||
Var STR_RETURN_VAR
|
||||
|
||||
Function StrContains
|
||||
Exch $STR_NEEDLE
|
||||
Exch 1
|
||||
Exch $STR_HAYSTACK
|
||||
; Uncomment to debug
|
||||
;MessageBox MB_OK 'STR_NEEDLE = $STR_NEEDLE STR_HAYSTACK = $STR_HAYSTACK '
|
||||
StrCpy $STR_RETURN_VAR ""
|
||||
StrCpy $STR_CONTAINS_VAR_1 -1
|
||||
StrLen $STR_CONTAINS_VAR_2 $STR_NEEDLE
|
||||
StrLen $STR_CONTAINS_VAR_4 $STR_HAYSTACK
|
||||
loop:
|
||||
IntOp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_1 + 1
|
||||
StrCpy $STR_CONTAINS_VAR_3 $STR_HAYSTACK $STR_CONTAINS_VAR_2 $STR_CONTAINS_VAR_1
|
||||
StrCmp $STR_CONTAINS_VAR_3 $STR_NEEDLE found
|
||||
StrCmp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_4 done
|
||||
Goto loop
|
||||
found:
|
||||
StrCpy $STR_RETURN_VAR $STR_NEEDLE
|
||||
Goto done
|
||||
done:
|
||||
Pop $STR_NEEDLE ;Prevent "invalid opcode" errors and keep the
|
||||
Exch $STR_RETURN_VAR
|
||||
FunctionEnd
|
||||
|
||||
!macro _StrContainsConstructor OUT NEEDLE HAYSTACK
|
||||
Push `${HAYSTACK}`
|
||||
Push `${NEEDLE}`
|
||||
Call StrContains
|
||||
Pop `${OUT}`
|
||||
!macroend
|
||||
|
||||
!define StrContains '!insertmacro "_StrContainsConstructor"'
|
||||
|
||||
|
||||
;-------------------------------
|
||||
; Uninstall Previous Version if exists
|
||||
|
||||
!macro UninstallExisting exitcode uninstcommand
|
||||
Push `${uninstcommand}`
|
||||
Call UninstallExisting
|
||||
Pop ${exitcode}
|
||||
!macroend
|
||||
Function UninstallExisting
|
||||
Exch $1 ; uninstcommand
|
||||
Push $2 ; Uninstaller
|
||||
Push $3 ; Len
|
||||
StrCpy $3 ""
|
||||
StrCpy $2 $1 1
|
||||
StrCmp $2 '"' qloop sloop
|
||||
sloop:
|
||||
StrCpy $2 $1 1 $3
|
||||
IntOp $3 $3 + 1
|
||||
StrCmp $2 "" +2
|
||||
StrCmp $2 ' ' 0 sloop
|
||||
IntOp $3 $3 - 1
|
||||
Goto run
|
||||
qloop:
|
||||
StrCmp $3 "" 0 +2
|
||||
StrCpy $1 $1 "" 1 ; Remove initial quote
|
||||
IntOp $3 $3 + 1
|
||||
StrCpy $2 $1 1 $3
|
||||
StrCmp $2 "" +2
|
||||
StrCmp $2 '"' 0 qloop
|
||||
run:
|
||||
StrCpy $2 $1 $3 ; Path to uninstaller
|
||||
StrCpy $1 161 ; ERROR_BAD_PATHNAME
|
||||
GetFullPathName $3 "$2\.." ; $InstDir
|
||||
IfFileExists "$2" 0 +4
|
||||
ExecWait '"$2" /S _?=$3' $1 ; This assumes the existing uninstaller is a NSIS uninstaller, other uninstallers don't support /S nor _?=
|
||||
IntCmp $1 0 "" +2 +2 ; Don't delete the installer if it was aborted
|
||||
Delete "$2" ; Delete the uninstaller
|
||||
RMDir "$3" ; Try to delete $InstDir
|
||||
RMDir "$3\.." ; (Optional) Try to delete the parent of $InstDir
|
||||
Pop $3
|
||||
Pop $2
|
||||
Exch $1 ; exitcode
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function .onInit
|
||||
ReadRegStr $0 HKCU "Software\Software\Microsoft\Windows\CurrentVersion\Uninstall\${UninstId}" "UninstallString"
|
||||
${If} $0 != ""
|
||||
${AndIf} ${Cmd} `MessageBox MB_YESNO|MB_ICONQUESTION "It is highly recommended to uninstall the previous version of OpenBB Terminal - Please click Yes to proceed (Note - You will not lose your custom settings) - Or you can uninstall manually. " /SD IDYES IDYES`
|
||||
!insertmacro UninstallExisting $0 $0
|
||||
${If} $0 <> 0
|
||||
MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES +2
|
||||
Abort
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
; Section - Install App
|
||||
|
||||
Section "-hidden app"
|
||||
SectionIn RO
|
||||
${StrContains} $0 "\OpenBB" "$INSTDIR"
|
||||
; Making sure here if user manually removes \openbb from their path that it still installs there
|
||||
; so we dont have issues with uninstaller later.
|
||||
StrCmp $0 "" notfound
|
||||
; MessageBox MB_OK 'Found string $0 $INSTDIR'
|
||||
SetOutPath "$INSTDIR"
|
||||
Goto done
|
||||
notfound:
|
||||
; MessageBox MB_OK "$INSTDIR is 'bla'"
|
||||
SetOutPath "$INSTDIR\OpenBB"
|
||||
StrCpy $InstDir "$INSTDIR\OpenBB"
|
||||
; MessageBox MB_OK 'Did not find string "$INSTDIR\OpenBB" "$installerPath"'
|
||||
done:
|
||||
|
||||
; File /r "app\*.*"
|
||||
WriteRegStr HKCU "Software\${NAME}" "" $INSTDIR
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKCU "Software\Software\Microsoft\Windows\CurrentVersion\Uninstall\${UninstId}" "OpenBBPlatform" "OpenBB"
|
||||
WriteRegStr HKCU "Software\Software\Microsoft\Windows\CurrentVersion\Uninstall\${UninstId}" "UninstallString" '"$InstDir\Uninstall.exe"'
|
||||
WriteRegStr HKCU "Software\Software\Microsoft\Windows\CurrentVersion\Uninstall\${UninstId}" "QuietUninstallString" '"$InstDir\Uninstall.exe" /S'
|
||||
SectionEnd
|
||||
|
||||
|
||||
;--------------------------------
|
||||
; Remove empty parent directories
|
||||
|
||||
Function un.RMDirUP
|
||||
!define RMDirUP '!insertmacro RMDirUPCall'
|
||||
|
||||
!macro RMDirUPCall _PATH
|
||||
push '${_PATH}'
|
||||
Call un.RMDirUP
|
||||
!macroend
|
||||
|
||||
; $0 - current folder
|
||||
ClearErrors
|
||||
|
||||
Exch $0
|
||||
;DetailPrint "ASDF - $0\.."
|
||||
RMDir "$0\.."
|
||||
|
||||
IfErrors Skip
|
||||
${RMDirUP} "$0\.."
|
||||
Skip:
|
||||
|
||||
Pop $0
|
||||
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
; Section - Uninstaller
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
;Delete Shortcut
|
||||
Delete "$DESKTOP\${NAME}.lnk"
|
||||
|
||||
;Delete Directory
|
||||
Delete '$SMPROGRAMS\${Company}\${NAME}'
|
||||
|
||||
;Delete Reg Key
|
||||
DeleteRegKey HKCU "Software\Software\Microsoft\Windows\CurrentVersion\Uninstall\${UninstId}"
|
||||
|
||||
;Delete Uninstall
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
|
||||
;Delete Folder
|
||||
RMDir /r "$INSTDIR"
|
||||
${RMDirUP} "$INSTDIR"
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\${NAME}"
|
||||
|
||||
SectionEnd
|
||||
12
build/conda/installer/assets/installer_conclusion.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Thank you for installing OpenBB Platform!
|
||||
|
||||
To get started, open the installed OpenBB folder, in the home folder of your user, and review the README.md file. Or, open one of the launchers using the provided shortcuts.
|
||||
|
||||
The OpenBB Platform Documentation is found here:
|
||||
https://docs.openbb.co
|
||||
|
||||
Bugs/Issues/Requests can be posted here:
|
||||
https://github.com/OpenBB-finance/OpenBB/issues
|
||||
|
||||
Security vulnerabilities can be reported here:
|
||||
https://github.com/OpenBB-finance/OpenBB/security/advisories
|
||||
661
build/conda/installer/assets/installer_license.txt
vendored
Normal file
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
19
build/conda/installer/assets/installer_readme.txt
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
OpenBB Platform provides a convenient way to access raw financial data from multiple data providers.
|
||||
|
||||
Important Notes:
|
||||
|
||||
In order to install you need access to the Internet.
|
||||
|
||||
The installation will take approximately 1-2 GB of storage and is for the current user only, system-wide installations are not allowed.
|
||||
|
||||
If a folder named "OpenBB" already exists at the user home directory, please remove it before installing.
|
||||
|
||||
The installed packages can be reconfigured, post-installation, for custom configurations.
|
||||
|
||||
If the OpenBB folder is moved, post-installation, the shortcuts will not be updated to reflect the change.
|
||||
|
||||
|
||||
|
||||
This application is intended strictly for research and educational purposes.
|
||||
|
||||
By proceeding with the installation, you agree not to use this application for any purpose that is unlawful or prohibited by international and national laws, regulations, or governmental and industry requirements.
|
||||
8
build/conda/installer/assets/installer_welcome.txt
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
Welcome to the OpenBB Platform Installer.
|
||||
|
||||
|
||||
This application will install the latest version of the OpenBB Platform on your computer in a self-contained, Python 3.12, Conda environment. It contains everything required to get started immediately, both as a user and a developer.
|
||||
|
||||
Several launch scripts are included; OpenBB CLI, OpenBB API, Jupyter Notebook, IPython, Update, and shortcuts to key folders.
|
||||
|
||||
Find them at the base of the installation folder, along with the README.md file for getting started.
|
||||
BIN
build/conda/installer/assets/openbb.icns
vendored
Normal file
BIN
build/conda/installer/assets/openbb_icon.ico
vendored
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
build/conda/installer/assets/openbb_osx.png
vendored
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
48
build/conda/installer/assets/openbb_platform_installer/README.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# OpenBB Platform Installer Package
|
||||
|
||||
This package is for installing the OpenBB Platform packages into any Python environment. Versions between 3.9 and 3.12, inclusively, are supported.
|
||||
|
||||
The `obb` virtual environment that came with the installation is pre-loaded, and this configuration can be duplicated by creating a new environment and running, `poetry install`, from this location.
|
||||
|
||||
## Installation
|
||||
|
||||
Assuming the current working directory is the location of this document, the code block below will create a new environment, activate it, update the dependencies, and then install the OpenBB Platform.
|
||||
|
||||
Open the Terminal command line with the Bash/CMD shortcut.
|
||||
|
||||
```sh
|
||||
conda create -n my_env python=3.10 -y
|
||||
conda activate my_env
|
||||
pip install poetry
|
||||
poetry lock
|
||||
poetry install
|
||||
openbb-build
|
||||
```
|
||||
|
||||
## Updating Packages
|
||||
|
||||
Update the environment dependencies with:
|
||||
|
||||
```sh
|
||||
poetry lock
|
||||
poetry install
|
||||
```
|
||||
|
||||
## Installation Groups
|
||||
|
||||
The package can be installed in different configurations, using Poetry groups as `--with`, `--without`, or `--only` keyword arguments.
|
||||
|
||||
- main
|
||||
- openbb-all
|
||||
- cli
|
||||
- notebook
|
||||
|
||||
To install, in a fresh environment, only the `openbb-core` package and the base dependencies:
|
||||
|
||||
```sh
|
||||
poetry install --only main --sync
|
||||
```
|
||||
|
||||
The `--sync` flag with sync the environment to the `poetry.lock` file for the flagged group(s). All items are installed when no arguments are supplied. Use this as a way to restore corrupted environments.
|
||||
|
||||
Do not use the `--sync` flag if you wish to keep installed packages that are not defined in the `pyproject.toml` and `poetry.lock` files.
|
||||
5
build/conda/installer/assets/openbb_platform_installer/obb-env.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
name: obb
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.12
|
||||
@@ -0,0 +1,3 @@
|
||||
"""Placeholder for the OpenBB Platform Installer package."""
|
||||
|
||||
__version__ = "1.0.0"
|
||||
@@ -0,0 +1,30 @@
|
||||
"""Entry point for the OpenBB Updater script."""
|
||||
|
||||
# pylint: disable=import-outside-toplevel,unused-import
|
||||
# flake8: noqa
|
||||
|
||||
def main():
|
||||
"""Update the OpenBB Platform and rebuild the Python interface."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
args = os.sys.argv[1:].copy() if os.sys.argv[1:] else []
|
||||
|
||||
cwd = Path(os.path.dirname(os.path.realpath(__file__))).parent.resolve()
|
||||
|
||||
command = (
|
||||
f"{sys.executable} -m pip install -U pip && "
|
||||
f"{sys.executable} -m poetry lock && "
|
||||
f"{sys.executable} -m poetry install {' '.join(args)} && "
|
||||
"openbb-build"
|
||||
)
|
||||
|
||||
subprocess.run(command, shell=True, cwd=cwd)
|
||||
|
||||
input("\nUpdate complete. Press Enter to exit...")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
53
build/conda/installer/assets/openbb_platform_installer/pyproject.toml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# If you will be using this as a template for your own package, please change the values accordingly.
|
||||
[tool.poetry]
|
||||
name = "openbb_platform_installer" # Change this to your package name
|
||||
version = "1.0.0" # Change this to your package version
|
||||
description = "A meta package for installing the OpenBB Platform: Investment research for everyone, anywhere." # Change this to your description
|
||||
authors = ["OpenBB <hello@openbb.co>"] # Change this to your name and email
|
||||
license = "AGPL-3.0-only" # This license must be compatible with the OpenBB license
|
||||
readme = "README.md" # Change this to your README file
|
||||
homepage = "https://openbb.co" # Change this to your website
|
||||
repository = "https://github.com/openbb-finance/openbb" # Change this to your repository
|
||||
documentation = "https://docs.openbb.co" # Change this to your documentation
|
||||
packages = [{ include = "openbb_platform_installer" }] # Update accordingly - these are build scripts and entry points.
|
||||
|
||||
[tool.poetry.scripts]
|
||||
openbb-update = "openbb_platform_installer.update:main"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.13"
|
||||
poetry = "^1.8"
|
||||
setuptools = "*"
|
||||
openbb-core = "^1"
|
||||
openbb-platform-api = "^1"
|
||||
deepdiff = "*"
|
||||
types-python-dateutil = "*"
|
||||
types-toml = "*"
|
||||
pandas-stubs = "*"
|
||||
codespell = "*"
|
||||
ruff = "*"
|
||||
mypy = "*"
|
||||
black = "*"
|
||||
pylint = "^3"
|
||||
pydocstyle = "~6.3"
|
||||
|
||||
[tool.poetry.group.openbb-all]
|
||||
|
||||
[tool.poetry.group.openbb-all.dependencies]
|
||||
openbb = { version = "^4", extras = ["all"] }
|
||||
|
||||
[tool.poetry.group.cli]
|
||||
|
||||
[tool.poetry.group.cli.dependencies]
|
||||
openbb-cli = "^1"
|
||||
|
||||
[tool.poetry.group.notebook]
|
||||
|
||||
[tool.poetry.group.notebook.dependencies]
|
||||
notebook = "^7"
|
||||
nbclassic = "^1"
|
||||
jedi-language-server = "^0.41"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
BIN
build/conda/installer/assets/openbb_win.png
vendored
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
96
build/conda/installer/construct.yaml
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
name: "OpenBB"
|
||||
version: "Platform"
|
||||
company: OpenBB, Inc.
|
||||
license_file: ./assets/installer_license.txt
|
||||
|
||||
installer_type: all
|
||||
|
||||
register_python: false # [win]
|
||||
register_python_default: false # [win]
|
||||
register_envs: false
|
||||
initialize_by_default: false
|
||||
initialize_conda: false
|
||||
write_condarc: true
|
||||
|
||||
default_location_pkg: OpenBB # [osx]
|
||||
default_prefix_domain_user: "%USERPROFILE%\\OpenBB\\conda" # [win]
|
||||
default_prefix: "${HOME}/OpenBB" # [linux]
|
||||
default_prefix: "%USERPROFILE%\\OpenBB\\conda" # [win]
|
||||
pkg_name: conda
|
||||
|
||||
specs:
|
||||
- conda
|
||||
- bash # [unix]
|
||||
- python=3.12
|
||||
|
||||
extra_envs:
|
||||
obb:
|
||||
environment_file: ./assets/openbb_platform_installer/obb-env.yml
|
||||
|
||||
channels:
|
||||
- conda-forge
|
||||
|
||||
condarc:
|
||||
{channels: [conda-forge],
|
||||
default_channels: [conda-forge],
|
||||
allow_softlinks: false,
|
||||
auto_activate_base: false,
|
||||
always_copy: true,
|
||||
register_envs: false,
|
||||
pip_interop_enabled: true}
|
||||
|
||||
pkg_domains:
|
||||
enable_anywhere: false
|
||||
enable_currentUserHome: true
|
||||
|
||||
post_install: post_install.sh # [unix]
|
||||
post_install: post_install.bat # [win]
|
||||
|
||||
extra_files:
|
||||
# Bundle launcher assets
|
||||
- ./README.md: ../README.md
|
||||
- ./assets/openbb_platform_installer/obb-env.yml: ../extensions/openbb_platform_installer/obb-env.yml
|
||||
- ./assets/openbb_platform_installer/pyproject.toml: ../extensions/openbb_platform_installer/pyproject.toml
|
||||
- ./assets/openbb_platform_installer/README.md: ../extensions/openbb_platform_installer/README.md
|
||||
- ./assets/openbb_platform_installer/openbb_platform_installer/__init__.py: ../extensions/openbb_platform_installer/openbb_platform_installer/__init__.py
|
||||
- ./assets/openbb_platform_installer/openbb_platform_installer/update.py: ../extensions/openbb_platform_installer/openbb_platform_installer/update.py
|
||||
- ./assets/openbb_icon.ico: assets/openbb_icon.ico # [win]
|
||||
- ./assets/openbb.icns: ../openbb_icon.icns # [osx]
|
||||
- ./assets/create_shortcut.vbs: assets/create_shortcut.vbs # [win]
|
||||
- ./assets/installer_license.txt: assets/installer_license.txt # [win]
|
||||
- ./assets/installer_vertical2.bmp: assets/installer_vertical2.bmp # [win]
|
||||
- ./assets/installer_horizontal.bmp: assets/installer_horizontal.bmp # [win]
|
||||
- ./assets/examples/README.md: ../extensions/examples/README.md
|
||||
- ./assets/examples/install_examples.py: ../extensions/examples/install_examples.py
|
||||
- ./assets/examples/empty_provider/pyproject.toml: ../extensions/examples/empty_provider/pyproject.toml
|
||||
- ./assets/examples/empty_provider/README.md: ../extensions/examples/empty_provider/README.md
|
||||
- ./assets/examples/empty_provider/empty_provider/__init__.py: ../extensions/examples/empty_provider/empty_provider/__init__.py
|
||||
- ./assets/examples/empty_provider/empty_provider/models/__init__.py: ../extensions/examples/empty_provider/empty_provider/models/__init__.py
|
||||
- ./assets/examples/empty_provider/empty_provider/models/empty_model.py: ../extensions/examples/empty_provider/empty_provider/models/empty_model.py
|
||||
- ./assets/examples/empty_provider/empty_provider/utils/__init__.py: ../extensions/examples/empty_provider/empty_provider/utils/__init__.py
|
||||
- ./assets/examples/empty_router/pyproject.toml: ../extensions/examples/empty_router/pyproject.toml
|
||||
- ./assets/examples/empty_router/README.md: ../extensions/examples/empty_router/README.md
|
||||
- ./assets/examples/empty_router/empty_router/__init__.py: ../extensions/examples/empty_router/empty_router/__init__.py
|
||||
- ./assets/examples/empty_router/empty_router/empty_router.py: ../extensions/examples/empty_router/empty_router/empty_router.py
|
||||
- ./assets/examples/empty_router/empty_router/empty_views.py: ../extensions/examples/empty_router/empty_router/empty_views.py
|
||||
- ./assets/examples/empty_obbject/pyproject.toml: ../extensions/examples/empty_obbject/pyproject.toml
|
||||
- ./assets/examples/empty_obbject/README.md: ../extensions/examples/empty_obbject/README.md
|
||||
- ./assets/examples/empty_obbject/empty_obbject/__init__.py: ../extensions/examples/empty_obbject/empty_obbject/__init__.py
|
||||
- ./assets/examples/python_basics.ipynb: ../notebooks/python_basics.ipynb
|
||||
- ../../../examples/platform_standardization.ipynb: ../notebooks/how_platform_works.ipynb
|
||||
|
||||
icon_image: ../openbb_icon.icns # [osx]
|
||||
icon_image: ./assets/openbb_icon.ico # [win]
|
||||
welcome_image: ./assets/openbb_osx.png # [unix]
|
||||
welcome_image: ./assets/Installer_vertical2.bmp # [win]
|
||||
header_image: ./assets/Installer_horizontal2.png # [win]
|
||||
welcome_image_text: "OpenBB Platform"
|
||||
readme_file: ./assets/installer_readme.txt # [unix]
|
||||
conclusion_file: ./assets/installer_conclusion.txt # [unix]
|
||||
welcome_file: ./assets/installer_welcome.txt # [unix]
|
||||
welcome_file: ./assets/custom_welcome.nsi # [win]
|
||||
conclusion_file: ./assets/custom_conclusion.nsi # [win]
|
||||
|
||||
# Add extra files to the installer - this is another way - was playing with this
|
||||
temp_extra_files:
|
||||
- ./assets/Installer_vertical2.bmp: Installer_vertical2.bmp # [win]
|
||||
61
build/conda/installer/post_install.bat
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
@echo off
|
||||
echo Installing environment, this may take a few minutes... Watch for changes in post_install_log.txt file at the root of the installation directory.
|
||||
|
||||
cd "%PREFIX%\..\extensions\openbb_platform_installer"
|
||||
|
||||
PATH %PREFIX%;%PREFIX%\Scripts;%PREFIX%\Library\bin;%PATH%
|
||||
SET LOG_FILE="%PREFIX%\..\post_install_log.txt"
|
||||
|
||||
call "%PREFIX%\Scripts\activate.bat"
|
||||
|
||||
call conda activate "%PREFIX%\envs\obb" >> "%LOG_FILE%" 2>&1
|
||||
|
||||
python -m pip install -U pip >> "%LOG_FILE%" 2>&1
|
||||
|
||||
pip install -U setuptools >> "%LOG_FILE%" 2>&1
|
||||
|
||||
pip install poetry >> "%LOG_FILE%" 2>&1
|
||||
|
||||
poetry config virtualenvs.path "%PREFIX%\envs" --local >> "%LOG_FILE%" 2>&1
|
||||
|
||||
poetry config virtualenvs.create false --local >> "%LOG_FILE%" 2>&1
|
||||
|
||||
poetry lock >> "%LOG_FILE%" 2>&1
|
||||
|
||||
poetry install >> "%LOG_FILE%" 2>&1
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
echo %date% %time% "Error during post-installation: poetry install failed." >> %LOG_FILE%
|
||||
exit /b 1
|
||||
) ELSE (
|
||||
echo %date% %time% "Python environment successfully installed... Building the OpenBB Python interface..." >> %LOG_FILE%
|
||||
)
|
||||
|
||||
echo Python environment successfully installed... Building the OpenBB Python interface...
|
||||
|
||||
call openbb-build >> "%LOG_FILE%" 2>&1
|
||||
IF ERRORLEVEL 1 (
|
||||
call :log_with_timestamp "Error during post-installation: building OpenBB's Python interface failed."
|
||||
exit /b 1
|
||||
) ELSE (
|
||||
call :log_with_timestamp "OpenBB's Python interface built successfully."
|
||||
)
|
||||
|
||||
cscript "%PREFIX%\assets\create_shortcut.vbs" >> "%LOG_FILE%" 2>&1
|
||||
IF ERRORLEVEL 1 (
|
||||
echo %date% %time% "Error during post-installation: creating shortcuts failed." >> %LOG_FILE%
|
||||
exit /b 1
|
||||
) ELSE (
|
||||
echo %date% %time% "Shortcuts created successfully." >> %LOG_FILE%
|
||||
)
|
||||
|
||||
echo Post-installation steps completed successfully.
|
||||
|
||||
exit /b 0
|
||||
|
||||
goto :eof
|
||||
|
||||
REM Function to add timestamp
|
||||
:log_with_timestamp
|
||||
echo %date%_%time% %1 >> %LOG_FILE%
|
||||
goto :eof
|
||||
156
build/conda/installer/post_install.sh
vendored
Executable file
@@ -0,0 +1,156 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup environment.
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
LOG_FILE="$PREFIX/../post_install_log.txt"
|
||||
|
||||
# Function to add timestamp.
|
||||
log_with_timestamp() {
|
||||
echo "$(date '+%Y-%m-%d_%H:%M:%S') $1" >>"$LOG_FILE"
|
||||
}
|
||||
|
||||
cd "$PREFIX/../extensions/openbb_platform_installer" >>"$LOG_FILE" 2>&1
|
||||
|
||||
source "$PREFIX/etc/profile.d/conda.sh" && conda activate "$PREFIX"
|
||||
|
||||
conda activate obb >>"$LOG_FILE" 2>&1
|
||||
|
||||
python -m pip install -U pip >>"$LOG_FILE" 2>&1
|
||||
|
||||
pip install -U setuptools poetry >>"$LOG_FILE" 2>&1
|
||||
|
||||
poetry config virtualenvs.path "$PREFIX/envs" --local >>"$LOG_FILE" 2>&1
|
||||
|
||||
poetry config virtualenvs.create false --local >>"$LOG_FILE" 2>&1
|
||||
|
||||
poetry lock >>"$LOG_FILE" 2>&1
|
||||
|
||||
|
||||
# Install OpenBB packages.
|
||||
if poetry install >>"$LOG_FILE" 2>&1; then
|
||||
log_with_timestamp "OpenBB Platform installation completed successfully."
|
||||
else
|
||||
log_with_timestamp "Error during post-installation: poetry install failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build OpenBB Python interface.
|
||||
python - <<EOF >>"$LOG_FILE" 2>&1
|
||||
import openbb
|
||||
openbb.build()
|
||||
EOF
|
||||
log_with_timestamp "OpenBB's Python Interface built successfully."
|
||||
|
||||
# IPython launcher script initialized with OpenBB.
|
||||
IPYTHON_WRAPPER_SCRIPT="$PREFIX/envs/obb/bin/openbb-ipython-launcher"
|
||||
|
||||
cat > "$IPYTHON_WRAPPER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
source activate base
|
||||
conda activate obb
|
||||
ipython -c "from openbb import obb;obb" -i
|
||||
EOF
|
||||
|
||||
chmod +x "$IPYTHON_WRAPPER_SCRIPT"
|
||||
|
||||
# Bash shell isolated for the OpenBB environment.
|
||||
SHELL_WRAPPER_SCRIPT="$PREFIX/envs/obb/bin/bash"
|
||||
|
||||
cat > "$SHELL_WRAPPER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
cd "$PREFIX/.."
|
||||
source activate base
|
||||
echo "Conda base environment is active but not initialized. Use this shell to create new environments."
|
||||
echo "To initialize and activate the OpenBB environment, run 'source activate obb'."
|
||||
exec $PREFIX/bin/bash -i
|
||||
EOF
|
||||
|
||||
chmod +x "$SHELL_WRAPPER_SCRIPT"
|
||||
|
||||
NOTEBOOK_WRAPPER_SCRIPT="$PREFIX/envs/obb/bin/openbb-notebook"
|
||||
|
||||
cat > "$NOTEBOOK_WRAPPER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
source activate base
|
||||
conda activate obb
|
||||
cd "$PREFIX/.."
|
||||
jupyter notebook "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$NOTEBOOK_WRAPPER_SCRIPT"
|
||||
|
||||
API_WRAPPER_SCRIPT="$PREFIX/envs/obb/bin/openbb-api-launcher"
|
||||
|
||||
cat > "$API_WRAPPER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
source activate base
|
||||
conda activate obb
|
||||
openbb-api --login True "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$API_WRAPPER_SCRIPT"
|
||||
|
||||
CLI_WRAPPER_SCRIPT="$PREFIX/envs/obb/bin/openbb-cli"
|
||||
|
||||
cat > "$CLI_WRAPPER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
source activate base
|
||||
conda activate obb
|
||||
openbb "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$CLI_WRAPPER_SCRIPT"
|
||||
|
||||
OPENBB_UPDATER_SCRIPT="$PREFIX/envs/obb/bin/openbb-updater"
|
||||
|
||||
cat > "$OPENBB_UPDATER_SCRIPT" <<EOF
|
||||
#!$PREFIX/bin/bash
|
||||
export PATH="$PREFIX/bin:\$PATH"
|
||||
source activate base
|
||||
conda activate obb
|
||||
openbb-update "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$OPENBB_UPDATER_SCRIPT"
|
||||
|
||||
TARGET_DIR="$PREFIX/.."
|
||||
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
if ln -s "$CLI_WRAPPER_SCRIPT" "$TARGET_DIR/openbb-cli" && \
|
||||
ln -s "$API_WRAPPER_SCRIPT" "$TARGET_DIR/openbb-api" && \
|
||||
ln -s "$NOTEBOOK_WRAPPER_SCRIPT" "$TARGET_DIR/openbb-notebook" && \
|
||||
ln -s "$IPYTHON_WRAPPER_SCRIPT" "$TARGET_DIR/openbb-ipython" && \
|
||||
ln -s "$SHELL_WRAPPER_SCRIPT" "$TARGET_DIR/Bash" && \
|
||||
ln -s "$OPENBB_UPDATER_SCRIPT" "$TARGET_DIR/Update" && \
|
||||
ln -s "$HOME/.openbb_platform" "$TARGET_DIR/Settings" && \
|
||||
ln -s "$PREFIX/envs" "$TARGET_DIR/Environments" && \
|
||||
ln -s "$HOME/OpenBBUserData" "$TARGET_DIR/OpenBBUserData"; then
|
||||
log_with_timestamp "Symlinks created successfully." >>"$LOG_FILE" 2>&1
|
||||
else
|
||||
log_with_timestamp "Error during post-installation: creating symlinks failed." >>"$LOG_FILE" 2>&1
|
||||
fi
|
||||
|
||||
verify_symlink() {
|
||||
if [ -L "$1" ] && [ -e "$1" ]; then
|
||||
log_with_timestamp "Symlink $1 verified successfully."
|
||||
else
|
||||
log_with_timestamp "Error: Symlink $1 is not working."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
verify_symlink "$TARGET_DIR/openbb-cli"
|
||||
verify_symlink "$TARGET_DIR/openbb-api"
|
||||
verify_symlink "$TARGET_DIR/openbb-notebook"
|
||||
verify_symlink "$TARGET_DIR/openbb-ipython"
|
||||
verify_symlink "$TARGET_DIR/Bash"
|
||||
verify_symlink "$TARGET_DIR/Update"
|
||||
verify_symlink "$TARGET_DIR/Settings"
|
||||
verify_symlink "$TARGET_DIR/OpenBBUserData"
|
||||
verify_symlink "$TARGET_DIR/Environments"
|
||||
@@ -68,7 +68,7 @@ def parse_args():
|
||||
"--semver",
|
||||
help="Semantic version.",
|
||||
default="patch",
|
||||
choices=["patch", "minor", "major"],
|
||||
choices=["patch", "minor", "major", "none"],
|
||||
dest="semver",
|
||||
)
|
||||
return parser.parse_args()
|
||||
@@ -80,7 +80,7 @@ def publish(
|
||||
extensions: bool = False,
|
||||
openbb: bool = False,
|
||||
verbose: bool = False,
|
||||
semver: Literal["patch", "minor", "major"] = "patch",
|
||||
semver: Literal["patch", "minor", "major", "none"] = "patch",
|
||||
):
|
||||
"""Publish the Platform to PyPi with optional core or extensions."""
|
||||
package_directories = []
|
||||
@@ -127,10 +127,11 @@ def publish(
|
||||
cwd=path.parent,
|
||||
)
|
||||
# Bump pyproject.toml version
|
||||
partial_run(
|
||||
[sys.executable, "-m", "poetry", "version", semver],
|
||||
cwd=path.parent,
|
||||
)
|
||||
if semver != "none":
|
||||
partial_run(
|
||||
[sys.executable, "-m", "poetry", "version", semver],
|
||||
cwd=path.parent,
|
||||
)
|
||||
# Publish (if not dry running)
|
||||
if not dry_run:
|
||||
partial_run(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""OpenBB API Account Router."""
|
||||
"""OpenBB Platform API Account Router."""
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from openbb_core.api.auth.user import authenticate_user, get_user_settings
|
||||
|
||||
@@ -20,6 +20,7 @@ LOCAL_DEPS = """
|
||||
python = ">=3.9,<3.13"
|
||||
openbb-devtools = { path = "./extensions/devtools", develop = true, markers = "python_version >= '3.10'" }
|
||||
openbb-core = { path = "./core", develop = true }
|
||||
openbb-platform-api = { path = "./extensions/platform_api", develop = true }
|
||||
|
||||
openbb-benzinga = { path = "./providers/benzinga", develop = true }
|
||||
openbb-bls = { path = "./providers/bls", develop = true }
|
||||
|
||||
96
openbb_platform/extensions/platform_api/README.md
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
# OpenBB Platform API Meta Package
|
||||
|
||||
This is a meta package for installing a command line script to launch the OpenBB Platform API, and the OpenBB Terminal Pro data connector widgets build script.
|
||||
|
||||
## Installation
|
||||
|
||||
Install this package within an existing [OpenBB Platform Python environment](https://docs.openbb.co/platform/installation).
|
||||
|
||||
```sh
|
||||
pip install openbb-platform-api
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The script is run from the command line, with the environment active, by entering:
|
||||
|
||||
```sh
|
||||
openbb-api
|
||||
```
|
||||
|
||||
This will launch a Fast API instance, via `uvicorn`, at `http://127.0.0.1:6900`
|
||||
|
||||
### Keyword Arguments
|
||||
|
||||
The behavior of the script can be configured with the use of arguments and keyword arguments.
|
||||
|
||||
Launcher specific arguments:
|
||||
|
||||
--build Build the widgets.json file.
|
||||
--no-build Do not build the widgets.json file.
|
||||
--login Login to the OpenBB Platform.
|
||||
--no-filter Do not filter the widgets.json file.
|
||||
|
||||
|
||||
All other arguments will be passed to uvicorn. Here are the most common ones:
|
||||
|
||||
--host TEXT Host IP address or hostname.
|
||||
[default: 127.0.0.1]
|
||||
--port INTEGER Port number.
|
||||
[default: 6900]
|
||||
--ssl-keyfile TEXT SSL key file.
|
||||
--ssl-certfile TEXT SSL certificate file.
|
||||
--ssl-keyfile-password TEXT SSL keyfile password.
|
||||
--ssl-version INTEGER SSL version to use.
|
||||
(see stdlib ssl module's)
|
||||
[default: 17]
|
||||
--ssl-cert-reqs INTEGER Whether client certificate is required.
|
||||
(see stdlib ssl module's)
|
||||
[default: 0]
|
||||
--ssl-ca-certs TEXT CA certificates file.
|
||||
--ssl-ciphers TEXT Ciphers to use.
|
||||
(see stdlib ssl module's)
|
||||
[default: TLSv1]
|
||||
|
||||
Run `uvicorn --help` to get the full list of arguments.
|
||||
|
||||
### API Over HTTPS
|
||||
|
||||
To run the API over the HTTPS protocol, you must first create a self-signed certificate and the associated key. After activating the environment, you can generate the files by entering this to the command line:
|
||||
|
||||
```sh
|
||||
openssl req -x509 -days 3650 -out localhost.crt -keyout localhost.key -newkey rsa:4096 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <( \
|
||||
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
|
||||
```
|
||||
|
||||
Two files will be created, in the current working directory, that are passed as keyword arguments to the `openbb-api` entry point.
|
||||
|
||||
```sh
|
||||
openbb-api --ssl_keyfile localhost.key --ssl_certfile localhost.crt
|
||||
```
|
||||
|
||||
**Note**: Adjust the command to include the full path to the file if the current working directory is not where they are located.
|
||||
|
||||
The certificate - `localhost.crt` - will need to be added to system's trust store. The process for this will depend on the operating system and the user account privilege.
|
||||
|
||||
A quick solution is to visit the server's URL, show the details of the warning, and choose to continue anyways.
|
||||
|
||||
Contact the system administrator if you are using a work device and require additional permissions to complete the configuration.
|
||||
|
||||

|
||||
|
||||
### Location of `widgets.json`
|
||||
|
||||
An OpenBB Terminal Pro data connector requires a file, `widgets.json`, to be served by the API. It contains the configuration for each widget available to be added to a dashboard. The file is stored, and served from, the environment's assets folder.
|
||||
|
||||
```sh
|
||||
/Path/to/environments/envs/obb/assets/widgets.json
|
||||
```
|
||||
|
||||
It can be manually edited and served without the build process by passing `--no-build` to the API launch script.
|
||||
|
||||
```sh
|
||||
openbb-api --no-build
|
||||
```
|
||||
|
||||
If you would like to construct this file manually for a custom backend configuration, save the file in the path above.
|
||||
0
openbb_platform/extensions/platform_api/integration/.gitkeep
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"""OpenBB Platform API Meta Package."""
|
||||
@@ -0,0 +1,147 @@
|
||||
"""OpenBB Platform API.
|
||||
|
||||
Launch script and widgets builder for the OpenBB Terminal Custom Backend.
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import uvicorn
|
||||
from fastapi.responses import JSONResponse
|
||||
from openbb_core.api.rest_api import app
|
||||
|
||||
from .utils.api import check_port, get_user_settings, get_widgets_json, parse_args
|
||||
|
||||
logger = logging.getLogger("openbb_platform_api")
|
||||
logger.setLevel(logging.INFO)
|
||||
handler = logging.StreamHandler()
|
||||
handler.setLevel(logging.INFO)
|
||||
formatter = logging.Formatter("\n%(message)s\n")
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
|
||||
FIRST_RUN = True
|
||||
|
||||
HOME = os.environ.get("HOME") or os.environ.get("USERPROFILE")
|
||||
|
||||
if not HOME:
|
||||
raise ValueError("HOME or USERPROFILE environment variable not set.")
|
||||
|
||||
CURRENT_USER_SETTINGS = os.path.join(HOME, ".openbb_platform", "user_settings.json")
|
||||
USER_SETTINGS_COPY = os.path.join(HOME, ".openbb_platform", "user_settings_backup.json")
|
||||
|
||||
# Widget filtering is optional and can be used to exclude widgets from the widgets.json file
|
||||
# You can generate this filter on OpenBB Hub: https://my.openbb.co/app/platform/widgets
|
||||
WIDGET_SETTINGS = os.path.join(HOME, ".openbb_platform", "widget_settings.json")
|
||||
|
||||
kwargs = parse_args()
|
||||
build = kwargs.pop("build", True)
|
||||
build = False if kwargs.pop("no-build", None) else build
|
||||
login = kwargs.pop("login", False)
|
||||
dont_filter = kwargs.pop("no-filter", False)
|
||||
widget_exclude_filter: list = []
|
||||
|
||||
if not dont_filter and os.path.exists(WIDGET_SETTINGS):
|
||||
with open(WIDGET_SETTINGS) as f:
|
||||
try:
|
||||
widget_exclude_filter = json.load(f)["exclude"]
|
||||
except json.JSONDecodeError as e:
|
||||
logger.info("Error loading widget filter settings -> %s", e)
|
||||
|
||||
|
||||
openapi = app.openapi()
|
||||
|
||||
# We don't need the current settings,
|
||||
# but we need to call the function to update, login, and/or identify the settings file.
|
||||
current_settings = get_user_settings(login, CURRENT_USER_SETTINGS, USER_SETTINGS_COPY)
|
||||
|
||||
widgets_json = get_widgets_json(build, openapi, widget_exclude_filter)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def get_root():
|
||||
"""Root response and welcome message."""
|
||||
return JSONResponse(
|
||||
content="Welcome to the OpenBB Platform API."
|
||||
+ " Learn how to connect to Pro in https://docs.openbb.co/pro/custom-backend,"
|
||||
+ " or see the API documentation here: /docs"
|
||||
)
|
||||
|
||||
|
||||
@app.get("/widgets.json")
|
||||
async def get_widgets():
|
||||
"""Widgets configuration file for the OpenBB Terminal Pro."""
|
||||
# This allows us to serve an edited widgets.json file without reloading the server.
|
||||
global FIRST_RUN # noqa PLW0603 # pylint: disable=global-statement
|
||||
if FIRST_RUN is True:
|
||||
FIRST_RUN = False
|
||||
return JSONResponse(content=widgets_json)
|
||||
return JSONResponse(content=get_widgets_json(False, openapi, widget_exclude_filter))
|
||||
|
||||
|
||||
def launch_api(**_kwargs): # noqa PRL0912
|
||||
"""Main function."""
|
||||
host = _kwargs.pop("host", os.getenv("OPENBB_API_HOST", "127.0.0.1"))
|
||||
if not host:
|
||||
logger.info(
|
||||
"OPENBB_API_HOST is set incorrectly. It should be an IP address or hostname."
|
||||
)
|
||||
host = input("Enter the host IP address or hostname: ")
|
||||
if not host:
|
||||
host = "127.0.0.1"
|
||||
|
||||
port = _kwargs.pop("port", os.getenv("OPENBB_API_PORT", "6900"))
|
||||
|
||||
try:
|
||||
port = int(port)
|
||||
except ValueError:
|
||||
logger.info("OPENBB_API_PORT is set incorrectly. It should be an port number.")
|
||||
port = input("Enter the port number: ")
|
||||
try:
|
||||
port = int(port)
|
||||
except ValueError:
|
||||
logger.info("Invalid port number. Defaulting to 6900.")
|
||||
port = 6900
|
||||
if port < 1025:
|
||||
port = 6900
|
||||
logger.info("Invalid port number, must be above 1024. Defaulting to 6900.")
|
||||
|
||||
free_port = check_port(host, port)
|
||||
|
||||
if free_port != port:
|
||||
logger.info("Port %d is already in use. Using port %d.", port, free_port)
|
||||
port = free_port
|
||||
|
||||
if "use_colors" not in _kwargs:
|
||||
_kwargs["use_colors"] = "win" not in sys.platform or os.name != "nt"
|
||||
|
||||
try:
|
||||
package_name = __package__
|
||||
logger.info(
|
||||
"\nTo access this data from OpenBB Terminal, use the link displayed after the application startup completes."
|
||||
"\nChrome is the recommended browser. Other browsers may conflict or require additional configuration."
|
||||
"\nDocumentation is available at /docs."
|
||||
)
|
||||
uvicorn.run(f"{package_name}.main:app", host=host, port=port, **_kwargs)
|
||||
finally:
|
||||
# If user_settings_copy.json exists, then restore the original settings.
|
||||
if os.path.exists(USER_SETTINGS_COPY):
|
||||
logger.info("Restoring the original settings.")
|
||||
os.replace(USER_SETTINGS_COPY, CURRENT_USER_SETTINGS)
|
||||
|
||||
|
||||
def main():
|
||||
"""Launch the API."""
|
||||
launch_api(**kwargs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
@@ -0,0 +1 @@
|
||||
"""OpenBB Platform API Utils."""
|
||||
@@ -0,0 +1,249 @@
|
||||
"""API Utils."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import socket
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from deepdiff import DeepDiff
|
||||
|
||||
from .widgets import build_json
|
||||
|
||||
LAUNCH_SCRIPT_DESCRIPTION = """
|
||||
Serve the OpenBB Platform API.
|
||||
|
||||
|
||||
Launcher specific arguments:
|
||||
|
||||
--build Build the widgets.json file.
|
||||
--no-build Do not build the widgets.json file.
|
||||
--login Login to the OpenBB Platform.
|
||||
--no-filter Do not filter the widgets.json file.
|
||||
|
||||
|
||||
All other arguments will be passed to uvicorn. Here are the most common ones:
|
||||
|
||||
--host TEXT Host IP address or hostname.
|
||||
[default: 127.0.0.1]
|
||||
--port INTEGER Port number.
|
||||
[default: 6900]
|
||||
--ssl-keyfile TEXT SSL key file.
|
||||
--ssl-certfile TEXT SSL certificate file.
|
||||
--ssl-keyfile-password TEXT SSL keyfile password.
|
||||
--ssl-version INTEGER SSL version to use.
|
||||
(see stdlib ssl module's)
|
||||
[default: 17]
|
||||
--ssl-cert-reqs INTEGER Whether client certificate is required.
|
||||
(see stdlib ssl module's)
|
||||
[default: 0]
|
||||
--ssl-ca-certs TEXT CA certificates file.
|
||||
--ssl-ciphers TEXT Ciphers to use.
|
||||
(see stdlib ssl module's)
|
||||
[default: TLSv1]
|
||||
|
||||
Run `uvicorn --help` to get the full list of arguments.
|
||||
"""
|
||||
|
||||
|
||||
def check_port(host, port):
|
||||
"""Check if the port number is free."""
|
||||
port = int(port)
|
||||
not_free = True
|
||||
while not_free:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||
res = sock.connect_ex((host, port))
|
||||
if res != 0:
|
||||
not_free = False
|
||||
else:
|
||||
port += 1
|
||||
return port
|
||||
|
||||
|
||||
def get_user_settings(
|
||||
_login: bool, current_user_settings: str, user_settings_copy: str
|
||||
):
|
||||
"""Login to the OpenBB Platform."""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
import getpass
|
||||
|
||||
if Path(current_user_settings).exists():
|
||||
with open(current_user_settings, encoding="utf-8") as f:
|
||||
_current_settings = json.load(f)
|
||||
else:
|
||||
_current_settings = {
|
||||
"credentials": {},
|
||||
"preferences": {},
|
||||
"defaults": {"commands": {}},
|
||||
}
|
||||
if (isinstance(_login, str) and _login.lower() == "false") or not _login:
|
||||
return _current_settings
|
||||
|
||||
pat = getpass.getpass(
|
||||
"\n\nEnter your personal access token (PAT) to authorize the API and update your local settings."
|
||||
+ "\nSkip to use a pre-configured 'user_settings.json' file."
|
||||
+ "\nPress Enter to skip or copy (entered values are not displayed on screen) your PAT to the command line: "
|
||||
)
|
||||
|
||||
if pat:
|
||||
from openbb_core.app.service.hub_service import HubService
|
||||
|
||||
hub_credentials: dict = {}
|
||||
hub_preferences: dict = {}
|
||||
hub_defaults: dict = {}
|
||||
try:
|
||||
Hub = HubService()
|
||||
_ = Hub.connect(pat=pat)
|
||||
hub_settings = Hub.pull()
|
||||
hub_credentials = json.loads(
|
||||
hub_settings.credentials.model_dump_json() # pylint: disable=no-member
|
||||
)
|
||||
hub_preferences = json.loads(
|
||||
hub_settings.preferences.model_dump_json() # pylint: disable=no-member
|
||||
)
|
||||
hub_defaults = json.loads(
|
||||
hub_settings.defaults.model_dump_json() # pylint: disable=no-member
|
||||
)
|
||||
except Exception as e: # pylint: disable=broad-exception-caught
|
||||
print( # noqa: T201
|
||||
f"\n\nError connecting with Hub:\n{e}\n\nUsing the local settings.\n"
|
||||
)
|
||||
|
||||
if hub_credentials:
|
||||
# Prompt the user to ask if they want to persist the new settings
|
||||
persist_input = (
|
||||
input(
|
||||
"\n\nDo you want to persist the new settings?"
|
||||
+ " Not recommended for public machines. (yes/no): "
|
||||
)
|
||||
.strip()
|
||||
.lower()
|
||||
)
|
||||
|
||||
if persist_input in ["yes", "y"]:
|
||||
PERSIST = True
|
||||
elif persist_input in ["no", "n"]:
|
||||
PERSIST = False
|
||||
else:
|
||||
print( # noqa: T201
|
||||
"\n\nInvalid input. Defaulting to not persisting the new settings."
|
||||
)
|
||||
PERSIST = False
|
||||
|
||||
# Save the current settings to restore at the end of the session.
|
||||
if PERSIST is False:
|
||||
with open(user_settings_copy, "w", encoding="utf-8") as f:
|
||||
json.dump(_current_settings, f, indent=4)
|
||||
|
||||
new_settings = _current_settings.copy()
|
||||
new_settings.setdefault("credentials", {})
|
||||
new_settings.setdefault("preferences", {})
|
||||
new_settings.setdefault("defaults", {"commands": {}})
|
||||
|
||||
# Update the current settings with the new settings
|
||||
if hub_credentials:
|
||||
for k, v in hub_credentials.items():
|
||||
if v:
|
||||
new_settings["credentials"][k] = v.strip('"').strip("'")
|
||||
|
||||
if hub_preferences:
|
||||
for k, v in hub_preferences.items():
|
||||
if v:
|
||||
new_settings["preferences"][k] = v
|
||||
|
||||
if hub_defaults:
|
||||
for k, v in hub_defaults.items():
|
||||
if k == "commands":
|
||||
for key, value in hub_defaults["commands"].items():
|
||||
if value:
|
||||
new_settings["defaults"]["commands"][key] = value
|
||||
elif v:
|
||||
new_settings["defaults"][k] = v
|
||||
else:
|
||||
continue
|
||||
|
||||
# Write the new settings to the user_settings.json file
|
||||
with open(current_user_settings, "w", encoding="utf-8") as f:
|
||||
json.dump(new_settings, f, indent=4)
|
||||
|
||||
_current_settings = new_settings
|
||||
|
||||
return _current_settings
|
||||
|
||||
|
||||
def get_widgets_json(_build: bool, _openapi, widget_exclude_filter: list):
|
||||
"""Generate and serve the widgets.json for the OpenBB Platform API."""
|
||||
python_path = Path(sys.executable)
|
||||
parent_path = python_path.parent if os.name == "nt" else python_path.parents[1]
|
||||
widgets_json_path = parent_path.joinpath("assets", "widgets.json").resolve()
|
||||
json_exists = widgets_json_path.exists()
|
||||
|
||||
if not json_exists:
|
||||
widgets_json_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
_build = True
|
||||
|
||||
existing_widgets_json: dict = {}
|
||||
|
||||
if json_exists:
|
||||
with open(widgets_json_path, encoding="utf-8") as f:
|
||||
existing_widgets_json = json.load(f)
|
||||
|
||||
_widgets_json = (
|
||||
existing_widgets_json
|
||||
if _build is False
|
||||
else build_json(_openapi, widget_exclude_filter)
|
||||
)
|
||||
|
||||
if _build:
|
||||
diff = DeepDiff(existing_widgets_json, _widgets_json, ignore_order=True)
|
||||
merge_prompt = None
|
||||
if diff and json_exists:
|
||||
print("Differences found:", diff) # noqa: T201
|
||||
merge_prompt = input(
|
||||
"\nDo you want to overwrite the existing widgets.json configuration?"
|
||||
"\nEnter 'n' to append existing with only new entries, or 'i' to ignore all changes. (y/n/i): "
|
||||
)
|
||||
if merge_prompt.lower().startswith("n"):
|
||||
_widgets_json.update(existing_widgets_json)
|
||||
elif merge_prompt.lower().startswith("i"):
|
||||
_widgets_json = existing_widgets_json
|
||||
|
||||
if merge_prompt is None or not merge_prompt.lower().startswith("i"):
|
||||
try:
|
||||
with open(widgets_json_path, "w", encoding="utf-8") as f:
|
||||
json.dump(_widgets_json, f, ensure_ascii=False, indent=4)
|
||||
except Exception as e: # pylint: disable=broad-exception-caught
|
||||
print( # noqa: T201
|
||||
f"Error writing widgets.json: {e}. Loading from memory instead."
|
||||
)
|
||||
_widgets_json = (
|
||||
existing_widgets_json
|
||||
if existing_widgets_json
|
||||
else build_json(_openapi, widget_exclude_filter)
|
||||
)
|
||||
|
||||
return _widgets_json
|
||||
|
||||
|
||||
def parse_args():
|
||||
"""Parse the launch script command line arguments."""
|
||||
args = sys.argv[1:].copy()
|
||||
_kwargs: dict = {}
|
||||
for i, arg in enumerate(args):
|
||||
if arg == "--help":
|
||||
print(LAUNCH_SCRIPT_DESCRIPTION) # noqa: T201
|
||||
sys.exit(0)
|
||||
if arg.startswith("--"):
|
||||
key = arg[2:]
|
||||
if key in ["no-use-colors", "use-colors"]:
|
||||
_kwargs["use_colors"] = key == "use-colors"
|
||||
elif i + 1 < len(args) and not args[i + 1].startswith("--"):
|
||||
value = args[i + 1]
|
||||
if isinstance(value, str) and value.lower() in ["false", "true"]:
|
||||
_kwargs[key] = value.lower() == "true"
|
||||
else:
|
||||
_kwargs[key] = value
|
||||
else:
|
||||
_kwargs[key] = True
|
||||
|
||||
return _kwargs
|
||||
@@ -0,0 +1,454 @@
|
||||
"""OpenAPI parsing Utils."""
|
||||
|
||||
from openbb_core.provider.utils.helpers import to_snake_case
|
||||
|
||||
|
||||
def extract_providers(params: list[dict]) -> list[str]:
|
||||
"""
|
||||
Extract provider options from parameters.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
params : List[Dict]
|
||||
List of parameter dictionaries.
|
||||
|
||||
Returns
|
||||
-------
|
||||
List[str]
|
||||
List of provider options.
|
||||
"""
|
||||
provider_params = [p for p in params if p["name"] == "provider"]
|
||||
if provider_params:
|
||||
return provider_params[0].get("schema", {}).get("enum", [])
|
||||
return []
|
||||
|
||||
|
||||
def set_parameter_type(p: dict, p_schema: dict):
|
||||
"""
|
||||
Determine and set the type for the parameter.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
p : Dict
|
||||
Processed parameter dictionary.
|
||||
p_schema : Dict
|
||||
Schema dictionary for the parameter.
|
||||
"""
|
||||
p_type = p_schema.get("type") if not p.get("type") else p.get("type")
|
||||
|
||||
if p_type == "string":
|
||||
p["type"] = "text"
|
||||
|
||||
if p_type in ("float", "integer") or (
|
||||
not isinstance(p["value"], bool) and isinstance(p["value"], (int, float))
|
||||
):
|
||||
p["type"] = "number"
|
||||
|
||||
if (
|
||||
p_type == "boolean"
|
||||
or p_schema.get("type") == "boolean"
|
||||
or ("anyOf" in p_schema and p_schema["anyOf"][0].get("type") == "boolean")
|
||||
):
|
||||
p["type"] = "boolean"
|
||||
|
||||
if "date" in p["parameter_name"]:
|
||||
p["type"] = "date"
|
||||
|
||||
if "timeframe" in p["parameter_name"]:
|
||||
p["type"] = "text"
|
||||
|
||||
if p["parameter_name"] == "limit":
|
||||
p["type"] = "number"
|
||||
|
||||
if p.get("type") in ("array", "list") or isinstance(p.get("type"), list):
|
||||
p["type"] = "text"
|
||||
|
||||
return p
|
||||
|
||||
|
||||
def set_parameter_options(p: dict, p_schema: dict, providers: list[str]) -> dict:
|
||||
"""
|
||||
Set options for the parameter based on the schema.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
p : Dict
|
||||
Processed parameter dictionary.
|
||||
p_schema : Dict
|
||||
Schema dictionary for the parameter.
|
||||
providers : List[str]
|
||||
List of provider options.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Dict
|
||||
Updated parameter dictionary with options.
|
||||
"""
|
||||
choices: dict[str, list[dict[str, str]]] = {}
|
||||
multiple_items_allowed_dict: dict = {}
|
||||
is_provider_specific = False
|
||||
available_providers: set = set()
|
||||
unique_general_choices: list = []
|
||||
|
||||
# Handle provider-specific choices
|
||||
for provider in providers:
|
||||
if (provider in p_schema) or (len(providers) == 1):
|
||||
is_provider_specific = True
|
||||
provider_choices: list = []
|
||||
if provider not in available_providers:
|
||||
available_providers.add(provider)
|
||||
if provider in p_schema:
|
||||
provider_choices = p_schema[provider].get("choices", [])
|
||||
elif len(providers) == 1 and "enum" in p_schema:
|
||||
provider_choices = p_schema["enum"]
|
||||
p_schema.pop("enum")
|
||||
if provider_choices:
|
||||
choices[provider] = [
|
||||
{"label": str(c), "value": c} for c in provider_choices
|
||||
]
|
||||
if provider in p_schema and p_schema[provider].get(
|
||||
"multiple_items_allowed", False
|
||||
):
|
||||
multiple_items_allowed_dict[provider] = True
|
||||
|
||||
# Check title for provider-specific information
|
||||
if "title" in p_schema:
|
||||
title_providers = set(p_schema["title"].split(","))
|
||||
if title_providers.intersection(providers):
|
||||
is_provider_specific = True
|
||||
available_providers.update(title_providers)
|
||||
|
||||
# Handle general choices
|
||||
general_choices: list = []
|
||||
if "enum" in p_schema:
|
||||
general_choices.extend(
|
||||
[
|
||||
{"label": str(c), "value": c}
|
||||
for c in p_schema["enum"]
|
||||
if c not in ["null", None]
|
||||
]
|
||||
)
|
||||
elif "anyOf" in p_schema:
|
||||
for sub_schema in p_schema["anyOf"]:
|
||||
if "enum" in sub_schema:
|
||||
general_choices.extend(
|
||||
[
|
||||
{"label": str(c), "value": c}
|
||||
for c in sub_schema["enum"]
|
||||
if c not in ["null", None]
|
||||
]
|
||||
)
|
||||
|
||||
if general_choices:
|
||||
# Remove duplicates by converting list of dicts to a set of tuples and back to list of dicts
|
||||
unique_general_choices = [
|
||||
dict(t) for t in {tuple(d.items()) for d in general_choices}
|
||||
]
|
||||
if not is_provider_specific:
|
||||
if len(providers) == 1:
|
||||
choices[providers[0]] = unique_general_choices
|
||||
multiple_items_allowed_dict[providers[0]] = p_schema.get(
|
||||
"multiple_items_allowed", False
|
||||
)
|
||||
else:
|
||||
choices["other"] = unique_general_choices
|
||||
multiple_items_allowed_dict["other"] = p_schema.get(
|
||||
"multiple_items_allowed", False
|
||||
)
|
||||
|
||||
# Use general choices as fallback for providers without specific options
|
||||
for provider in available_providers:
|
||||
if provider not in choices:
|
||||
if "anyOf" in p_schema and p_schema["anyOf"]:
|
||||
fallback_choices = p_schema["anyOf"][0].get("enum", [])
|
||||
choices[provider] = [
|
||||
{"label": str(c), "value": c}
|
||||
for c in fallback_choices
|
||||
if c not in ["null", None]
|
||||
]
|
||||
else:
|
||||
choices[provider] = unique_general_choices
|
||||
|
||||
p["options"] = choices
|
||||
p["multiple_items_allowed"] = multiple_items_allowed_dict
|
||||
|
||||
if is_provider_specific:
|
||||
p["available_providers"] = list(available_providers)
|
||||
|
||||
return p
|
||||
|
||||
|
||||
def process_parameter(param: dict, providers: list[str]) -> dict:
|
||||
"""
|
||||
Process a single parameter and return the processed dictionary.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
param : Dict
|
||||
Parameter dictionary.
|
||||
providers : List[str]
|
||||
List of provider options.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Dict
|
||||
Processed parameter dictionary.
|
||||
"""
|
||||
p: dict = {}
|
||||
param_name = param["name"]
|
||||
p["parameter_name"] = param_name
|
||||
p["label"] = (
|
||||
param_name.replace("_", " ").replace("fixedincome", "fixed income").title()
|
||||
)
|
||||
p["description"] = (
|
||||
(param.get("description", param_name).split(" (provider:")[0].strip())
|
||||
.split("Multiple comma separated items allowed")[0]
|
||||
.strip()
|
||||
)
|
||||
p["optional"] = param.get("required", False) is False
|
||||
|
||||
if param_name == "provider":
|
||||
p["type"] = "text"
|
||||
p["label"] = "Provider"
|
||||
p["description"] = "Source of the data."
|
||||
p["available_providers"] = providers
|
||||
return p
|
||||
|
||||
if param_name in ["symbol", "series_id", "release_id"]:
|
||||
p["type"] = "text"
|
||||
p["label"] = param_name.title().replace("_", " ").replace("Id", "ID")
|
||||
p["description"] = (
|
||||
p["description"]
|
||||
.split("Multiple comma separated items allowed for provider(s)")[0]
|
||||
.strip()
|
||||
)
|
||||
multiple_items_allowed_dict: dict = {}
|
||||
for _provider in providers:
|
||||
if _provider in param["schema"] and param["schema"][_provider].get(
|
||||
"multiple_items_allowed", False
|
||||
):
|
||||
multiple_items_allowed_dict[_provider] = True
|
||||
p["multiple_items_allowed"] = multiple_items_allowed_dict
|
||||
if "Multiple comma separated items allowed" in p["description"]:
|
||||
p["description"] = (
|
||||
p["description"]
|
||||
.split("Multiple comma separated items allowed")[0]
|
||||
.strip()
|
||||
)
|
||||
return p
|
||||
|
||||
p_schema = param.get("schema", {})
|
||||
p["value"] = p_schema.get("default", None)
|
||||
p = set_parameter_options(p, p_schema, providers)
|
||||
p = set_parameter_type(p, p_schema)
|
||||
|
||||
return p
|
||||
|
||||
|
||||
def get_query_schema_for_widget(
|
||||
openapi_json: dict, command_route: str
|
||||
) -> tuple[list[dict], bool]:
|
||||
"""
|
||||
Extract the query schema for a widget.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
openapi_json : dict
|
||||
The OpenAPI specification as a dictionary.
|
||||
command_route : str
|
||||
The route of the command in the OpenAPI specification.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Tuple[List[Dict], bool]
|
||||
A tuple containing the list of processed parameters and a boolean indicating if a chart is present.
|
||||
"""
|
||||
has_chart = False
|
||||
command = openapi_json["paths"][command_route]
|
||||
schema_method = list(command)[0]
|
||||
command = command[schema_method]
|
||||
params = command.get("parameters", [])
|
||||
route_params: list[dict] = []
|
||||
providers: list[str] = extract_providers(params)
|
||||
|
||||
for param in params:
|
||||
if param["name"] in ["sort", "order"]:
|
||||
continue
|
||||
if param["name"] == "chart":
|
||||
has_chart = True
|
||||
continue
|
||||
|
||||
p = process_parameter(param, providers)
|
||||
p["show"] = True
|
||||
route_params.append(p)
|
||||
|
||||
return route_params, has_chart
|
||||
|
||||
|
||||
def get_data_schema_for_widget(openapi_json, operation_id):
|
||||
"""
|
||||
Get the data schema for a widget based on its operationId.
|
||||
|
||||
Args:
|
||||
openapi (dict): The OpenAPI specification as a dictionary.
|
||||
operation_id (str): The operationId of the widget.
|
||||
|
||||
Returns:
|
||||
dict: The schema dictionary for the widget's data.
|
||||
"""
|
||||
# Find the route and method for the given operationId
|
||||
for _, methods in openapi_json["paths"].items():
|
||||
for _, details in methods.items():
|
||||
if details.get("operationId") == operation_id:
|
||||
# Get the reference to the schema from the successful response
|
||||
response_ref = details["responses"]["200"]["content"][
|
||||
"application/json"
|
||||
]["schema"]["$ref"]
|
||||
# Extract the schema name from the reference
|
||||
schema_name = response_ref.split("/")[-1]
|
||||
# Fetch and return the schema from components
|
||||
return (
|
||||
openapi_json["components"]["schemas"][schema_name]
|
||||
.get("properties", {})
|
||||
.get("results", {})
|
||||
)
|
||||
|
||||
# Return None if the schema is not found
|
||||
return None
|
||||
|
||||
|
||||
def data_schema_to_columns_defs(openapi_json, operation_id, provider):
|
||||
"""Convert data schema to column definitions for the widget."""
|
||||
# Initialize an empty list to hold the schema references
|
||||
schema_refs: list = []
|
||||
|
||||
result_schema_ref = get_data_schema_for_widget(openapi_json, operation_id)
|
||||
# Check if 'anyOf' is in the result_schema_ref and handle the nested structure
|
||||
if "anyOf" in result_schema_ref:
|
||||
for item in result_schema_ref["anyOf"]:
|
||||
# When there are multiple providers a 'oneOf' is used
|
||||
if "items" in item and "oneOf" in item["items"]:
|
||||
# Extract the $ref values
|
||||
schema_refs.extend(
|
||||
[
|
||||
oneOf_item["$ref"].split("/")[-1]
|
||||
for oneOf_item in item["items"]["oneOf"]
|
||||
if "$ref" in oneOf_item
|
||||
]
|
||||
)
|
||||
# When there's only one model there is no oneOf
|
||||
elif "items" in item and "$ref" in item["items"]:
|
||||
schema_refs.append(item["items"]["$ref"].split("/")[-1])
|
||||
|
||||
# Fetch the schemas using the extracted references
|
||||
schemas = [
|
||||
openapi_json["components"]["schemas"][ref]
|
||||
for ref in schema_refs
|
||||
if ref in openapi_json["components"]["schemas"]
|
||||
]
|
||||
|
||||
# Proceed with finding common keys and generating column definitions
|
||||
if not schemas:
|
||||
return []
|
||||
|
||||
target_schema: dict = {}
|
||||
|
||||
if len(schemas) == 1:
|
||||
target_schema = schemas[0]
|
||||
else:
|
||||
for schema in schemas:
|
||||
if (
|
||||
schema.get("description", "")
|
||||
.lower()
|
||||
.startswith(provider.lower().replace("tradingeconomics", "te"))
|
||||
) or (schema.get("description", "").lower().startswith("us government")):
|
||||
target_schema = schema
|
||||
break
|
||||
|
||||
keys = list(target_schema.get("properties", {}))
|
||||
|
||||
column_defs: list = []
|
||||
for key in keys:
|
||||
cell_data_type = None
|
||||
formatterFn = None
|
||||
prop = target_schema.get("properties", {}).get(key)
|
||||
# Handle prop types for both when there's a single prop type or multiple
|
||||
if "anyOf" in prop:
|
||||
types = [
|
||||
sub_prop.get("type") for sub_prop in prop["anyOf"] if "type" in sub_prop
|
||||
]
|
||||
if "number" in types or "integer" in types or "float" in types:
|
||||
cell_data_type = "number"
|
||||
elif "string" in types and any(
|
||||
sub_prop.get("format") in ["date", "date-time"]
|
||||
for sub_prop in prop["anyOf"]
|
||||
if "format" in sub_prop
|
||||
):
|
||||
cell_data_type = "date"
|
||||
else:
|
||||
cell_data_type = "text"
|
||||
else:
|
||||
prop_type = prop.get("type", None)
|
||||
if prop_type in ["number", "integer", "float"]:
|
||||
cell_data_type = "number"
|
||||
if prop_type == "integer":
|
||||
formatterFn = "int"
|
||||
elif "format" in prop and prop["format"] in ["date", "date-time"]:
|
||||
cell_data_type = "date"
|
||||
else:
|
||||
cell_data_type = "text"
|
||||
|
||||
column_def: dict = {}
|
||||
# OpenAPI changes some of the field names.
|
||||
k = to_snake_case(key)
|
||||
column_def["field"] = k
|
||||
if k in [
|
||||
"symbol",
|
||||
"symbol_root",
|
||||
"series_id",
|
||||
"date",
|
||||
"published",
|
||||
"fiscal_year",
|
||||
"period_ending",
|
||||
"period_beginning",
|
||||
"order",
|
||||
"name",
|
||||
"title",
|
||||
"cusip",
|
||||
"isin",
|
||||
]:
|
||||
column_def["pinned"] = "left"
|
||||
|
||||
column_def["formatterFn"] = formatterFn
|
||||
column_def["headerName"] = prop.get("title", key.title())
|
||||
column_def["description"] = prop.get(
|
||||
"description", prop.get("title", key.title())
|
||||
)
|
||||
column_def["cellDataType"] = cell_data_type
|
||||
column_def["chartDataType"] = (
|
||||
"series"
|
||||
if cell_data_type in ["number", "integer", "float"]
|
||||
and column_def.get("pinned") != "left"
|
||||
else "category"
|
||||
)
|
||||
measurement = prop.get("x-unit_measurement")
|
||||
|
||||
if measurement == "percent":
|
||||
column_def["formatterFn"] = (
|
||||
"normalizedPercent"
|
||||
if prop.get("x-frontend_multiply") == 100
|
||||
else "percent"
|
||||
)
|
||||
column_def["renderFn"] = "greenRed"
|
||||
elif cell_data_type == "number":
|
||||
del column_def["formatterFn"]
|
||||
|
||||
if k in ["cik", "isin", "figi", "cusip", "sedol", "symbol"]:
|
||||
column_def["cellDataType"] = "text"
|
||||
column_def["headerName"] = (
|
||||
column_def["headerName"].upper() if k != "symbol" else "Symbol"
|
||||
)
|
||||
|
||||
column_defs.append(column_def)
|
||||
|
||||
return column_defs
|
||||
@@ -0,0 +1,243 @@
|
||||
"""Utils for building the widgets.json file."""
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
TO_CAPS_STRINGS = [
|
||||
"Pe",
|
||||
"Sloos",
|
||||
"Eps",
|
||||
"Ebitda",
|
||||
"Otc",
|
||||
"Cpi",
|
||||
"Pce",
|
||||
"Gdp",
|
||||
"Lbma",
|
||||
"Ipo",
|
||||
"Nbbo",
|
||||
"Ameribor",
|
||||
"Sonia",
|
||||
"Effr",
|
||||
"Sofr",
|
||||
"Iorb",
|
||||
"Estr",
|
||||
"Ecb",
|
||||
"Dpcredit",
|
||||
"Tcm",
|
||||
"Us",
|
||||
"Ice",
|
||||
"Bofa",
|
||||
"Hqm",
|
||||
"Sp500",
|
||||
"Sec",
|
||||
"Cftc",
|
||||
"Cot",
|
||||
"Etf",
|
||||
"Eu",
|
||||
"Tips",
|
||||
"Rss",
|
||||
"Sic",
|
||||
"Cik",
|
||||
"Bls",
|
||||
"Fred",
|
||||
"Cusip",
|
||||
]
|
||||
|
||||
|
||||
def modify_query_schema(query_schema: list[dict], provider_value: str):
|
||||
"""Modify query_schema and the description for the current provider."""
|
||||
modified_query_schema: list = []
|
||||
for item in query_schema:
|
||||
# copy the item
|
||||
_item = deepcopy(item)
|
||||
provider_value_options: dict = {}
|
||||
|
||||
# Exclude provider parameter. Those will be added last.
|
||||
if "parameter_name" in _item and _item["parameter_name"] == "provider":
|
||||
continue
|
||||
|
||||
# Exclude parameters that are not available for the current provider.
|
||||
if (
|
||||
"available_providers" in _item
|
||||
and provider_value not in _item["available_providers"]
|
||||
):
|
||||
continue
|
||||
|
||||
if provider_value in _item["multiple_items_allowed"] and _item[
|
||||
"multiple_items_allowed"
|
||||
].get(provider_value, False):
|
||||
_item["description"] = (
|
||||
_item["description"] + " Multiple comma separated items allowed."
|
||||
)
|
||||
_item["type"] = "text"
|
||||
_item["multiSelect"] = True
|
||||
|
||||
if "options" in _item:
|
||||
provider_value_options = _item.pop("options")
|
||||
|
||||
if provider_value in provider_value_options and bool(
|
||||
provider_value_options[provider_value]
|
||||
):
|
||||
_item["options"] = provider_value_options[provider_value]
|
||||
_item["type"] = "text"
|
||||
elif len(provider_value_options) == 1 and "other" in provider_value_options:
|
||||
_item["options"] = provider_value_options["other"]
|
||||
_item["type"] = "text"
|
||||
|
||||
_item.pop("multiple_items_allowed")
|
||||
|
||||
if "available_providers" in _item:
|
||||
_item.pop("available_providers")
|
||||
|
||||
_item["paramName"] = _item.pop("parameter_name")
|
||||
|
||||
modified_query_schema.append(_item)
|
||||
|
||||
if provider_value != "custom":
|
||||
modified_query_schema.append(
|
||||
{"paramName": "provider", "value": provider_value, "show": False}
|
||||
)
|
||||
|
||||
return modified_query_schema
|
||||
|
||||
|
||||
def build_json(openapi: dict, widget_exclude_filter: list):
|
||||
"""Build the widgets.json file."""
|
||||
# pylint: disable=import-outside-toplevel
|
||||
from .openapi import data_schema_to_columns_defs, get_query_schema_for_widget
|
||||
|
||||
if not openapi:
|
||||
return {}
|
||||
|
||||
widgets_json: dict = {}
|
||||
routes = [
|
||||
p
|
||||
for p in openapi["paths"]
|
||||
if p.startswith("/api") and "get" in openapi["paths"][p]
|
||||
]
|
||||
for route in routes:
|
||||
route_api = openapi["paths"][route]
|
||||
method = list(route_api)[0]
|
||||
widget_id = route_api[method]["operationId"]
|
||||
|
||||
# Prepare the query schema of the widget
|
||||
query_schema, has_chart = get_query_schema_for_widget(openapi, route)
|
||||
|
||||
# Extract providers from the query schema
|
||||
providers: list = []
|
||||
for item in query_schema:
|
||||
if item["parameter_name"] == "provider":
|
||||
providers = item["available_providers"]
|
||||
|
||||
if not providers:
|
||||
providers = ["custom"]
|
||||
|
||||
for provider in providers:
|
||||
columns_defs = data_schema_to_columns_defs(openapi, widget_id, provider)
|
||||
_cat = route.split("v1/")[-1]
|
||||
_cats = _cat.split("/")
|
||||
category = _cats[0].title()
|
||||
category = category.replace("Fixedincome", "Fixed Income")
|
||||
subcat = _cats[1].title().replace("_", " ") if len(_cats) > 2 else None
|
||||
name = (
|
||||
widget_id.replace("fixedincome", "fixed income")
|
||||
.replace("_", " ")
|
||||
.title()
|
||||
.replace(category if category else "", "")
|
||||
.replace(subcat if subcat else "", "")
|
||||
.strip()
|
||||
)
|
||||
|
||||
name = " ".join(
|
||||
[
|
||||
(word.upper() if word in TO_CAPS_STRINGS else word)
|
||||
for word in name.split()
|
||||
]
|
||||
)
|
||||
|
||||
modified_query_schema = modify_query_schema(query_schema, provider)
|
||||
|
||||
provider_map = {
|
||||
"tmx": "TMX",
|
||||
"ecb": "ECB",
|
||||
"econdb": "EconDB",
|
||||
"fmp": "FMP",
|
||||
"oecd": "OECD",
|
||||
"finra": "FINRA",
|
||||
"fred": "FRED",
|
||||
"imf": "IMF",
|
||||
"bls": "BLS",
|
||||
"yfinance": "yFinance",
|
||||
"sec": "SEC",
|
||||
"cftc": "CFTC",
|
||||
"tradingeconomics": "Trading Economics",
|
||||
"wsj": "WSJ",
|
||||
}
|
||||
provider_name = provider_map.get(
|
||||
provider.lower(), provider.replace("_", " ").title()
|
||||
)
|
||||
|
||||
widget_config = {
|
||||
"name": f"{name}",
|
||||
"description": route_api["get"]["description"],
|
||||
"category": category,
|
||||
"searchCategory": category,
|
||||
"widgetId": f"{widget_id}_{provider}_obb",
|
||||
"params": modified_query_schema,
|
||||
"endpoint": route.replace("/api", "api"),
|
||||
"gridData": {"w": 45, "h": 15},
|
||||
"data": {
|
||||
"dataKey": "results",
|
||||
"table": {
|
||||
"showAll": True,
|
||||
},
|
||||
},
|
||||
"source": [provider_name],
|
||||
}
|
||||
|
||||
if subcat:
|
||||
subcat = " ".join(
|
||||
[
|
||||
(word.upper() if word in TO_CAPS_STRINGS else word)
|
||||
for word in subcat.split()
|
||||
]
|
||||
)
|
||||
subcat = (
|
||||
subcat.replace("Estimates", "Analyst Estimates")
|
||||
.replace("Fundamental", "Fundamental Analysis")
|
||||
.replace("Compare", "Comparison Analysis")
|
||||
)
|
||||
widget_config["subCategory"] = subcat
|
||||
|
||||
if columns_defs:
|
||||
widget_config["data"]["table"]["columnsDefs"] = columns_defs
|
||||
|
||||
# Add the widget configuration to the widgets.json
|
||||
if widget_config["widgetId"] not in widget_exclude_filter:
|
||||
widgets_json[widget_config["widgetId"]] = widget_config
|
||||
|
||||
if has_chart:
|
||||
widget_config_chart = deepcopy(widget_config)
|
||||
widget_config_chart["name"] = widget_config_chart["name"] + " (Chart)"
|
||||
widget_config_chart["widgetId"] = (
|
||||
f"{widget_config_chart['widgetId']}_chart"
|
||||
)
|
||||
widget_config_chart["params"].append(
|
||||
{
|
||||
"paramName": "chart",
|
||||
"label": "Chart",
|
||||
"description": "Returns chart",
|
||||
"optional": True,
|
||||
"value": True,
|
||||
"type": "boolean",
|
||||
"show": False,
|
||||
},
|
||||
)
|
||||
widget_config_chart["searchCategory"] = "chart"
|
||||
widget_config_chart["gridData"]["h"] = 20
|
||||
widget_config_chart["gridData"]["w"] = 50
|
||||
widget_config_chart["defaultViz"] = "chart"
|
||||
widget_config_chart["data"]["dataKey"] = "chart.content"
|
||||
if widget_config_chart["widgetId"] not in widget_exclude_filter:
|
||||
widgets_json[widget_config_chart["widgetId"]] = widget_config_chart
|
||||
|
||||
return widgets_json
|
||||
3024
openbb_platform/extensions/platform_api/poetry.lock
generated
vendored
Normal file
27
openbb_platform/extensions/platform_api/pyproject.toml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
[tool.poetry]
|
||||
name = "openbb-platform-api"
|
||||
version = "1.0.2"
|
||||
description = "OpenBB Platform API: Launch script and widgets builder for the OpenBB Platform API and Terminal Pro Connector."
|
||||
authors = ["OpenBB <hello@openbb.co>"]
|
||||
license = "AGPL-3.0-only"
|
||||
readme = "README.md"
|
||||
homepage = "https://openbb.co"
|
||||
repository = "https://github.com/openbb-finance/openbb"
|
||||
documentation = "https://docs.openbb.co"
|
||||
packages = [{ include = "openbb_platform_api" }]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
openbb-api = "openbb_platform_api.main:main"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.13"
|
||||
poetry = "^1.8"
|
||||
setuptools = "*"
|
||||
openbb-core = "*"
|
||||
deepdiff = "*"
|
||||
ruff = "*"
|
||||
black = "*"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
6357
openbb_platform/extensions/platform_api/tests/mock_openapi.json
vendored
Normal file
3615
openbb_platform/extensions/platform_api/tests/mock_widgets.json
vendored
Normal file
78
openbb_platform/extensions/platform_api/tests/test_api.py
Normal file
@@ -0,0 +1,78 @@
|
||||
from unittest.mock import MagicMock, mock_open, patch
|
||||
|
||||
import pytest
|
||||
from openbb_platform_api.utils.api import (
|
||||
check_port,
|
||||
get_user_settings,
|
||||
get_widgets_json,
|
||||
parse_args,
|
||||
)
|
||||
|
||||
|
||||
# Mock environment variables
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_env_vars(monkeypatch):
|
||||
monkeypatch.setenv("HOME", "/mock/home")
|
||||
monkeypatch.setenv("USERPROFILE", "/mock/home")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("port_input", [6900, "6900", 6901, "6901"])
|
||||
def test_check_port(port_input):
|
||||
with patch("socket.socket") as mock_socket:
|
||||
mock_sock_instance = MagicMock()
|
||||
mock_socket.return_value.__enter__.return_value = mock_sock_instance
|
||||
|
||||
# Mock connect_ex to return 0 for port 6900 (indicating it's in use)
|
||||
mock_sock_instance.connect_ex.side_effect = lambda addr: (
|
||||
0 if addr[1] == 6900 else 1
|
||||
)
|
||||
|
||||
port = check_port("127.0.0.1", port_input)
|
||||
assert port == 6901 # The next available port should be 6901
|
||||
|
||||
|
||||
def test_get_user_settings_no_login():
|
||||
with patch(
|
||||
"builtins.open",
|
||||
mock_open(
|
||||
read_data='{"credentials": {}, "preferences": {}, "defaults": {"commands": {}}}'
|
||||
),
|
||||
):
|
||||
settings = get_user_settings(
|
||||
_login=False, current_user_settings="", user_settings_copy=""
|
||||
)
|
||||
assert settings == {
|
||||
"credentials": {},
|
||||
"preferences": {},
|
||||
"defaults": {"commands": {}},
|
||||
}
|
||||
|
||||
|
||||
def test_get_widgets_json_no_build():
|
||||
with patch("builtins.open", mock_open(read_data="{}")), patch(
|
||||
"os.path.exists", return_value=True
|
||||
):
|
||||
widgets_json = get_widgets_json(
|
||||
_build=False, _openapi={}, widget_exclude_filter=[]
|
||||
)
|
||||
assert widgets_json == {}
|
||||
|
||||
|
||||
def test_parse_args():
|
||||
with patch("sys.argv", ["script.py", "--help"]):
|
||||
with pytest.raises(SystemExit) as e:
|
||||
parse_args()
|
||||
assert e.type == SystemExit
|
||||
assert e.value.code == 0
|
||||
|
||||
with patch("sys.argv", ["script.py", "--key", "value"]):
|
||||
args = parse_args()
|
||||
assert args == {"key": "value"}
|
||||
|
||||
with patch("sys.argv", ["script.py", "--flag"]):
|
||||
args = parse_args()
|
||||
assert args == {"flag": True}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main()
|
||||
@@ -0,0 +1,397 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from openbb_platform_api.utils.openapi import (
|
||||
data_schema_to_columns_defs,
|
||||
get_data_schema_for_widget,
|
||||
get_query_schema_for_widget,
|
||||
)
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
|
||||
# Load the mock OpenAPI JSON
|
||||
@pytest.fixture(scope="module")
|
||||
def mock_openapi_json():
|
||||
mock_openapi_path = Path(__file__).parent / "mock_openapi.json"
|
||||
with open(mock_openapi_path) as file:
|
||||
return json.load(file)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"path, params_number, query_schema, expected_has_chart",
|
||||
[
|
||||
(
|
||||
"/api/v1/economy/balance_of_payments",
|
||||
4,
|
||||
[
|
||||
{
|
||||
"parameter_name": "provider",
|
||||
"label": "Provider",
|
||||
"description": "Source of the data.",
|
||||
"optional": True,
|
||||
"type": "text",
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "country",
|
||||
"label": "Country",
|
||||
"description": "The country to get data. Enter as a 3-letter ISO country code, default is USA.",
|
||||
"optional": True,
|
||||
"value": "united_states",
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "argentina", "value": "argentina"},
|
||||
{"label": "australia", "value": "australia"},
|
||||
{"label": "austria", "value": "austria"},
|
||||
{"label": "belgium", "value": "belgium"},
|
||||
{"label": "brazil", "value": "brazil"},
|
||||
{"label": "canada", "value": "canada"},
|
||||
{"label": "chile", "value": "chile"},
|
||||
{"label": "china", "value": "china"},
|
||||
{"label": "colombia", "value": "colombia"},
|
||||
{"label": "costa_rica", "value": "costa_rica"},
|
||||
{"label": "czechia", "value": "czechia"},
|
||||
{"label": "denmark", "value": "denmark"},
|
||||
{"label": "estonia", "value": "estonia"},
|
||||
{"label": "finland", "value": "finland"},
|
||||
{"label": "france", "value": "france"},
|
||||
{"label": "germany", "value": "germany"},
|
||||
{"label": "greece", "value": "greece"},
|
||||
{"label": "hungary", "value": "hungary"},
|
||||
{"label": "iceland", "value": "iceland"},
|
||||
{"label": "india", "value": "india"},
|
||||
{"label": "indonesia", "value": "indonesia"},
|
||||
{"label": "ireland", "value": "ireland"},
|
||||
{"label": "israel", "value": "israel"},
|
||||
{"label": "italy", "value": "italy"},
|
||||
{"label": "japan", "value": "japan"},
|
||||
{"label": "korea", "value": "korea"},
|
||||
{"label": "latvia", "value": "latvia"},
|
||||
{"label": "lithuania", "value": "lithuania"},
|
||||
{"label": "luxembourg", "value": "luxembourg"},
|
||||
{"label": "mexico", "value": "mexico"},
|
||||
{"label": "netherlands", "value": "netherlands"},
|
||||
{"label": "new_zealand", "value": "new_zealand"},
|
||||
{"label": "norway", "value": "norway"},
|
||||
{"label": "poland", "value": "poland"},
|
||||
{"label": "portugal", "value": "portugal"},
|
||||
{"label": "russia", "value": "russia"},
|
||||
{"label": "saudi_arabia", "value": "saudi_arabia"},
|
||||
{"label": "slovak_republic", "value": "slovak_republic"},
|
||||
{"label": "slovenia", "value": "slovenia"},
|
||||
{"label": "south_africa", "value": "south_africa"},
|
||||
{"label": "spain", "value": "spain"},
|
||||
{"label": "sweden", "value": "sweden"},
|
||||
{"label": "switzerland", "value": "switzerland"},
|
||||
{"label": "turkey", "value": "turkey"},
|
||||
{"label": "united_kingdom", "value": "united_kingdom"},
|
||||
{"label": "united_states", "value": "united_states"},
|
||||
{"label": "g7", "value": "g7"},
|
||||
{"label": "g20", "value": "g20"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "text",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "start_date",
|
||||
"label": "Start Date",
|
||||
"description": "Start date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "end_date",
|
||||
"label": "End Date",
|
||||
"description": "End date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
],
|
||||
False,
|
||||
),
|
||||
(
|
||||
"/api/v1/economy/fred_series",
|
||||
8,
|
||||
[
|
||||
{
|
||||
"parameter_name": "provider",
|
||||
"label": "Provider",
|
||||
"description": "Source of the data.",
|
||||
"optional": True,
|
||||
"type": "text",
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "symbol",
|
||||
"label": "Symbol",
|
||||
"description": "Symbol to get data for.",
|
||||
"optional": False,
|
||||
"type": "text",
|
||||
"multiple_items_allowed": {"fred": True},
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "start_date",
|
||||
"label": "Start Date",
|
||||
"description": "Start date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "end_date",
|
||||
"label": "End Date",
|
||||
"description": "End date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "limit",
|
||||
"label": "Limit",
|
||||
"description": "The number of data entries to return.",
|
||||
"optional": True,
|
||||
"value": 100000,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "number",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "frequency",
|
||||
"label": "Frequency",
|
||||
"description": "Frequency aggregation to convert high frequency data to lower frequency."
|
||||
+ "\n "
|
||||
+ "\n None = No change"
|
||||
+ "\n "
|
||||
+ "\n a = Annual\n "
|
||||
+ "\n q = Quarterly\n "
|
||||
+ "\n m = Monthly\n "
|
||||
+ "\n w = Weekly\n "
|
||||
+ "\n d = Daily\n "
|
||||
+ "\n wef = Weekly, Ending Friday"
|
||||
+ "\n "
|
||||
+ "\n weth = Weekly, Ending Thursday"
|
||||
+ "\n "
|
||||
+ "\n wew = Weekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n wetu = Weekly, Ending Tuesday"
|
||||
+ "\n "
|
||||
+ "\n wem = Weekly, Ending Monday"
|
||||
+ "\n "
|
||||
+ "\n wesu = Weekly, Ending Sunday"
|
||||
+ "\n "
|
||||
+ "\n wesa = Weekly, Ending Saturday"
|
||||
+ "\n "
|
||||
+ "\n bwew = Biweekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n bwem = Biweekly, Ending Monday",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "a", "value": "a"},
|
||||
{"label": "q", "value": "q"},
|
||||
{"label": "m", "value": "m"},
|
||||
{"label": "w", "value": "w"},
|
||||
{"label": "d", "value": "d"},
|
||||
{"label": "wef", "value": "wef"},
|
||||
{"label": "weth", "value": "weth"},
|
||||
{"label": "wew", "value": "wew"},
|
||||
{"label": "wetu", "value": "wetu"},
|
||||
{"label": "wem", "value": "wem"},
|
||||
{"label": "wesu", "value": "wesu"},
|
||||
{"label": "wesa", "value": "wesa"},
|
||||
{"label": "bwew", "value": "bwew"},
|
||||
{"label": "bwem", "value": "bwem"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "aggregation_method",
|
||||
"label": "Aggregation Method",
|
||||
"description": "A key that indicates the aggregation method used for frequency aggregation."
|
||||
+ "\n This parameter has no affect if the frequency parameter is not set."
|
||||
+ "\n "
|
||||
+ "\n avg = Average"
|
||||
+ "\n "
|
||||
+ "\n sum = Sum"
|
||||
+ "\n "
|
||||
+ "\n eop = End of Period",
|
||||
"optional": True,
|
||||
"value": "eop",
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "avg", "value": "avg"},
|
||||
{"label": "sum", "value": "sum"},
|
||||
{"label": "eop", "value": "eop"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "transform",
|
||||
"label": "Transform",
|
||||
"description": "Transformation type"
|
||||
+ "\n "
|
||||
+ "\n None = No transformation"
|
||||
+ "\n "
|
||||
+ "\n chg = Change"
|
||||
+ "\n "
|
||||
+ "\n ch1 = Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pch = Percent Change"
|
||||
+ "\n "
|
||||
+ "\n pc1 = Percent Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pca = Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cch = Continuously Compounded Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cca = Continuously Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n log = Natural Log",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "chg", "value": "chg"},
|
||||
{"label": "ch1", "value": "ch1"},
|
||||
{"label": "pch", "value": "pch"},
|
||||
{"label": "pc1", "value": "pc1"},
|
||||
{"label": "pca", "value": "pca"},
|
||||
{"label": "cch", "value": "cch"},
|
||||
{"label": "cca", "value": "cca"},
|
||||
{"label": "log", "value": "log"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
],
|
||||
True,
|
||||
),
|
||||
(
|
||||
"/api/v1/regulators/sec/schema_files",
|
||||
4,
|
||||
[
|
||||
{
|
||||
"parameter_name": "provider",
|
||||
"label": "Provider",
|
||||
"description": "Source of the data.",
|
||||
"optional": True,
|
||||
"type": "text",
|
||||
"available_providers": ["sec"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "query",
|
||||
"label": "Query",
|
||||
"description": "Search query.",
|
||||
"optional": True,
|
||||
"value": "",
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"type": "text",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "use_cache",
|
||||
"label": "Use Cache",
|
||||
"description": "Whether or not to use cache.",
|
||||
"optional": True,
|
||||
"value": True,
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"type": "boolean",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "url",
|
||||
"label": "Url",
|
||||
"description": "Enter an optional URL path to fetch the next level.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"show": True,
|
||||
},
|
||||
],
|
||||
False,
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_get_query_schema_for_widget(
|
||||
mock_openapi_json, path, params_number, query_schema, expected_has_chart
|
||||
):
|
||||
route_params, has_chart = get_query_schema_for_widget(mock_openapi_json, path)
|
||||
assert len(route_params) == params_number
|
||||
assert route_params == query_schema
|
||||
assert has_chart == expected_has_chart
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"openapi_operation_id",
|
||||
[
|
||||
"economy_survey_sloos",
|
||||
"economy_survey_university_of_michigan",
|
||||
"economy_balance_of_payments",
|
||||
],
|
||||
)
|
||||
def test_get_data_schema_for_widget(mock_openapi_json, openapi_operation_id):
|
||||
schema = get_data_schema_for_widget(mock_openapi_json, openapi_operation_id)
|
||||
assert schema is not None
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"openapi_operation_id",
|
||||
[
|
||||
"economy_survey_sloos",
|
||||
"economy_survey_university_of_michigan",
|
||||
"economy_balance_of_payments",
|
||||
],
|
||||
)
|
||||
def test_data_schema_to_columns_defs(mock_openapi_json, openapi_operation_id):
|
||||
column_defs = data_schema_to_columns_defs(
|
||||
mock_openapi_json, openapi_operation_id, provider="fred"
|
||||
)
|
||||
assert len(column_defs) > 1 # There should be at least two columns
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main()
|
||||
@@ -0,0 +1,456 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from openbb_platform_api.utils.widgets import build_json, modify_query_schema
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
|
||||
# Load the mock OpenAPI JSON
|
||||
@pytest.fixture(scope="module")
|
||||
def mock_openapi_json():
|
||||
mock_openapi_path = Path(__file__).parent / "mock_openapi.json"
|
||||
with open(mock_openapi_path) as file:
|
||||
return json.load(file)
|
||||
|
||||
|
||||
# Load the mock widgets JSON
|
||||
@pytest.fixture(scope="module")
|
||||
def mock_widgets_json():
|
||||
mock_widgets_path = Path(__file__).parent / "mock_widgets.json"
|
||||
with open(mock_widgets_path) as file:
|
||||
return json.load(file)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"query_schema, provider_value, expected_result",
|
||||
[
|
||||
(
|
||||
[
|
||||
{
|
||||
"parameter_name": "provider",
|
||||
"label": "Provider",
|
||||
"description": "Source of the data.",
|
||||
"optional": True,
|
||||
"type": "text",
|
||||
"available_providers": ["sec"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "query",
|
||||
"label": "Query",
|
||||
"description": "Search query.",
|
||||
"optional": True,
|
||||
"value": "",
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"type": "text",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "use_cache",
|
||||
"label": "Use Cache",
|
||||
"description": "Whether or not to use cache.",
|
||||
"optional": True,
|
||||
"value": True,
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"type": "boolean",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "url",
|
||||
"label": "Url",
|
||||
"description": "Enter an optional URL path to fetch the next level.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"sec": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["sec"],
|
||||
"show": True,
|
||||
},
|
||||
],
|
||||
"sec",
|
||||
[
|
||||
{
|
||||
"label": "Query",
|
||||
"description": "Search query.",
|
||||
"optional": True,
|
||||
"value": "",
|
||||
"type": "text",
|
||||
"show": True,
|
||||
"paramName": "query",
|
||||
},
|
||||
{
|
||||
"label": "Use Cache",
|
||||
"description": "Whether or not to use cache.",
|
||||
"optional": True,
|
||||
"value": True,
|
||||
"type": "boolean",
|
||||
"show": True,
|
||||
"paramName": "use_cache",
|
||||
},
|
||||
{
|
||||
"label": "Url",
|
||||
"description": "Enter an optional URL path to fetch the next level.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"show": True,
|
||||
"paramName": "url",
|
||||
},
|
||||
{"paramName": "provider", "value": "sec", "show": False},
|
||||
],
|
||||
),
|
||||
(
|
||||
[
|
||||
{
|
||||
"parameter_name": "provider",
|
||||
"label": "Provider",
|
||||
"description": "Source of the data.",
|
||||
"optional": True,
|
||||
"type": "text",
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "symbol",
|
||||
"label": "Symbol",
|
||||
"description": "Symbol to get data for.",
|
||||
"optional": False,
|
||||
"type": "text",
|
||||
"multiple_items_allowed": {"fred": True},
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "start_date",
|
||||
"label": "Start Date",
|
||||
"description": "Start date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "end_date",
|
||||
"label": "End Date",
|
||||
"description": "End date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "date",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "limit",
|
||||
"label": "Limit",
|
||||
"description": "The number of data entries to return.",
|
||||
"optional": True,
|
||||
"value": 100000,
|
||||
"options": {"fred": []},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"type": "number",
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "frequency",
|
||||
"label": "Frequency",
|
||||
"description": "Frequency aggregation to convert high frequency data to lower frequency."
|
||||
+ "\n "
|
||||
+ "\n None = No change"
|
||||
+ "\n "
|
||||
+ "\n a = Annual"
|
||||
+ "\n "
|
||||
+ "\n q = Quarterly"
|
||||
+ "\n "
|
||||
+ "\n m = Monthly"
|
||||
+ "\n "
|
||||
+ "\n w = Weekly"
|
||||
+ "\n "
|
||||
+ "\n d = Daily"
|
||||
+ "\n "
|
||||
+ "\n wef = Weekly, Ending Friday"
|
||||
+ "\n "
|
||||
+ "\n weth = Weekly, Ending Thursday"
|
||||
+ "\n "
|
||||
+ "\n wew = Weekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n wetu = Weekly, Ending Tuesday"
|
||||
+ "\n "
|
||||
+ "\n wem = Weekly, Ending Monday"
|
||||
+ "\n "
|
||||
+ "\n wesu = Weekly, Ending Sunday"
|
||||
+ "\n "
|
||||
+ "\n wesa = Weekly, Ending Saturday"
|
||||
+ "\n "
|
||||
+ "\n bwew = Biweekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n bwem = Biweekly, Ending Monday",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "a", "value": "a"},
|
||||
{"label": "q", "value": "q"},
|
||||
{"label": "m", "value": "m"},
|
||||
{"label": "w", "value": "w"},
|
||||
{"label": "d", "value": "d"},
|
||||
{"label": "wef", "value": "wef"},
|
||||
{"label": "weth", "value": "weth"},
|
||||
{"label": "wew", "value": "wew"},
|
||||
{"label": "wetu", "value": "wetu"},
|
||||
{"label": "wem", "value": "wem"},
|
||||
{"label": "wesu", "value": "wesu"},
|
||||
{"label": "wesa", "value": "wesa"},
|
||||
{"label": "bwew", "value": "bwew"},
|
||||
{"label": "bwem", "value": "bwem"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "aggregation_method",
|
||||
"label": "Aggregation Method",
|
||||
"description": "A key that indicates the aggregation method used for frequency aggregation."
|
||||
+ "\n This parameter has no affect if the frequency parameter is not set."
|
||||
+ "\n "
|
||||
+ "\n avg = Average"
|
||||
+ "\n "
|
||||
+ "\n sum = Sum"
|
||||
+ "\n "
|
||||
+ "\n eop = End of Period",
|
||||
"optional": True,
|
||||
"value": "eop",
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "avg", "value": "avg"},
|
||||
{"label": "sum", "value": "sum"},
|
||||
{"label": "eop", "value": "eop"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
{
|
||||
"parameter_name": "transform",
|
||||
"label": "Transform",
|
||||
"description": "Transformation type"
|
||||
+ "\n "
|
||||
+ "\n None = No transformation"
|
||||
+ "\n "
|
||||
+ "\n chg = Change"
|
||||
+ "\n "
|
||||
+ "\n ch1 = Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pch = Percent Change"
|
||||
+ "\n "
|
||||
+ "\n pc1 = Percent Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pca = Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cch = Continuously Compounded Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cca = Continuously Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n log = Natural Log",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"options": {
|
||||
"fred": [
|
||||
{"label": "chg", "value": "chg"},
|
||||
{"label": "ch1", "value": "ch1"},
|
||||
{"label": "pch", "value": "pch"},
|
||||
{"label": "pc1", "value": "pc1"},
|
||||
{"label": "pca", "value": "pca"},
|
||||
{"label": "cch", "value": "cch"},
|
||||
{"label": "cca", "value": "cca"},
|
||||
{"label": "log", "value": "log"},
|
||||
]
|
||||
},
|
||||
"multiple_items_allowed": {},
|
||||
"available_providers": ["fred"],
|
||||
"show": True,
|
||||
},
|
||||
],
|
||||
"fred",
|
||||
[
|
||||
{
|
||||
"label": "Symbol",
|
||||
"description": "Symbol to get data for. Multiple comma separated items allowed.",
|
||||
"optional": False,
|
||||
"type": "text",
|
||||
"show": True,
|
||||
"multiSelect": True,
|
||||
"paramName": "symbol",
|
||||
},
|
||||
{
|
||||
"label": "Start Date",
|
||||
"description": "Start date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"type": "date",
|
||||
"show": True,
|
||||
"paramName": "start_date",
|
||||
},
|
||||
{
|
||||
"label": "End Date",
|
||||
"description": "End date of the data, in YYYY-MM-DD format.",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"type": "date",
|
||||
"show": True,
|
||||
"paramName": "end_date",
|
||||
},
|
||||
{
|
||||
"label": "Limit",
|
||||
"description": "The number of data entries to return.",
|
||||
"optional": True,
|
||||
"value": 100000,
|
||||
"type": "number",
|
||||
"show": True,
|
||||
"paramName": "limit",
|
||||
},
|
||||
{
|
||||
"label": "Frequency",
|
||||
"description": "Frequency aggregation to convert high frequency data to lower frequency."
|
||||
+ "\n "
|
||||
+ "\n None = No change"
|
||||
+ "\n "
|
||||
+ "\n a = Annual"
|
||||
+ "\n "
|
||||
+ "\n q = Quarterly"
|
||||
+ "\n "
|
||||
+ "\n m = Monthly"
|
||||
+ "\n "
|
||||
+ "\n w = Weekly"
|
||||
+ "\n "
|
||||
+ "\n d = Daily"
|
||||
+ "\n "
|
||||
+ "\n wef = Weekly, Ending Friday"
|
||||
+ "\n "
|
||||
+ "\n weth = Weekly, Ending Thursday"
|
||||
+ "\n "
|
||||
+ "\n wew = Weekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n wetu = Weekly, Ending Tuesday"
|
||||
+ "\n "
|
||||
+ "\n wem = Weekly, Ending Monday"
|
||||
+ "\n "
|
||||
+ "\n wesu = Weekly, Ending Sunday"
|
||||
+ "\n "
|
||||
+ "\n wesa = Weekly, Ending Saturday"
|
||||
+ "\n "
|
||||
+ "\n bwew = Biweekly, Ending Wednesday"
|
||||
+ "\n "
|
||||
+ "\n bwem = Biweekly, Ending Monday",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"show": True,
|
||||
"options": [
|
||||
{"label": "a", "value": "a"},
|
||||
{"label": "q", "value": "q"},
|
||||
{"label": "m", "value": "m"},
|
||||
{"label": "w", "value": "w"},
|
||||
{"label": "d", "value": "d"},
|
||||
{"label": "wef", "value": "wef"},
|
||||
{"label": "weth", "value": "weth"},
|
||||
{"label": "wew", "value": "wew"},
|
||||
{"label": "wetu", "value": "wetu"},
|
||||
{"label": "wem", "value": "wem"},
|
||||
{"label": "wesu", "value": "wesu"},
|
||||
{"label": "wesa", "value": "wesa"},
|
||||
{"label": "bwew", "value": "bwew"},
|
||||
{"label": "bwem", "value": "bwem"},
|
||||
],
|
||||
"type": "text",
|
||||
"paramName": "frequency",
|
||||
},
|
||||
{
|
||||
"label": "Aggregation Method",
|
||||
"description": "A key that indicates the aggregation method used for frequency aggregation."
|
||||
+ "\n This parameter has no affect if the frequency parameter is not set."
|
||||
+ "\n "
|
||||
+ "\n avg = Average"
|
||||
+ "\n "
|
||||
+ "\n sum = Sum"
|
||||
+ "\n "
|
||||
+ "\n eop = End of Period",
|
||||
"optional": True,
|
||||
"value": "eop",
|
||||
"show": True,
|
||||
"options": [
|
||||
{"label": "avg", "value": "avg"},
|
||||
{"label": "sum", "value": "sum"},
|
||||
{"label": "eop", "value": "eop"},
|
||||
],
|
||||
"type": "text",
|
||||
"paramName": "aggregation_method",
|
||||
},
|
||||
{
|
||||
"label": "Transform",
|
||||
"description": "Transformation type"
|
||||
+ "\n "
|
||||
+ "\n None = No transformation"
|
||||
+ "\n "
|
||||
+ "\n chg = Change"
|
||||
+ "\n "
|
||||
+ "\n ch1 = Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pch = Percent Change"
|
||||
+ "\n "
|
||||
+ "\n pc1 = Percent Change from Year Ago"
|
||||
+ "\n "
|
||||
+ "\n pca = Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cch = Continuously Compounded Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n cca = Continuously Compounded Annual Rate of Change"
|
||||
+ "\n "
|
||||
+ "\n log = Natural Log",
|
||||
"optional": True,
|
||||
"value": None,
|
||||
"show": True,
|
||||
"options": [
|
||||
{"label": "chg", "value": "chg"},
|
||||
{"label": "ch1", "value": "ch1"},
|
||||
{"label": "pch", "value": "pch"},
|
||||
{"label": "pc1", "value": "pc1"},
|
||||
{"label": "pca", "value": "pca"},
|
||||
{"label": "cch", "value": "cch"},
|
||||
{"label": "cca", "value": "cca"},
|
||||
{"label": "log", "value": "log"},
|
||||
],
|
||||
"type": "text",
|
||||
"paramName": "transform",
|
||||
},
|
||||
{"paramName": "provider", "value": "fred", "show": False},
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_modify_query_schema(query_schema, provider_value, expected_result):
|
||||
result = modify_query_schema(query_schema, provider_value)
|
||||
assert result == expected_result
|
||||
|
||||
|
||||
def test_build_json(mock_openapi_json, mock_widgets_json):
|
||||
result = build_json(openapi=mock_openapi_json, widget_exclude_filter=[])
|
||||
assert (
|
||||
len(result) == len(mock_openapi_json["paths"]) + 1
|
||||
) # +1 for the duplicate path with a chart.
|
||||
assert result == mock_widgets_json
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main()
|
||||
2
openbb_platform/openbb/assets/reference.json
vendored
@@ -39292,4 +39292,4 @@
|
||||
"description": "Financial market regulators data."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||