From 5c952b6af685cb6789e927c3bb6bfc579032341a Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:27:24 +0200 Subject: [PATCH 01/23] Cleanup --- openbb_platform/CONTRIBUTING.md | 205 ++++++++++++++++---------------- 1 file changed, 101 insertions(+), 104 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index b0ad210745ee..d9530385a538 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -1,21 +1,19 @@ # CONTRIBUTING - THIS IS A WORK IN PROGRESS - [CONTRIBUTING - THIS IS A WORK IN PROGRESS](#contributing---this-is-a-work-in-progress) - - [Get started contributing with a template](#get-started-contributing-with-a-template) - - [Cookiecuter, a closer look](#cookiecuter-a-closer-look) - - [Get your data](#get-your-data) - - [Platform commands: query and output your data](#platform-commands-query-and-output-your-data) - - [Adding a new data point](#adding-a-new-data-point) - - [Identify which type of data you want to add](#identify-which-type-of-data-you-want-to-add) - - [What is the Standardization Framework?](#what-is-the-standardization-framework) - - [Standardization Caveats](#standardization-caveats) + - [Contributing Introduction](#contributing-introduction) + - [Cookiecuter, a closer look](#cookiecuter-a-closer-look) + - [Get your data](#get-your-data) + - [OpenBB Platform commands: query and output your data](#openbb-platform-commands-query-and-output-your-data) + - [What is the Standardization Framework?](#what-is-the-standardization-framework) + - [Standardization Caveats](#standardization-caveats) - [Standard QueryParams Example](#standard-queryparams-example) - [Standard Data Example](#standard-data-example) + - [Add a new data point to the OpenBB Platform repository](#add-a-new-data-point-to-the-openbb-platform-repository) + - [Identify which type of data you want to add](#identify-which-type-of-data-you-want-to-add) - [Check if the standard model exists](#check-if-the-standard-model-exists) - - [Refer to the API documentation and start developing](#refer-to-the-api-documentation-and-start-developing) - - [How to use the standardization framework?](#how-to-use-the-standardization-framework) - - [Query Parameters](#query-parameters) - - [Data Output](#data-output) + - [Create Query Parameters model](#create-query-parameters-model) + - [Create Data Output model](#create-data-output-model) - [Build the Fetcher](#build-the-fetcher) - [Make the new provider visible to the Platform](#make-the-new-provider-visible-to-the-platform) - [Using other extension as a dependency](#using-other-extension-as-a-dependency) @@ -29,37 +27,43 @@ - [Overview](#overview) - [Import time](#import-time) -## Get started contributing with a template +## Contributing Introduction -In order to get started contributing we have setup a Cookiecutter template that will help you get started. +We have a Cookiecutter template that will help you get started. Please refer to the [Cookiecutter template](https://github.com/OpenBB-finance/openbb-cookiecutter) and follow the instructions there. -This document will walk you through the steps of adding a new custom extension to the Platform. The high level steps are: +This document will walk you through the steps of adding a new extension to the OpenBB Platform. + +The high level steps are: - Generate the extension structure - Install your dependencies - Install your new package - Use your extension (either from Python or the API interface) +- QA your extension +- Share your extension with the community -## Cookiecuter, a closer look +### Cookiecuter, a closer look The Cookiecutter template generates a set of files in which we can find instructions and explanations. +It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate. + > Note that the code is functional, so you can just run it and start playing with it. -### Get your data +## Get your data -Either from a CSV file, local database or from an API endpoint, you'll need to get your data. +You will get your data either from a CSV file, local database or from an API endpoint. -If you don't want to partake in the data standardization framework, you can simply write all the logic straight inside the router file. This is usually the case when you are adding unique data that isn't easily standardizable. +If you don't want to partake in the data standardization framework, you can simply write all the logic straight inside the router file. This is usually the case when you are adding alternative data that isn't easily standardizable. Saying that, we recommend following the standardization framework, as it will make your life easier in the long run and unlock a set of features that are only available to standardized data. When standardizing, all data is defined using two different pydantic models: -1. Define the [query parameters](openbb_platform\platform\provider\openbb_provider\abstract\query_params.py) model. -2. Define the resulting [data schema](openbb_platform\platform\provider\openbb_provider\abstract\data.py) model. +1. Define the [query parameters](platform/provider/openbb_provider/abstract/query_params.py) model. +2. Define the resulting [data schema](platform/provider/openbb_provider/abstract/data.py) model. > The models can be entirely custom, or inherit from the OpenBB standardized models. > They enforce a safe and consistent data structure, validation and type checking. @@ -72,28 +76,28 @@ After you've defined both models, you'll need to define a `Fetcher` class which 2. `extract_data` - makes the request to the API endpoint and returns the raw data. 3. `transform_data` - transforms the raw data into the defined data model. -> Note that the `Fetcher` should inherit from the [`Fetcher`](openbb_platform\platform\provider\openbb_provider\abstract\`Fetcher`.py) class, which is a generic class that receives the query parameters and the data model as type parameters. +> Note that the `Fetcher` should inherit from the [`Fetcher`](platform/provider/openbb_provider/abstract/fetcher.py) class, which is a generic class that receives the query parameters and the data model as type parameters. -After finalizing your models you need to make them visible to the Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](openbb_platform\platform\provider\openbb_provider\abstract\provider.py). +After finalizing your models, you need to make them visible to the Openbb Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](platform/provider/openbb_provider/abstract/provider.py). -Any command using the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. +Any command, using the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. If you're not sure what's a command and why is it even using the `Fetcher` class, follow along! -### Platform commands: query and output your data +### OpenBB Platform commands: query and output your data -The Platform will enable you to query and output your data in a very simple way. +The OpenBB Platform will enable you to query and output your data in a very simple way. > Any Platform endpoint will be available both from a Python interface and the API. -The command definition on the Platform follows [FastAPI](https://fastapi.tiangolo.com/) conventions, meaning that you'll be defining **endpoints** similar to like FastAPI. +The command definition on the Platform follows [FastAPI](https://fastapi.tiangolo.com/) conventions, meaning that you'll be creating **endpoints**. The Cookiecutter template generates for you a `router.py` file with a set of examples that you can follow, namely: - Perform a simple `GET` and `POST` request - without worrying on any custom data definition. - Using a custom data definition so you get your data the exact way you want it. -You can expect the following when using a `Fetcher`: +You can expect the following endpoint structure when using a `Fetcher` to serve the data: ```python @router.command(model="Example") @@ -109,56 +113,45 @@ def model_example( Let's break it down: -- `@router.command(...)` - this tells the Platform that this is a command that can be called. -- `model="Example"` - this is the name of the data model that will be used to validate the data. -- `cc: CommandContext` - this is a parameter that is passed to the command. It contains a set of user and system settings that maybe useful during the execution of the command - eg. api keys. +- `@router.command(...)` - this tells the OpenBB Platform that this is a command. +- `model="Example"` - this is the name of the `Fetcher` dictionary key that you've defined in the `__init__.py` file of the `/` folder. +- `cc: CommandContext` - this contains a set of user and system settings that is useful during the execution of the command - eg. api keys. - `provider_choices: ProviderChoices` - all the providers that implement the `Example` `Fetcher`. - `standard_params: StandardParams` - standardized parameters that are common to all providers that implement the `Example` `Fetcher`. -- `extra_params: ExtraParams` - this is a parameter that is passed to the command and it contains the provider specific arguments. - -You only need to change the `model` parameter to the name of the `Fetcher` dictionary key that you've defined in the `__init__.py` file of the `/` folder. - -## Adding a new data point +- `extra_params: ExtraParams` - it contains the provider specific arguments that are not standardized. -In the above section, we've seen how to get started with a template. +You only need to change the `model` parameter to the name of the `Fetcher` dictionary key and everything else will be handled by the OpenBB Platform. -In this section, we'll be adding a new data point to the Platform. We will add a new provider with an existing [standard data](openbb_platform\platform\provider\openbb_provider\standard_models) model. +## What is the Standardization Framework? -### Identify which type of data you want to add - -In this example, we'll be adding OHLC stock data that is used by the `stocks/load` command. - -Note that, if no command exists for your data, we need to add one under the right router. -Each router is categorized into different extensions (stocks, forex, crypto, etc.). - -### What is the Standardization Framework? +The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. -The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across several providers. +Each data model should inherit from a [standard data](platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. -Each data model should inherit from a [standard data](openbb_platform\platform\provider\openbb_provider\standard_models) that is already defined in the Platform. This will unlock a set of perks that are only available to standardized data, namely: +Usage of these models will unlock a set of perks that are only available to standardized data, namely: - Can query and output data in a standardized way. - Can expect extensions that follow standardization to work out-of-the-box. - Can expect transparently defined schemas for the data that is returned by the API. - Can expect consistent data types and validation. -- Will work seamlessly with other providers that implement the same standard model. +- Will work seamlessly with other providers that use the same standard model. The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. -They implement the [`QueryParams`](openbb_platform\platform\provider\openbb_provider\abstract\query_params.py) and [`Data`](openbb_platform\platform\provider\openbb_provider\abstract\data.py) models, which are the models that are used to query and output data, respectively. They are pydantic models under the hood, so you can leverage all the pydantic features such as validators. +They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. -#### Standardization Caveats +### Standardization Caveats The standardization framework is a very powerful tool, but it has some caveats that you should be aware of: - We standardize fields that are shared between two or more providers. If there is a third provider that doesn't share the same fields, we will declare it as an `Optional` field. - When mapping the column names from a provider-specific model to the standard model, the CamelCase to snake_case conversion is done automatically. If the column names are not the same, you'll need to manually map them. (e.g. `o` -> `open`) -- The standard models are created and maintained by the OpenBB team. If you want to add a new field to a standard model, you'll need to open a PR to the Platform. +- The standard models are created and maintained by the OpenBB team. If you want to add a new field to a standard model, you'll need to open a PR to the OpenBB Platform. ### Standard QueryParams Example ```python -class StockEODQueryParams(QueryParams, BaseSymbol): +class StockHistoricalQueryParams(QueryParams, BaseSymbol): """Stock end of day Query.""" start_date: Optional[date] = Field( @@ -169,15 +162,14 @@ class StockEODQueryParams(QueryParams, BaseSymbol): ) ``` -The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters. The `BaseSymbol` is a helper class that contains the `symbol` field and an -upper case validator. +The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters. The `BaseSymbol` is a helper class that contains the `symbol` field and an upper case validator. -The Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. +The OpenBB Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. ### Standard Data Example ```python -class StockEODData(Data): +class StockHistoricalData(Data): """Stock end of day price Data.""" date: datetime = Field(description=DATA_DESCRIPTIONS.get("date", "")) @@ -186,95 +178,100 @@ class StockEODData(Data): low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", "")) close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", "")) volume: float = Field(description=DATA_DESCRIPTIONS.get("volume", "")) - vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", "")) + vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", ""), default=None) ``` The `Data` class is an abstract class that tells us the expected output data. Here we can see a `vwap` field that is `Optional`. This is because not all providers share this field while it is shared between two or more providers. +## Add a new data point to the OpenBB Platform repository + +In the `Get your data` section, we've seen how to get started with a template and inside the `What is the Standardization Framework?` section we've seen how to leverage the standardization framework. + +In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. + +### Identify which type of data you want to add + +In this example, we'll be adding OHLC stock data that is used by the `obb.stocks.load` command. + +Note that, if no command exists for your data, we need to add one under the right router. +Each router is categorized under different extensions (stocks, forex, crypto, etc.). + #### Check if the standard model exists Given the fact that there's already an endpoint for OHLCV stock data, we can check if the standard exists. -In this case, it's `StockEOD` which can be found inside the `./platform/core/provider/openbb_provider/standard_models/` directory. +In this case, it's `StockHistorical` which can be found inside the `./platform/core/provider/openbb_provider/standard_models/` directory. If the standard model doesn't exist: -- you won't need to inherit from it in the next steps -- all your provider-specific query parameters will be under the `**kwargs` in the python interface +- you won't need to inherit from it in the next steps. +- all your provider query parameters will be under the `**kwargs` in the python interface. - it might not work out-of-the box with other extensions that follow standardization e.g. the `charting` extension -## Refer to the API documentation and start developing - -You can start developing your extension by referring to the API documentation of the provider you are interested to integrate. - -### How to use the standardization framework? - -#### Query Parameters +#### Create Query Parameters model Query Parameters are the parameters that are passed to the API endpoint in order to make the request. -For the `StockEOD` example, this would look like the following: +For the `StockHistorical` example, this would look like the following: ```python -class StockEODQueryParams(StockEODQueryParams): - """ Stock End of Day Query. +class StockHistoricalQueryParams(StockHistoricalQueryParams): + """ Stock Historical Query. Source: https://www..co/documentation/ """ - # provider specific query parameters + # provider specific query parameters if any ``` -> Note that, since `StockEODQueryParams` inherits from pydantic's `BaseModel`, so we can leverage validators to perform additional checks on the query parameters. - -#### Data Output +#### Create Data Output model The data output is the data that is returned by the API endpoint. -For the `StockEOD` example, this would look like the following: +For the `StockHistorical` example, this would look like the following: ```python -class StockEODData(StockEODData): +class StockHistoricalData(StockHistoricalData): """ Stock End of Day Data. Source: https://www..co/documentation/ """ - # provider specific data output + # provider specific data output fields if any ``` -> Note that, since `StockEODData` inherits from pydantic's `BaseModel`, so we can leverage validators to perform additional checks on the output model. A very good example of this, would be to transform a string date into a datetime object. +> Note that, since `StockHistoricalData` inherits from pydantic's `BaseModel`, so we can leverage validators to perform additional checks on the output model. A very good example of this, would be to transform a string date into a datetime object. #### Build the Fetcher The `Fetcher` class is responsible for making the request to the API endpoint and providing the output. -It will receive the Query Parameters, and it will return the output while leveraging the Data model. +It will receive the Query Parameters, and it will return the output while leveraging the pydantic model schemas. -For the `StockEOD` example, this would look like the following: +For the `StockHistorical` example, this would look like the following: ```python -class StockEODFetcher( +class StockHistoricalFetcher( Fetcher[ - StockEODQueryParams, - List[StockEODData], + StockHistoricalQueryParams, + List[StockHistoricalData], ] ): """Transform the query, extract and transform the data.""" @staticmethod - def transform_query(params: Dict[str, Any]) -> StockEODQueryParams: + def transform_query(params: Dict[str, Any]) -> StockHistoricalQueryParams: """Transform the query parameters.""" - return StockEODQueryParams(**transformed_params) + return StockHistoricalQueryParams(**transformed_params) @staticmethod def extract_data( - query: StockEODQueryParams, + query: StockHistoricalQueryParams, credentials: Optional[Dict[str, str]], **kwargs: Any, ) -> dict: @@ -287,10 +284,10 @@ class StockEODFetcher( @staticmethod def transform_data( data: dict, - ) -> List[StockEODData]: + ) -> List[StockHistoricalData]: """Transform the data to the standard format.""" - return [StockEODData.model_validate(d) for d in data] + return [StockHistoricalData.model_validate(d) for d in data] ``` @@ -305,21 +302,21 @@ In order to make the new provider visible to the Platform, you'll need to add it """ Provider module.""" from openbb_provider.abstract.provider import Provider -from openbb_.models.stock_eod import StockEODFetcher +from openbb_.models.stock_eod import StockHistoricalFetcher _provider = Provider( name="", website="", description="Provider description goes here", required_credentials=["api_key"], - `Fetcher`_dict={ - "StockEOD": StockEODFetcher, + fetcher_dict={ + "StockHistorical": StockHistoricalFetcher, }, ) ``` -If the provider does not require any credentials, you can simply omit it. On the other hand if it requires more than 2 items to authenticate, you can simply add a list of all the required items to the `required_credentials` list. +If the provider does not require any credentials, you can remove that parameter. On the other hand, if it requires more than 2 items to authenticate, you can add a list of all the required items to the `required_credentials` list. After running `pip install .` on `openbb_platform/providers/` your provider should be ready for usage, both from the Python interface and the API. @@ -378,12 +375,12 @@ Then execute the command `poetry install` in the root of your extension to insta #### Add a visualization to an existing Platform command -One should first ensure that the already implemented endpoint is available in the [charting router](openbb_platform/extensions/charting/openbb_charting/charting_router.py). +One should first ensure that the already implemented endpoint is available in the [charting router](extensions/charting/openbb_charting/charting_router.py). To do so, you can run: `python openbb_platform/extensions/charting/openbb_charting/builder.py` - which will read all the available endpoints and add them to the charting router. -Afterwards, you'll need to add the visualization to the [charting router](openbb_platform/extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: +Afterwards, you'll need to add the visualization to the [charting router](extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: - `stocks/load` -> `stocks_load` - `ta/ema` -> `ta_ema` @@ -398,11 +395,11 @@ The implementation should leverage the already existing classes and methods to d Note that the return of each charting function should respect the already defined return types: `Tuple[OpenBBFigure, Dict[str, Any]]`. -The returned tuple contains a `OpenBBFigure` that is an interactive plotly figure that can be used in a Python interpreter, and a `Dict[str, Any]` that contains the raw data leveraged by the API. +The returned tuple contains a `OpenBBFigure` that is an interactive plotly figure which can be used in a Python interpreter, and a `Dict[str, Any]` that contains the raw data leveraged by the API. -After you're done implementing the charting function, you can simply use either the Python interface or the API to get the chart. To do so, you'll only need to set the already available `chart` argument to `True`. +After you're done implementing the charting function, you can use either the Python interface or the API to get the chart. To do so, you'll only need to set the already available `chart` argument to `True`. -Refer to the charting extension [documentation](openbb_platform/extensions/charting/README.md) for more information on usage. +Refer to the charting extension [documentation](extensions/charting/README.md) for more information on usage. #### Using the `to_chart` OBBject method @@ -413,19 +410,19 @@ The `to_chart` function should be taken as an advanced feature, as it requires t The user can use any number of `**kwargs` that will be passed to the `PlotlyTA` class in order to build custom visualizations with custom indicators and similar. -Refer to the [`to_chart` implementation](openbb_platform/extensions/charting/openbb_charting/core/to_chart.py) for further details. +Refer to the [`to_chart` implementation](extensions/charting/openbb_charting/core/to_chart.py) for further details. > Note that, this method will only work to some limited extent with data that is not standardized. -> Also, it is designed only to handle time series data. +> Also, it is currently designed only to handle time series data. ## Environment and dependencies -In order to contribute to the Platform you need to setup your environment in order to ensure a smooth development experience. +In order to contribute to the OpenBB Platform, you need to setup your environment to ensure a smooth development experience.
Need help setting up Miniconda or Git? -Sometimes installing Miniconda or Git can be a bit tricky, so we've prepared a set of instructions to help you get started. +Sometimes, installing Miniconda or Git can be a bit tricky, so we've prepared a set of instructions to help you get started. Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installation/pypi) for more information.
@@ -491,7 +488,7 @@ wrapper around the `openbb-core` and any installed extensions. When the user runs `import openbb`, `from openbb import obb` or other variants, the script that generates the package code is triggered. It detects if there are new openbb extensions installed in the environment and rebuilds the package code accordingly. If -new extensions are not found it just uses the current package version. +new extensions are not found, it just uses the current package version. When you are developing chances are you want to manually trigger the package rebuild. You can do that with: @@ -504,7 +501,7 @@ python -c "import openbb; openbb.build()" We aim to have a short import time for the package. To measure that we use `tuna`. -- https://pypi.org/project/tuna/ +- To visualize the import time breakdown by module and find potential bottlenecks, run the following commands from `openbb_platform` directory: From 7daf6ae4a098dab123ca4d11aaa557b42677db57 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:16:51 +0200 Subject: [PATCH 02/23] Add QA --- openbb_platform/CONTRIBUTING.md | 60 +++++++++++++++++++ .../utils/integration_tests_api_generator.py | 4 +- .../utils/integration_tests_generator.py | 7 ++- 3 files changed, 66 insertions(+), 5 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index d9530385a538..62bae154b281 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -25,7 +25,13 @@ - [Environment and dependencies](#environment-and-dependencies) - [Python package](#python-package) - [Overview](#overview) + - [QA your extension](#qa-your-extension) + - [Unit tests](#unit-tests) + - [Integration tests](#integration-tests) - [Import time](#import-time) + - [Sharing your extension](#sharing-your-extension) + - [Publish your extension to PyPI](#publish-your-extension-to-pypi) + - [Create a PR to the OpenBB Platform](#create-a-pr-to-the-openbb-platform) ## Contributing Introduction @@ -497,6 +503,54 @@ You can do that with: python -c "import openbb; openbb.build()" ``` +## QA your extension + +We are strong believers in the QA process and we want to make sure that all the extensions that are added to the OpenBB Platform are of high quality. To ensure this, we have a set of QA tools that you can use to test your extension. + +Primarily, we have tools that semi-automate the creation of unit and integration tests. + +> The QA tools are still in development and we are constantly improving them. + +### Unit tests + +Each `Fetcher` comes equipped with a `test` method that will ensure that it is implemented correctly and that it is returning the expected data. It also ensures that all types are correct and that the data is valid. + +To create unit tests for your Fetchers, you can run the following command: + +```bash +python openbb_platform/providers/tests/utils/unit_test_generator.py +``` + +> Note that you should be running this file from the root of the repository. + +The automatic unit test generation will add unit tests for all the fetchers available in a given provider. + +> Note that sometimes manual intervention is needed. For example, adjusting out-of-top level imports or adding specific arguments for a given fetcher. + +### Integration tests + +The integration tests are a bit more complex than the unit tests, as we want to test both the Python interface and the API interface. For this, we have two scripts that will help you generate the integration tests. + +To generate the integration tests for the Python interface, you can run the following command: + +```bash +python openbb_platform/extensions/tests/utils/integration_tests_generator.py +``` + +To generate the integration tests for the API interface, you can run the following command: + +```bash +python openbb_platform/extensions/tests/utils/integration_tests_api_generator.py +``` + +When testing the API interface, you'll need to run the OpenBB Platform locally before running the tests. To do so, you can run the following command: + +```bash +uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +``` + +These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. + ### Import time We aim to have a short import time for the package. To measure that we use `tuna`. @@ -511,3 +565,9 @@ pip install tuna python -X importtime openbb/__init__.py 2> import.log tuna import.log ``` + +## Sharing your extension + +### Publish your extension to PyPI + +### Create a PR to the OpenBB Platform diff --git a/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py b/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py index 7266776e7c91..86d3a09e6c9a 100644 --- a/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py +++ b/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py @@ -1,10 +1,10 @@ import os +from platform.core.openbb_core.app.provider_interface import ProviderInterface +from platform.core.openbb_core.app.router import CommandMap from typing import Dict, List, Type, get_type_hints import requests from extensions.tests.utils.integration_tests_generator import get_test_params -from openbb_core.app.provider_interface import ProviderInterface -from openbb_core.app.router import CommandMap def get_http_method(api_paths: Dict[str, dict], route: str): diff --git a/openbb_platform/extensions/tests/utils/integration_tests_generator.py b/openbb_platform/extensions/tests/utils/integration_tests_generator.py index c5f95f2c470f..7d91c281c429 100644 --- a/openbb_platform/extensions/tests/utils/integration_tests_generator.py +++ b/openbb_platform/extensions/tests/utils/integration_tests_generator.py @@ -1,9 +1,9 @@ """Integration test generator.""" from pathlib import Path, PosixPath +from platform.core.openbb_core.app.provider_interface import ProviderInterface +from platform.core.openbb_core.app.router import CommandMap from typing import Any, Dict, List, Literal, get_origin -from openbb_core.app.provider_interface import ProviderInterface -from openbb_core.app.router import CommandMap from pydantic.fields import FieldInfo from pydantic_core import PydanticUndefined @@ -181,4 +181,5 @@ def write_integration_test() -> None: add_test_commands_to_file(extensions) -write_integration_test() +if __name__ == "__main__": + write_integration_test() From 25b79e055d3624e41fe7c3d1b5d7217aa577c7bf Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:41:04 +0200 Subject: [PATCH 03/23] Rebuild static assets --- openbb_platform/CONTRIBUTING.md | 539 +++++++++--------- openbb_platform/extensions/charting/README.md | 40 ++ 2 files changed, 308 insertions(+), 271 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 62bae154b281..5cf5b7fd66d8 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -1,41 +1,153 @@ -# CONTRIBUTING - THIS IS A WORK IN PROGRESS -- [CONTRIBUTING - THIS IS A WORK IN PROGRESS](#contributing---this-is-a-work-in-progress) - - [Contributing Introduction](#contributing-introduction) - - [Cookiecuter, a closer look](#cookiecuter-a-closer-look) - - [Get your data](#get-your-data) - - [OpenBB Platform commands: query and output your data](#openbb-platform-commands-query-and-output-your-data) +- [Quick look into the OpenBB Platform](#quick-look-into-the-openbb-platform) - [What is the Standardization Framework?](#what-is-the-standardization-framework) - [Standardization Caveats](#standardization-caveats) - [Standard QueryParams Example](#standard-queryparams-example) - [Standard Data Example](#standard-data-example) - - [Add a new data point to the OpenBB Platform repository](#add-a-new-data-point-to-the-openbb-platform-repository) - - [Identify which type of data you want to add](#identify-which-type-of-data-you-want-to-add) - - [Check if the standard model exists](#check-if-the-standard-model-exists) - - [Create Query Parameters model](#create-query-parameters-model) - - [Create Data Output model](#create-data-output-model) - - [Build the Fetcher](#build-the-fetcher) - - [Make the new provider visible to the Platform](#make-the-new-provider-visible-to-the-platform) - - [Using other extension as a dependency](#using-other-extension-as-a-dependency) - - [Using our internal extension](#using-our-internal-extension) - - [Adding an external extension](#adding-an-external-extension) - - [The charting extension](#the-charting-extension) - - [Add a visualization to an existing Platform command](#add-a-visualization-to-an-existing-platform-command) - - [Using the `to_chart` OBBject method](#using-the-to_chart-obbject-method) - - [Environment and dependencies](#environment-and-dependencies) - - [Python package](#python-package) - - [Overview](#overview) + - [What is an extension?](#what-is-an-extension) + - [Types of extensions](#types-of-extensions) +- [How to build OpenBB extensions?](#how-to-build-openbb-extensions) + - [Add a custom data source](#add-a-custom-data-source) + - [OpenBB Platform commands](#openbb-platform-commands) - [QA your extension](#qa-your-extension) - [Unit tests](#unit-tests) - [Integration tests](#integration-tests) - [Import time](#import-time) - [Sharing your extension](#sharing-your-extension) - [Publish your extension to PyPI](#publish-your-extension-to-pypi) - - [Create a PR to the OpenBB Platform](#create-a-pr-to-the-openbb-platform) + - [Setup](#setup) + - [Release](#release) + - [Publish](#publish) +- [How to contribute to the OpenBB Platform?](#how-to-contribute-to-the-openbb-platform) + - [Add a new data point](#add-a-new-data-point) + - [Identify which type of data you want to add](#identify-which-type-of-data-you-want-to-add) + - [Check if the standard model exists](#check-if-the-standard-model-exists) + - [Create Query Parameters model](#create-query-parameters-model) + - [Create Data Output model](#create-data-output-model) + - [Build the Fetcher](#build-the-fetcher) + - [Make the provider visible](#make-the-provider-visible) + - [Manage extensions](#manage-extensions) + - [Add an extension as a dependency](#add-an-extension-as-a-dependency) + - [Manage environment and dependencies](#manage-environment-and-dependencies) + - [How to create a PR?](#how-to-create-a-pr) + - [Install pre-commit hooks](#install-pre-commit-hooks) + - [Branch Naming Conventions](#branch-naming-conventions) + +# Quick look into the OpenBB Platform + +The OpenBB Platform is built by the Open-Source community and is characterized by its core and extensions. The core handles data integration and standardization, while the extensions enable customization and advanced functionalities. The OpenBB Platform is designed to be used both from a Python interface and a REST API. + +The REST API is built on top of FastAPI and can be started by running the following command from the root: + +```bash +uvicorn openbb_terminal.terminal.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +``` + +The Python interfaces we provide to users is the `openbb` python package. + +The code you will find in this package is generated from a script and it is just a wrapper around the `openbb-core` and any installed extensions. + +When the user runs `import openbb`, `from openbb import obb` or other variants, the script that generates the package code is triggered. It detects if there are new openbb extensions installed in the environment and rebuilds the package code accordingly. If new extensions are not found, it just uses the current package version. + +When you are developing chances are you want to manually trigger the package rebuild. + +You can do that with: + +```python +python -c "import openbb; openbb.build()" +``` + +The Python interface can be imported with: + +```python +from openbb import obb +``` + +This document will take you through two types of contributions: + +1. Building a custom extension +2. Contributing directly to the OpenBB Platform + +## What is the Standardization Framework? + +The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. + +Each data model should inherit from a [standard data](platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. + +Usage of these models will unlock a set of perks that are only available to standardized data, namely: + +- Can query and output data in a standardized way. +- Can expect extensions that follow standardization to work out-of-the-box. +- Can expect transparently defined schemas for the data that is returned by the API. +- Can expect consistent data types and validation. +- Will work seamlessly with other providers that use the same standard model. + +The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. + +They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. + +### Standardization Caveats + +The standardization framework is a very powerful tool, but it has some caveats that you should be aware of: + +- We standardize fields that are shared between two or more providers. If there is a third provider that doesn't share the same fields, we will declare it as an `Optional` field. +- When mapping the column names from a provider-specific model to the standard model, the CamelCase to snake_case conversion is done automatically. If the column names are not the same, you'll need to manually map them. (e.g. `o` -> `open`) +- The standard models are created and maintained by the OpenBB team. If you want to add a new field to a standard model, you'll need to open a PR to the OpenBB Platform. + +### Standard QueryParams Example + +```python +class StockHistoricalQueryParams(QueryParams, BaseSymbol): + """Stock end of day Query.""" + + start_date: Optional[date] = Field( + description=QUERY_DESCRIPTIONS.get("start_date", ""), default=None + ) + end_date: Optional[date] = Field( + description=QUERY_DESCRIPTIONS.get("end_date", ""), default=None + ) +``` + +The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters. The `BaseSymbol` is a helper class that contains the `symbol` field and an upper case validator. + +The OpenBB Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. + +### Standard Data Example + +```python +class StockHistoricalData(Data): + """Stock end of day price Data.""" -## Contributing Introduction + date: datetime = Field(description=DATA_DESCRIPTIONS.get("date", "")) + open: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("open", "")) + high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", "")) + low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", "")) + close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", "")) + volume: float = Field(description=DATA_DESCRIPTIONS.get("volume", "")) + vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", ""), default=None) +``` + +The `Data` class is an abstract class that tells us the expected output data. Here we can see a `vwap` field that is `Optional`. This is because not all providers share this field while it is shared between two or more providers. + +## What is an extension? -We have a Cookiecutter template that will help you get started. +An extension adds functionality to the OpenBB Platform. It can be a new data source, a new command, a new visualization, etc. + +### Types of extensions + +We primarily have 3 types of extensions: + +1. OpenBB Extensions - built and maintained by the OpenBB team (e.g. `openbb-stocks`) +2. Community Extensions - built by anyone and primarily maintained by OpenBB (e.g. `openbb-yfinance`) +3. Independent Extensions - built and maintained independently by anyone + +If your extension is of high quality and you think that it would be a good community extension, you can open a PR to the OpenBB Platform repository and we'll review it. + +We encourage independent extensions to be shared with the community by publishing them to PyPI. + +# How to build OpenBB extensions? + +We have a Cookiecutter template that will help you get started. It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate. Please refer to the [Cookiecutter template](https://github.com/OpenBB-finance/openbb-cookiecutter) and follow the instructions there. @@ -50,15 +162,7 @@ The high level steps are: - QA your extension - Share your extension with the community -### Cookiecuter, a closer look - -The Cookiecutter template generates a set of files in which we can find instructions and explanations. - -It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate. - -> Note that the code is functional, so you can just run it and start playing with it. - -## Get your data +## Add a custom data source You will get your data either from a CSV file, local database or from an API endpoint. @@ -90,7 +194,7 @@ Any command, using the `Fetcher` class you've just defined, will be calling the If you're not sure what's a command and why is it even using the `Fetcher` class, follow along! -### OpenBB Platform commands: query and output your data +### OpenBB Platform commands The OpenBB Platform will enable you to query and output your data in a very simple way. @@ -128,70 +232,123 @@ Let's break it down: You only need to change the `model` parameter to the name of the `Fetcher` dictionary key and everything else will be handled by the OpenBB Platform. -## What is the Standardization Framework? +## QA your extension -The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. +We are strong believers in the QA process and we want to make sure that all the extensions that are added to the OpenBB Platform are of high quality. To ensure this, we have a set of QA tools that you can use to test your extension. -Each data model should inherit from a [standard data](platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. +Primarily, we have tools that semi-automate the creation of unit and integration tests. -Usage of these models will unlock a set of perks that are only available to standardized data, namely: +> The QA tools are still in development and we are constantly improving them. -- Can query and output data in a standardized way. -- Can expect extensions that follow standardization to work out-of-the-box. -- Can expect transparently defined schemas for the data that is returned by the API. -- Can expect consistent data types and validation. -- Will work seamlessly with other providers that use the same standard model. +### Unit tests -The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. +Each `Fetcher` comes equipped with a `test` method that will ensure that it is implemented correctly and that it is returning the expected data. It also ensures that all types are correct and that the data is valid. -They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. +To create unit tests for your Fetchers, you can run the following command: -### Standardization Caveats +```bash +python openbb_platform/providers/tests/utils/unit_test_generator.py +``` -The standardization framework is a very powerful tool, but it has some caveats that you should be aware of: +> Note that you should be running this file from the root of the repository. -- We standardize fields that are shared between two or more providers. If there is a third provider that doesn't share the same fields, we will declare it as an `Optional` field. -- When mapping the column names from a provider-specific model to the standard model, the CamelCase to snake_case conversion is done automatically. If the column names are not the same, you'll need to manually map them. (e.g. `o` -> `open`) -- The standard models are created and maintained by the OpenBB team. If you want to add a new field to a standard model, you'll need to open a PR to the OpenBB Platform. +The automatic unit test generation will add unit tests for all the fetchers available in a given provider. -### Standard QueryParams Example +> Note that sometimes manual intervention is needed. For example, adjusting out-of-top level imports or adding specific arguments for a given fetcher. -```python -class StockHistoricalQueryParams(QueryParams, BaseSymbol): - """Stock end of day Query.""" +### Integration tests - start_date: Optional[date] = Field( - description=QUERY_DESCRIPTIONS.get("start_date", ""), default=None - ) - end_date: Optional[date] = Field( - description=QUERY_DESCRIPTIONS.get("end_date", ""), default=None - ) +The integration tests are a bit more complex than the unit tests, as we want to test both the Python interface and the API interface. For this, we have two scripts that will help you generate the integration tests. + +To generate the integration tests for the Python interface, you can run the following command: + +```bash +python openbb_platform/extensions/tests/utils/integration_tests_generator.py ``` -The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters. The `BaseSymbol` is a helper class that contains the `symbol` field and an upper case validator. +To generate the integration tests for the API interface, you can run the following command: -The OpenBB Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. +```bash +python openbb_platform/extensions/tests/utils/integration_tests_api_generator.py +``` -### Standard Data Example +When testing the API interface, you'll need to run the OpenBB Platform locally before running the tests. To do so, you can run the following command: -```python -class StockHistoricalData(Data): - """Stock end of day price Data.""" +```bash +uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +``` - date: datetime = Field(description=DATA_DESCRIPTIONS.get("date", "")) - open: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("open", "")) - high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", "")) - low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", "")) - close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", "")) - volume: float = Field(description=DATA_DESCRIPTIONS.get("volume", "")) - vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", ""), default=None) +These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. + +### Import time + +We aim to have a short import time for the package. To measure that we use `tuna`. + +- + +To visualize the import time breakdown by module and find potential bottlenecks, run the +following commands from `openbb_platform` directory: + +```bash +pip install tuna +python -X importtime openbb/__init__.py 2> import.log +tuna import.log ``` -The `Data` class is an abstract class that tells us the expected output data. Here we can see a `vwap` field that is `Optional`. This is because not all providers share this field while it is shared between two or more providers. +## Sharing your extension + +We encourage you to share your extension with the community. You can do that by publishing it to PyPI. + +### Publish your extension to PyPI + +To publish your extension to PyPI, you'll need to have a PyPI account and a PyPI API token. + +#### Setup + +Create an account and get an API token from +Store the token with + +```bash +poetry config pypi-token.pypi pypi-YYYYYYYY +``` + +#### Release + +`cd` into the directory where your extension `pyproject.toml` lives and make sure that the `pyproject.toml` specifies the version tag you want to release and run. + +```bash +poetry build +``` + +This will create a `/dist` folder in the directory, which will contain the `.whl` and `tar.gz` files matching the version to release. + +If you want to test your package locally you can do it with + +```bash +pip install dist/openbb_[FILE_NAME].whl +``` -## Add a new data point to the OpenBB Platform repository +#### Publish -In the `Get your data` section, we've seen how to get started with a template and inside the `What is the Standardization Framework?` section we've seen how to leverage the standardization framework. +To publish your package to PyPI run: + +```bash +poetry publish +``` + +Now, you can pip install your package from PyPI with: + +```bash +pip install openbb-some_ext +``` + +# How to contribute to the OpenBB Platform? + +There are many ways to contribute to the OpenBB Platform. You can add a new data point, add a new command, add a new visualization, add a new extension, fix a bug etc. + +In this document, we'll be focusing on adding a new data point to the OpenBB Platform. + +## Add a new data point In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. @@ -260,7 +417,6 @@ It will receive the Query Parameters, and it will return the output while levera For the `StockHistorical` example, this would look like the following: ```python - class StockHistoricalFetcher( Fetcher[ StockHistoricalQueryParams, @@ -294,17 +450,15 @@ class StockHistoricalFetcher( """Transform the data to the standard format.""" return [StockHistoricalData.model_validate(d) for d in data] - ``` > Make sure that you're following the TET pattern when building a `Fetcher` - **Transform, Extract, Transform**. -### Make the new provider visible to the Platform +### Make the provider visible -In order to make the new provider visible to the Platform, you'll need to add it to the `__init__.py` file of the `providers//openbb_/` folder. +In order to make the new provider visible to the OpenBB Platform, you'll need to add it to the `__init__.py` file of the `providers//openbb_/` folder. ```python - """ Provider module.""" from openbb_provider.abstract.provider import Provider @@ -319,109 +473,34 @@ from openbb_.models.stock_eod import StockHistorica "StockHistorical": StockHistoricalFetcher, }, ) - ``` If the provider does not require any credentials, you can remove that parameter. On the other hand, if it requires more than 2 items to authenticate, you can add a list of all the required items to the `required_credentials` list. After running `pip install .` on `openbb_platform/providers/` your provider should be ready for usage, both from the Python interface and the API. -## Using other extension as a dependency - -We can use internal and external extensions with the custom developed extension and bundle it as a dependency. +## Manage extensions -### Using our internal extension +To install an extension hosted on PyPI, use the `pip install ` command. -We will use the `openbb-qa` extension by utilizing its `summary` endpoint. +> To install this in editable mode, add the `-e` argument. -To create a `period_summary_example` endpoint we need to add the following to the `router.py` file: +To install an extension that is developed locally, ensure that it contains a `pyproject.toml` file. Then use the command `poetry lock` to create a `.lock` file. -```python -from typing import List -from openbb_provider.abstract.data import Data -from openbb_core.app.utils import basemodel_to_df, df_to_basemodel -from openbb_qa.qa_router import summary - - -@router.command(methods=["POST"]) -def period_summary_example( - data: List[Data], - target: str, - start_date: str, - end_date: str, -) -> OBBject[dict]: - """Example Data.""" - - df = basemodel_to_df(data) - df = df[(df["date"] >= start_date) & (df["date"] <= end_date)] - df = df.reset_index(drop=True) - target_data = df_to_basemodel(df) - results = summary(target_data, target=target) - - return OBBject(results=results.results) -``` +Now, you can use the command `poetry install ` to install the extension. -Here we are using two vital utility functions - `basemodel_to_df` and `df_to_basemodel`. The function `basemodel_to_df` converts the data to a pandas dataframe and `df_to_basemodel` converts the dataframe back to the `Data` model. +> To install it in editable mode use the `-C` argument. -### Adding an external extension +### Add an extension as a dependency -To add the `openbb-charting` charting extension as a dependency, you'll need to add it to the `pyproject.toml` file: +To add the `openbb-qa` extension as a dependency, you'll need to add it to the `pyproject.toml` file: - ```toml [tool.poetry.dependencies] -openbb-charting = "^0.0.0a1" +openbb-qa = "^0.0.0a2" ``` -Then execute the command `poetry install` in the root of your extension to install the new dependency. - -### The charting extension - -> In theory the same principles apply to any other extension. - -#### Add a visualization to an existing Platform command - -One should first ensure that the already implemented endpoint is available in the [charting router](extensions/charting/openbb_charting/charting_router.py). - -To do so, you can run: - `python openbb_platform/extensions/charting/openbb_charting/builder.py` - which will read all the available endpoints and add them to the charting router. - -Afterwards, you'll need to add the visualization to the [charting router](extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: - -- `stocks/load` -> `stocks_load` -- `ta/ema` -> `ta_ema` - -When you spot the charting function on the charting router file, you can add the visualization to it. - -The implementation should leverage the already existing classes and methods to do so, namely: - -- `OpenBBFigure` -- `OpenBBFigureTable` -- `PlotlyTA` - -Note that the return of each charting function should respect the already defined return types: `Tuple[OpenBBFigure, Dict[str, Any]]`. - -The returned tuple contains a `OpenBBFigure` that is an interactive plotly figure which can be used in a Python interpreter, and a `Dict[str, Any]` that contains the raw data leveraged by the API. - -After you're done implementing the charting function, you can use either the Python interface or the API to get the chart. To do so, you'll only need to set the already available `chart` argument to `True`. - -Refer to the charting extension [documentation](extensions/charting/README.md) for more information on usage. - -#### Using the `to_chart` OBBject method - -The `OBBject` is the custom OpenBB object that is returned by the Platform commands. -It implements a set of `to_` functions that enable the user to easily transform the data into a different format. - -The `to_chart` function should be taken as an advanced feature, as it requires the user to have a good understanding of the charting extension and the `OpenBBFigure` class. - -The user can use any number of `**kwargs` that will be passed to the `PlotlyTA` class in order to build custom visualizations with custom indicators and similar. - -Refer to the [`to_chart` implementation](extensions/charting/openbb_charting/core/to_chart.py) for further details. - -> Note that, this method will only work to some limited extent with data that is not standardized. -> Also, it is currently designed only to handle time series data. - -## Environment and dependencies +## Manage environment and dependencies In order to contribute to the OpenBB Platform, you need to setup your environment to ensure a smooth development experience. @@ -454,120 +533,38 @@ Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installati pip install poetry ``` -4. Install the `openbb-core`: - - ```bash - cd OpenBBTerminal/openbb_platform/platform/core/ - poetry install - ``` - -5. Install dependencies: +4. Install the packages using the `dev_install.py` script located in the `openbb_platform` folder: ```bash - cd OpenBBTerminal/openbb_platform/extensions/stocks/ # or any other extension - poetry install + python dev_install.py ``` -> When installing the dependencies using poetry we ensure that dependencies are being installed in editable mode, which is the most straightforward way to develop on top of the Platform. - -
-Install all dependencies in editable mode at once - -For development purposes, one can install every available extension by running a custom shell script: - -Navigate to `/OpenBBTerminal/openbb_platform` - -Run `python dev_install.py`. -
- -> In order to install any other custom extension or provider, you'd follow the exact same steps as above. - -## Python package - -### Overview - -One of the interfaces we provide to users is the `openbb` python package. - -The code you will find in this package is generated from a script and it is just a -wrapper around the `openbb-core` and any installed extensions. - -When the user runs `import openbb`, `from openbb import obb` or other variants, the -script that generates the package code is triggered. It detects if there are new openbb -extensions installed in the environment and rebuilds the package code accordingly. If -new extensions are not found, it just uses the current package version. - -When you are developing chances are you want to manually trigger the package rebuild. -You can do that with: - -```python -python -c "import openbb; openbb.build()" -``` + > To install all the packages, including extras, use the `-e` argument with the above script. -## QA your extension +## How to create a PR? -We are strong believers in the QA process and we want to make sure that all the extensions that are added to the OpenBB Platform are of high quality. To ensure this, we have a set of QA tools that you can use to test your extension. +To create a PR to the OpenBB Platform, you'll need to fork the repository and create a new branch. -Primarily, we have tools that semi-automate the creation of unit and integration tests. +1. Create your Feature Branch, e.g. `git checkout -b feature/AmazingFeature` +2. Check the files you have touched using `git status` +3. Stage the files you want to commit, e.g. + `git add openbb_terminal/stocks/stocks_controller.py openbb_terminal/stocks/stocks_helper.py`. + Note: **DON'T** add any files with personal information. +4. Write a concise commit message under 50 characters, e.g. `git commit -m "meaningful commit message"`. If your PR + solves an issue raised by a user, you may specify such issue by adding #ISSUE_NUMBER to the commit message, so that + these get linked. Note: If you installed pre-commit hooks and one of the formatters re-formats your code, you'll need + to go back to step 3 to add these. -> The QA tools are still in development and we are constantly improving them. +### Install pre-commit hooks -### Unit tests +To install pre-commit hooks, run `pre-commit install` in the root of the repository. -Each `Fetcher` comes equipped with a `test` method that will ensure that it is implemented correctly and that it is returning the expected data. It also ensures that all types are correct and that the data is valid. +### Branch Naming Conventions -To create unit tests for your Fetchers, you can run the following command: +The accepted branch naming conventions are: -```bash -python openbb_platform/providers/tests/utils/unit_test_generator.py -``` - -> Note that you should be running this file from the root of the repository. - -The automatic unit test generation will add unit tests for all the fetchers available in a given provider. - -> Note that sometimes manual intervention is needed. For example, adjusting out-of-top level imports or adding specific arguments for a given fetcher. - -### Integration tests - -The integration tests are a bit more complex than the unit tests, as we want to test both the Python interface and the API interface. For this, we have two scripts that will help you generate the integration tests. - -To generate the integration tests for the Python interface, you can run the following command: - -```bash -python openbb_platform/extensions/tests/utils/integration_tests_generator.py -``` - -To generate the integration tests for the API interface, you can run the following command: - -```bash -python openbb_platform/extensions/tests/utils/integration_tests_api_generator.py -``` - -When testing the API interface, you'll need to run the OpenBB Platform locally before running the tests. To do so, you can run the following command: - -```bash -uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload -``` - -These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. - -### Import time - -We aim to have a short import time for the package. To measure that we use `tuna`. - -- - -To visualize the import time breakdown by module and find potential bottlenecks, run the -following commands from `openbb_platform` directory: - -```bash -pip install tuna -python -X importtime openbb/__init__.py 2> import.log -tuna import.log -``` - -## Sharing your extension - -### Publish your extension to PyPI +- `feature/feature-name` +- `hotfix/hotfix-name` +- `release/2.1.0` or `release/2.1.0rc0`. -### Create a PR to the OpenBB Platform +All `feature/feature-name` related branches can only have PRs pointing to `develop` branch. `hotfix/hotfix-name` and `release/2.1.0` or `release/2.1.0rc0` branches can only have PRs pointing to `main` branch. diff --git a/openbb_platform/extensions/charting/README.md b/openbb_platform/extensions/charting/README.md index 95659a4ac7ff..8fa77110527f 100644 --- a/openbb_platform/extensions/charting/README.md +++ b/openbb_platform/extensions/charting/README.md @@ -52,3 +52,43 @@ stock_data.show() ``` > Note: The `show()` method currently works either in a Jupyter Notebook or in a standalone python script with a PyWry based backend properly initialized. + +## Add a visualization to an existing Platform command + +One should first ensure that the already implemented endpoint is available in the [charting router](extensions/charting/openbb_charting/charting_router.py). + +To do so, you can run: + `python openbb_platform/extensions/charting/openbb_charting/builder.py` - which will read all the available endpoints and add them to the charting router. + +Afterwards, you'll need to add the visualization to the [charting router](extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: + +- `stocks/load` -> `stocks_load` +- `ta/ema` -> `ta_ema` + +When you spot the charting function on the charting router file, you can add the visualization to it. + +The implementation should leverage the already existing classes and methods to do so, namely: + +- `OpenBBFigure` +- `OpenBBFigureTable` +- `PlotlyTA` + +Note that the return of each charting function should respect the already defined return types: `Tuple[OpenBBFigure, Dict[str, Any]]`. + +The returned tuple contains a `OpenBBFigure` that is an interactive plotly figure which can be used in a Python interpreter, and a `Dict[str, Any]` that contains the raw data leveraged by the API. + +After you're done implementing the charting function, you can use either the Python interface or the API to get the chart. To do so, you'll only need to set the already available `chart` argument to `True`. + +### Using the `to_chart` OBBject method + +The `OBBject` is the custom OpenBB object that is returned by the Platform commands. +It implements a set of `to_` functions that enable the user to easily transform the data into a different format. + +The `to_chart` function should be taken as an advanced feature, as it requires the user to have a good understanding of the charting extension and the `OpenBBFigure` class. + +The user can use any number of `**kwargs` that will be passed to the `PlotlyTA` class in order to build custom visualizations with custom indicators and similar. + +Refer to the [`to_chart` implementation](openbb_charting/core/to_chart.py) for further details. + +> Note that, this method will only work to some limited extent with data that is not standardized. +> Also, it is currently designed only to handle time series data. From 15475953153e27f7cd4665a98668fc538251dd4d Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Fri, 29 Sep 2023 20:55:27 +0200 Subject: [PATCH 04/23] Fix typo --- openbb_platform/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 5cf5b7fd66d8..8fb362be3bb4 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -40,7 +40,7 @@ The OpenBB Platform is built by the Open-Source community and is characterized b The REST API is built on top of FastAPI and can be started by running the following command from the root: ```bash -uvicorn openbb_terminal.terminal.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +uvicorn openbb_platform.platform.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload ``` The Python interfaces we provide to users is the `openbb` python package. From f435cdee38c175ec164ad3f7c1a49e472704c7ff Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:55:28 +0200 Subject: [PATCH 05/23] Improvements with @the-praxs --- openbb_platform/CONTRIBUTING.md | 116 +++++++++++++++++--------------- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 8fb362be3bb4..0881a5d4005a 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -19,6 +19,7 @@ - [Release](#release) - [Publish](#publish) - [How to contribute to the OpenBB Platform?](#how-to-contribute-to-the-openbb-platform) + - [Manage environment and dependencies](#manage-environment-and-dependencies) - [Add a new data point](#add-a-new-data-point) - [Identify which type of data you want to add](#identify-which-type-of-data-you-want-to-add) - [Check if the standard model exists](#check-if-the-standard-model-exists) @@ -28,7 +29,6 @@ - [Make the provider visible](#make-the-provider-visible) - [Manage extensions](#manage-extensions) - [Add an extension as a dependency](#add-an-extension-as-a-dependency) - - [Manage environment and dependencies](#manage-environment-and-dependencies) - [How to create a PR?](#how-to-create-a-pr) - [Install pre-commit hooks](#install-pre-commit-hooks) - [Branch Naming Conventions](#branch-naming-conventions) @@ -40,7 +40,7 @@ The OpenBB Platform is built by the Open-Source community and is characterized b The REST API is built on top of FastAPI and can be started by running the following command from the root: ```bash -uvicorn openbb_platform.platform.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload ``` The Python interfaces we provide to users is the `openbb` python package. @@ -97,9 +97,9 @@ The standardization framework is a very powerful tool, but it has some caveats t ### Standard QueryParams Example ```python -class StockHistoricalQueryParams(QueryParams, BaseSymbol): +class StockHistoricalQueryParams(QueryParams): """Stock end of day Query.""" - + symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) start_date: Optional[date] = Field( description=QUERY_DESCRIPTIONS.get("start_date", ""), default=None ) @@ -108,7 +108,7 @@ class StockHistoricalQueryParams(QueryParams, BaseSymbol): ) ``` -The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters. The `BaseSymbol` is a helper class that contains the `symbol` field and an upper case validator. +The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters The OpenBB Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. @@ -166,9 +166,9 @@ The high level steps are: You will get your data either from a CSV file, local database or from an API endpoint. -If you don't want to partake in the data standardization framework, you can simply write all the logic straight inside the router file. This is usually the case when you are adding alternative data that isn't easily standardizable. +If you don't want or don't need to partake in the data standardization framework, you have the option to add all the logic straight inside the router file. This is usually the case when you are returning custom data from your local CSV file, or similar. Keep in mind that we also serve the REST API and that you shouldn't send non-serializable objects as a response (e.g. a pandas dataframe). -Saying that, we recommend following the standardization framework, as it will make your life easier in the long run and unlock a set of features that are only available to standardized data. +Saying that, we highly recommend following the standardization framework, as it will make your life easier in the long run and unlock a set of features that are only available to standardized data. When standardizing, all data is defined using two different pydantic models: @@ -190,7 +190,7 @@ After you've defined both models, you'll need to define a `Fetcher` class which After finalizing your models, you need to make them visible to the Openbb Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](platform/provider/openbb_provider/abstract/provider.py). -Any command, using the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. +Any command, that uses the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. If you're not sure what's a command and why is it even using the `Fetcher` class, follow along! @@ -348,6 +348,47 @@ There are many ways to contribute to the OpenBB Platform. You can add a new data In this document, we'll be focusing on adding a new data point to the OpenBB Platform. +## Manage environment and dependencies + +In order to contribute to the OpenBB Platform, you need to setup your environment to ensure a smooth development experience. + +
+Need help setting up Miniconda or Git? + +Sometimes, installing Miniconda or Git can be a bit tricky, so we've prepared a set of instructions to help you get started. + +Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installation/source) for more information. +
+ +1. Clone the repository: + + ```bash + git clone git@github.com:OpenBB-finance/OpenBBTerminal.git + ``` + +2. Create and activate a virtual environment: + + > Supported python versions: python = ">=3.8,<3.12" + + ```bash + conda create -n "obb-dev" python=3.9.13 + conda activate obb-dev + ``` + +3. Manage your environment with [Poetry](https://python-poetry.org/): + + ```bash + pip install poetry + ``` + +4. Install the packages using the `dev_install.py` script located in the `openbb_platform` folder: + + ```bash + python dev_install.py + ``` + + > To install all the packages, including extras, use the `-e` argument with the above script. + ## Add a new data point In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. @@ -406,7 +447,7 @@ class StockHistoricalData(StockHistoricalData): ``` -> Note that, since `StockHistoricalData` inherits from pydantic's `BaseModel`, so we can leverage validators to perform additional checks on the output model. A very good example of this, would be to transform a string date into a datetime object. +> Note that, since `StockHistoricalData` inherits from pydantic's `BaseModel`, we can leverage validators to perform additional checks on the output model. A very good example of this, would be to transform a string date into a datetime object. #### Build the Fetcher @@ -483,13 +524,19 @@ After running `pip install .` on `openbb_platform/providers/` you To install an extension hosted on PyPI, use the `pip install ` command. -> To install this in editable mode, add the `-e` argument. +To install an extension that is developed locally, ensure that it contains a `pyproject.toml` file and then use the `pip install ` command. + +> To install the extension in editable mode using pip, add the `-e` argument. -To install an extension that is developed locally, ensure that it contains a `pyproject.toml` file. Then use the command `poetry lock` to create a `.lock` file. +Alternatively, for local extensions, you can add this line in the `LOCAL_DEPS` variable in `dev_install.py` file: -Now, you can use the command `poetry install ` to install the extension. +```toml +# If this is a community dependency, add this under "Community dependencies", +# with additional argument optional = true +openbb-extension = { path = "", develop = true } +``` -> To install it in editable mode use the `-C` argument. +Now you can use the `python dev_install.py [-e]` command to install the local extension. ### Add an extension as a dependency @@ -500,46 +547,7 @@ To add the `openbb-qa` extension as a dependency, you'll need to add it to the ` openbb-qa = "^0.0.0a2" ``` -## Manage environment and dependencies - -In order to contribute to the OpenBB Platform, you need to setup your environment to ensure a smooth development experience. - -
-Need help setting up Miniconda or Git? - -Sometimes, installing Miniconda or Git can be a bit tricky, so we've prepared a set of instructions to help you get started. - -Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installation/pypi) for more information. -
- -1. Clone the repository: - - ```bash - git clone git@github.com:OpenBB-finance/OpenBBTerminal.git - ``` - -2. Create and activate a virtual environment: - - > Supported python versions: python = ">=3.8,<3.12" - - ```bash - conda create -n "obb-dev" python=3.9.13 - conda activate obb-dev - ``` - -3. Manage your environment with [Poetry](https://python-poetry.org/): - - ```bash - pip install poetry - ``` - -4. Install the packages using the `dev_install.py` script located in the `openbb_platform` folder: - - ```bash - python dev_install.py - ``` - - > To install all the packages, including extras, use the `-e` argument with the above script. +Then you can follow the same process as above to install the extension. ## How to create a PR? @@ -567,4 +575,4 @@ The accepted branch naming conventions are: - `hotfix/hotfix-name` - `release/2.1.0` or `release/2.1.0rc0`. -All `feature/feature-name` related branches can only have PRs pointing to `develop` branch. `hotfix/hotfix-name` and `release/2.1.0` or `release/2.1.0rc0` branches can only have PRs pointing to `main` branch. +All `feature/feature-name` and `hotfix/hotfix-name` related branches can only have PRs pointing to `develop` branch. From 5cb5b7723fc1d2af010b4fa6434972cda1eee9c0 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:57:07 +0200 Subject: [PATCH 06/23] Fix --- openbb_platform/CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 0881a5d4005a..710482359331 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -573,6 +573,5 @@ The accepted branch naming conventions are: - `feature/feature-name` - `hotfix/hotfix-name` -- `release/2.1.0` or `release/2.1.0rc0`. -All `feature/feature-name` and `hotfix/hotfix-name` related branches can only have PRs pointing to `develop` branch. +These branches can only have PRs pointing to the `develop` branch. From 262121d7df7276c3ba3154b7747a0ec369fb04fb Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Sun, 1 Oct 2023 16:07:05 +0200 Subject: [PATCH 07/23] Create Contributing section on the Website --- .../platform/contributing/_category_.json | 4 + .../extension-development/_category_.json | 4 + .../extension-development/custom_data.md | 78 +++ .../extension-development/index.md | 25 + .../contributing/extension-development/qa.md | 71 +++ .../extension-development/share_extension.md | 55 ++ .../content/platform/contributing/index.md | 43 ++ .../contributing/introduction/_category_.json | 4 + .../introduction/data_standardization.md | 69 +++ .../contributing/introduction/extensions.md | 24 + .../platform-development/_category_.json | 4 + .../platform-development/add_data_point.md | 139 +++++ .../platform-development/create_pr.md | 35 ++ .../environments_dependencies.md | 49 ++ .../platform-development/index.md | 16 + .../platform-development/manage_extensions.md | 37 ++ website/yarn.lock | 540 +++++++++++------- 17 files changed, 992 insertions(+), 205 deletions(-) create mode 100644 website/content/platform/contributing/_category_.json create mode 100644 website/content/platform/contributing/extension-development/_category_.json create mode 100644 website/content/platform/contributing/extension-development/custom_data.md create mode 100644 website/content/platform/contributing/extension-development/index.md create mode 100644 website/content/platform/contributing/extension-development/qa.md create mode 100644 website/content/platform/contributing/extension-development/share_extension.md create mode 100644 website/content/platform/contributing/index.md create mode 100644 website/content/platform/contributing/introduction/_category_.json create mode 100644 website/content/platform/contributing/introduction/data_standardization.md create mode 100644 website/content/platform/contributing/introduction/extensions.md create mode 100644 website/content/platform/contributing/platform-development/_category_.json create mode 100644 website/content/platform/contributing/platform-development/add_data_point.md create mode 100644 website/content/platform/contributing/platform-development/create_pr.md create mode 100644 website/content/platform/contributing/platform-development/environments_dependencies.md create mode 100644 website/content/platform/contributing/platform-development/index.md create mode 100644 website/content/platform/contributing/platform-development/manage_extensions.md diff --git a/website/content/platform/contributing/_category_.json b/website/content/platform/contributing/_category_.json new file mode 100644 index 000000000000..d6b490c4bee8 --- /dev/null +++ b/website/content/platform/contributing/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Contributing", + "position": 2 +} diff --git a/website/content/platform/contributing/extension-development/_category_.json b/website/content/platform/contributing/extension-development/_category_.json new file mode 100644 index 000000000000..e5d78b7a1e97 --- /dev/null +++ b/website/content/platform/contributing/extension-development/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Extension Development", + "position": 2 +} diff --git a/website/content/platform/contributing/extension-development/custom_data.md b/website/content/platform/contributing/extension-development/custom_data.md new file mode 100644 index 000000000000..9cdf5bc1843c --- /dev/null +++ b/website/content/platform/contributing/extension-development/custom_data.md @@ -0,0 +1,78 @@ +--- +title: Add a custom data source +sidebar_position: 2 +description: How to add a custom data source to the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +You will get your data either from a CSV file, local database or from an API endpoint. + +If you don't want or don't need to partake in the data standardization framework, you have the option to add all the logic straight inside the router file. This is usually the case when you are returning custom data from your local CSV file, or similar. Keep in mind that we also serve the REST API and that you shouldn't send non-serializable objects as a response (e.g. a pandas dataframe). + +Saying that, we highly recommend following the standardization framework, as it will make your life easier in the long run and unlock a set of features that are only available to standardized data. + +When standardizing, all data is defined using two different pydantic models: + +1. Define the [query parameters](platform/provider/openbb_provider/abstract/query_params.py) model. +2. Define the resulting [data schema](platform/provider/openbb_provider/abstract/data.py) model. + +> The models can be entirely custom, or inherit from the OpenBB standardized models. +> They enforce a safe and consistent data structure, validation and type checking. + +We call this the ***Know-Your-Data*** principle. + +After you've defined both models, you'll need to define a `Fetcher` class which contains three methods: + +1. `transform_query` - transforms the query parameters to the format of the API endpoint. +2. `extract_data` - makes the request to the API endpoint and returns the raw data. +3. `transform_data` - transforms the raw data into the defined data model. + +> Note that the `Fetcher` should inherit from the [`Fetcher`](platform/provider/openbb_provider/abstract/fetcher.py) class, which is a generic class that receives the query parameters and the data model as type parameters. + +After finalizing your models, you need to make them visible to the Openbb Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](platform/provider/openbb_provider/abstract/provider.py). + +Any command, that uses the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. + +If you're not sure what's a command and why is it even using the `Fetcher` class, follow along! + +## OpenBB Platform commands + +The OpenBB Platform will enable you to query and output your data in a very simple way. + +> Any Platform endpoint will be available both from a Python interface and the API. + +The command definition on the Platform follows [FastAPI](https://fastapi.tiangolo.com/) conventions, meaning that you'll be creating **endpoints**. + +The Cookiecutter template generates for you a `router.py` file with a set of examples that you can follow, namely: + +- Perform a simple `GET` and `POST` request - without worrying on any custom data definition. +- Using a custom data definition so you get your data the exact way you want it. + +You can expect the following endpoint structure when using a `Fetcher` to serve the data: + +```python +@router.command(model="Example") +def model_example( + cc: CommandContext, + provider_choices: ProviderChoices, + standard_params: StandardParams, + extra_params: ExtraParams, +) -> OBBject[BaseModel]: + """Example Data.""" + return OBBject(results=Query(**locals()).execute()) +``` + +Let's break it down: + +- `@router.command(...)` - this tells the OpenBB Platform that this is a command. +- `model="Example"` - this is the name of the `Fetcher` dictionary key that you've defined in the `__init__.py` file of the `/` folder. +- `cc: CommandContext` - this contains a set of user and system settings that is useful during the execution of the command - eg. api keys. +- `provider_choices: ProviderChoices` - all the providers that implement the `Example` `Fetcher`. +- `standard_params: StandardParams` - standardized parameters that are common to all providers that implement the `Example` `Fetcher`. +- `extra_params: ExtraParams` - it contains the provider specific arguments that are not standardized. + +You only need to change the `model` parameter to the name of the `Fetcher` dictionary key and everything else will be handled by the OpenBB Platform. diff --git a/website/content/platform/contributing/extension-development/index.md b/website/content/platform/contributing/extension-development/index.md new file mode 100644 index 000000000000..ece37f578320 --- /dev/null +++ b/website/content/platform/contributing/extension-development/index.md @@ -0,0 +1,25 @@ +--- +title: Extension Development +sidebar_position: 1 +description: Introduction to the Extensions inside OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +We have a Cookiecutter template that will help you get started. It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate. + +Please refer to the [Cookiecutter template](https://github.com/OpenBB-finance/openbb-cookiecutter) and follow the instructions there. + +This section will walk you through the steps of adding a new extension to the OpenBB Platform. + +The high level steps are: + +- Generate the extension structure +- Install your dependencies +- Install your new package +- Use your extension (either from Python or the API interface) +- QA your extension +- Share your extension with the community diff --git a/website/content/platform/contributing/extension-development/qa.md b/website/content/platform/contributing/extension-development/qa.md new file mode 100644 index 000000000000..9a73d1a15d4c --- /dev/null +++ b/website/content/platform/contributing/extension-development/qa.md @@ -0,0 +1,71 @@ +--- +title: Extension QA +sidebar_position: 3 +description: How to QA your extension +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +We are strong believers in the QA process and we want to make sure that all the extensions that are added to the OpenBB Platform are of high quality. To ensure this, we have a set of QA tools that you can use to test your extension. + +Primarily, we have tools that semi-automate the creation of unit and integration tests. + +> The QA tools are still in development and we are constantly improving them. + +## Unit tests + +Each `Fetcher` comes equipped with a `test` method that will ensure that it is implemented correctly and that it is returning the expected data. It also ensures that all types are correct and that the data is valid. + +To create unit tests for your Fetchers, you can run the following command: + +```bash +python openbb_platform/providers/tests/utils/unit_test_generator.py +``` + +> Note that you should be running this file from the root of the repository. + +The automatic unit test generation will add unit tests for all the fetchers available in a given provider. + +> Note that sometimes manual intervention is needed. For example, adjusting out-of-top level imports or adding specific arguments for a given fetcher. + +## Integration tests + +The integration tests are a bit more complex than the unit tests, as we want to test both the Python interface and the API interface. For this, we have two scripts that will help you generate the integration tests. + +To generate the integration tests for the Python interface, you can run the following command: + +```bash +python openbb_platform/extensions/tests/utils/integration_tests_generator.py +``` + +To generate the integration tests for the API interface, you can run the following command: + +```bash +python openbb_platform/extensions/tests/utils/integration_tests_api_generator.py +``` + +When testing the API interface, you'll need to run the OpenBB Platform locally before running the tests. To do so, you can run the following command: + +```bash +uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +``` + +These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. + +## Import time + +We aim to have a short import time for the package. To measure that we use `tuna`. + +- + +To visualize the import time breakdown by module and find potential bottlenecks, run the +following commands from `openbb_platform` directory: + +```bash +pip install tuna +python -X importtime openbb/__init__.py 2> import.log +tuna import.log +``` diff --git a/website/content/platform/contributing/extension-development/share_extension.md b/website/content/platform/contributing/extension-development/share_extension.md new file mode 100644 index 000000000000..0addd688e7ad --- /dev/null +++ b/website/content/platform/contributing/extension-development/share_extension.md @@ -0,0 +1,55 @@ +--- +title: Share your extension +sidebar_position: 4 +description: How to share your extension with the community +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +We encourage you to share your extension with the community. You can do that by publishing it to PyPI. + +## Publish your extension to PyPI + +To publish your extension to PyPI, you'll need to have a PyPI account and a PyPI API token. + +### Setup + +Create an account and get an API token from +Store the token with + +```bash +poetry config pypi-token.pypi pypi-YYYYYYYY +``` + +### Release + +`cd` into the directory where your extension `pyproject.toml` lives and make sure that the `pyproject.toml` specifies the version tag you want to release and run. + +```bash +poetry build +``` + +This will create a `/dist` folder in the directory, which will contain the `.whl` and `tar.gz` files matching the version to release. + +If you want to test your package locally you can do it with + +```bash +pip install dist/openbb_[FILE_NAME].whl +``` + +### Publish + +To publish your package to PyPI run: + +```bash +poetry publish +``` + +Now, you can pip install your package from PyPI with: + +```bash +pip install openbb-some_ext +``` diff --git a/website/content/platform/contributing/index.md b/website/content/platform/contributing/index.md new file mode 100644 index 000000000000..e74f0abe310c --- /dev/null +++ b/website/content/platform/contributing/index.md @@ -0,0 +1,43 @@ +--- +title: Introduction to the OpenBB Platform +sidebar_position: 1 +description: Introduction to the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The OpenBB Platform is built by the Open-Source community and is characterized by its core and extensions. The core handles data integration and standardization, while the extensions enable customization and advanced functionalities. The OpenBB Platform is designed to be used both from a Python interface and a REST API. + +The REST API is built on top of FastAPI and can be started by running the following command from the root: + +```bash +uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload +``` + +The Python interfaces we provide to users is the `openbb` python package. + +The code you will find in this package is generated from a script and it is just a wrapper around the `openbb-core` and any installed extensions. + +When the user runs `import openbb`, `from openbb import obb` or other variants, the script that generates the package code is triggered. It detects if there are new openbb extensions installed in the environment and rebuilds the package code accordingly. If new extensions are not found, it just uses the current package version. + +When you are developing chances are you want to manually trigger the package rebuild. + +You can do that with: + +```python +python -c "import openbb; openbb.build()" +``` + +The Python interface can be imported with: + +```python +from openbb import obb +``` + +This section will take you through two types of contributions: + +1. Building a custom extension +2. Contributing directly to the OpenBB Platform diff --git a/website/content/platform/contributing/introduction/_category_.json b/website/content/platform/contributing/introduction/_category_.json new file mode 100644 index 000000000000..5672045964cc --- /dev/null +++ b/website/content/platform/contributing/introduction/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Introduction", + "position": 1 +} diff --git a/website/content/platform/contributing/introduction/data_standardization.md b/website/content/platform/contributing/introduction/data_standardization.md new file mode 100644 index 000000000000..5f8bea182141 --- /dev/null +++ b/website/content/platform/contributing/introduction/data_standardization.md @@ -0,0 +1,69 @@ +--- +title: Data Standardization +sidebar_position: 1 +description: What is data standardization and how does it work inside the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. + +Each data model should inherit from a [standard data](platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. + +Usage of these models will unlock a set of perks that are only available to standardized data, namely: + +- Can query and output data in a standardized way. +- Can expect extensions that follow standardization to work out-of-the-box. +- Can expect transparently defined schemas for the data that is returned by the API. +- Can expect consistent data types and validation. +- Will work seamlessly with other providers that use the same standard model. + +The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. + +They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. + +## Standardization Caveats + +The standardization framework is a very powerful tool, but it has some caveats that you should be aware of: + +- We standardize fields that are shared between two or more providers. If there is a third provider that doesn't share the same fields, we will declare it as an `Optional` field. +- When mapping the column names from a provider-specific model to the standard model, the CamelCase to snake_case conversion is done automatically. If the column names are not the same, you'll need to manually map them. (e.g. `o` -> `open`) +- The standard models are created and maintained by the OpenBB team. If you want to add a new field to a standard model, you'll need to open a PR to the OpenBB Platform. + +## Standard QueryParams Example + +```python +class StockHistoricalQueryParams(QueryParams): + """Stock end of day Query.""" + symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) + start_date: Optional[date] = Field( + description=QUERY_DESCRIPTIONS.get("start_date", ""), default=None + ) + end_date: Optional[date] = Field( + description=QUERY_DESCRIPTIONS.get("end_date", ""), default=None + ) +``` + +The `QueryParams` is an abstract class that just tells us that we are dealing with query parameters + +The OpenBB Platform dynamically knows where the standard models begin in the inheritance tree, so you don't need to worry about it. + +## Standard Data Example + +```python +class StockHistoricalData(Data): + """Stock end of day price Data.""" + + date: datetime = Field(description=DATA_DESCRIPTIONS.get("date", "")) + open: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("open", "")) + high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", "")) + low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", "")) + close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", "")) + volume: float = Field(description=DATA_DESCRIPTIONS.get("volume", "")) + vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", ""), default=None) +``` + +The `Data` class is an abstract class that tells us the expected output data. Here we can see a `vwap` field that is `Optional`. This is because not all providers share this field while it is shared between two or more providers. diff --git a/website/content/platform/contributing/introduction/extensions.md b/website/content/platform/contributing/introduction/extensions.md new file mode 100644 index 000000000000..30f32fc815d0 --- /dev/null +++ b/website/content/platform/contributing/introduction/extensions.md @@ -0,0 +1,24 @@ +--- +title: Extensions in the OpenBB Platform +sidebar_position: 2 +description: Introduction to the Extensions inside OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +An extension adds functionality to the OpenBB Platform. It can be a new data source, a new command, a new visualization, etc. + +## Types of extensions + +We primarily have 3 types of extensions: + +1. OpenBB Extensions - built and maintained by the OpenBB team (e.g. `openbb-stocks`) +2. Community Extensions - built by anyone and primarily maintained by OpenBB (e.g. `openbb-yfinance`) +3. Independent Extensions - built and maintained independently by anyone + +If your extension is of high quality and you think that it would be a good community extension, you can open a PR to the OpenBB Platform repository and we'll review it. + +We encourage independent extensions to be shared with the community by publishing them to PyPI. diff --git a/website/content/platform/contributing/platform-development/_category_.json b/website/content/platform/contributing/platform-development/_category_.json new file mode 100644 index 000000000000..5832b96bf414 --- /dev/null +++ b/website/content/platform/contributing/platform-development/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Platform Development", + "position": 3 +} diff --git a/website/content/platform/contributing/platform-development/add_data_point.md b/website/content/platform/contributing/platform-development/add_data_point.md new file mode 100644 index 000000000000..226a19f46b93 --- /dev/null +++ b/website/content/platform/contributing/platform-development/add_data_point.md @@ -0,0 +1,139 @@ +--- +title: Add a new data point +sidebar_position: 3 +description: How to add a new data point to the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. + +## Identify which type of data you want to add + +In this example, we'll be adding OHLC stock data that is used by the `obb.stocks.load` command. + +Note that, if no command exists for your data, we need to add one under the right router. +Each router is categorized under different extensions (stocks, forex, crypto, etc.). + +### Check if the standard model exists + +Given the fact that there's already an endpoint for OHLCV stock data, we can check if the standard exists. + +In this case, it's `StockHistorical` which can be found inside the `./platform/core/provider/openbb_provider/standard_models/` directory. + +If the standard model doesn't exist: + +- you won't need to inherit from it in the next steps. +- all your provider query parameters will be under the `**kwargs` in the python interface. +- it might not work out-of-the box with other extensions that follow standardization e.g. the `charting` extension + +### Create Query Parameters model + +Query Parameters are the parameters that are passed to the API endpoint in order to make the request. + +For the `StockHistorical` example, this would look like the following: + +```python + +class StockHistoricalQueryParams(StockHistoricalQueryParams): + """ Stock Historical Query. + + Source: https://www..co/documentation/ + """ + + # provider specific query parameters if any + +``` + +### Create Data Output model + +The data output is the data that is returned by the API endpoint. +For the `StockHistorical` example, this would look like the following: + +```python + +class StockHistoricalData(StockHistoricalData): + """ Stock End of Day Data. + + Source: https://www..co/documentation/ + """ + + # provider specific data output fields if any + +``` + +> Note that, since `StockHistoricalData` inherits from pydantic's `BaseModel`, we can leverage validators to perform additional checks on the output model. A very good example of this, would be to transform a string date into a datetime object. + +### Build the Fetcher + +The `Fetcher` class is responsible for making the request to the API endpoint and providing the output. + +It will receive the Query Parameters, and it will return the output while leveraging the pydantic model schemas. + +For the `StockHistorical` example, this would look like the following: + +```python +class StockHistoricalFetcher( + Fetcher[ + StockHistoricalQueryParams, + List[StockHistoricalData], + ] +): + """Transform the query, extract and transform the data.""" + + @staticmethod + def transform_query(params: Dict[str, Any]) -> StockHistoricalQueryParams: + """Transform the query parameters.""" + + return StockHistoricalQueryParams(**transformed_params) + + @staticmethod + def extract_data( + query: StockHistoricalQueryParams, + credentials: Optional[Dict[str, str]], + **kwargs: Any, + ) -> dict: + """Return the raw data from the endpoint.""" + + obtained_data = my_request(query, credentials, **kwargs) + + return obtained_data + + @staticmethod + def transform_data( + data: dict, + ) -> List[StockHistoricalData]: + """Transform the data to the standard format.""" + + return [StockHistoricalData.model_validate(d) for d in data] +``` + +> Make sure that you're following the TET pattern when building a `Fetcher` - **Transform, Extract, Transform**. + +## Make the provider visible + +In order to make the new provider visible to the OpenBB Platform, you'll need to add it to the `__init__.py` file of the `providers//openbb_/` folder. + +```python +""" Provider module.""" +from openbb_provider.abstract.provider import Provider + +from openbb_.models.stock_eod import StockHistoricalFetcher + +_provider = Provider( + name="", + website="", + description="Provider description goes here", + required_credentials=["api_key"], + fetcher_dict={ + "StockHistorical": StockHistoricalFetcher, + }, +) +``` + +If the provider does not require any credentials, you can remove that parameter. On the other hand, if it requires more than 2 items to authenticate, you can add a list of all the required items to the `required_credentials` list. + +After running `pip install .` on `openbb_platform/providers/` your provider should be ready for usage, both from the Python interface and the API. diff --git a/website/content/platform/contributing/platform-development/create_pr.md b/website/content/platform/contributing/platform-development/create_pr.md new file mode 100644 index 000000000000..8ed46f6bf23f --- /dev/null +++ b/website/content/platform/contributing/platform-development/create_pr.md @@ -0,0 +1,35 @@ +--- +title: Create a Pull Request +sidebar_position: 5 +description: How to create a Pull Request +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +To create a PR to the OpenBB Platform, you'll need to fork the repository and create a new branch. + +1. Create your Feature Branch, e.g. `git checkout -b feature/AmazingFeature` +2. Check the files you have touched using `git status` +3. Stage the files you want to commit, e.g. + `git add openbb_terminal/stocks/stocks_controller.py openbb_terminal/stocks/stocks_helper.py`. + Note: **DON'T** add any files with personal information. +4. Write a concise commit message under 50 characters, e.g. `git commit -m "meaningful commit message"`. If your PR + solves an issue raised by a user, you may specify such issue by adding #ISSUE_NUMBER to the commit message, so that + these get linked. Note: If you installed pre-commit hooks and one of the formatters re-formats your code, you'll need + to go back to step 3 to add these. + +## Install pre-commit hooks + +To install pre-commit hooks, run `pre-commit install` in the root of the repository. + +## Branch Naming Conventions + +The accepted branch naming conventions are: + +- `feature/feature-name` +- `hotfix/hotfix-name` + +These branches can only have PRs pointing to the `develop` branch. diff --git a/website/content/platform/contributing/platform-development/environments_dependencies.md b/website/content/platform/contributing/platform-development/environments_dependencies.md new file mode 100644 index 000000000000..eada1a1740f0 --- /dev/null +++ b/website/content/platform/contributing/platform-development/environments_dependencies.md @@ -0,0 +1,49 @@ +--- +title: Setup your development environment +sidebar_position: 2 +description: How to setup your development environment +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +In order to contribute to the OpenBB Platform, you need to setup your environment to ensure a smooth development experience. + +
+Need help setting up Miniconda or Git? + +Sometimes, installing Miniconda or Git can be a bit tricky, so we've prepared a set of instructions to help you get started. + +Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installation/source) for more information. +
+ +1. Clone the repository: + + ```bash + git clone git@github.com:OpenBB-finance/OpenBBTerminal.git + ``` + +2. Create and activate a virtual environment: + + > Supported python versions: python = ">=3.8,<3.12" + + ```bash + conda create -n "obb-dev" python=3.9.13 + conda activate obb-dev + ``` + +3. Manage your environment with [Poetry](https://python-poetry.org/): + + ```bash + pip install poetry + ``` + +4. Install the packages using the `dev_install.py` script located in the `openbb_platform` folder: + + ```bash + python dev_install.py + ``` + + > To install all the packages, including extras, use the `-e` argument with the above script. diff --git a/website/content/platform/contributing/platform-development/index.md b/website/content/platform/contributing/platform-development/index.md new file mode 100644 index 000000000000..074157d1daa0 --- /dev/null +++ b/website/content/platform/contributing/platform-development/index.md @@ -0,0 +1,16 @@ +--- +title: OpenBB Platform Development +sidebar_position: 1 +description: Introduction to the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +There are many ways to contribute to the OpenBB Platform. You can add a new data point, add a new command, add a new visualization, add a new extension, fix a bug etc. + +In this section, we'll be focusing on adding a new data point to the OpenBB Platform. + +Before that, we will need to setup our development environment. diff --git a/website/content/platform/contributing/platform-development/manage_extensions.md b/website/content/platform/contributing/platform-development/manage_extensions.md new file mode 100644 index 000000000000..d70cfb3326e4 --- /dev/null +++ b/website/content/platform/contributing/platform-development/manage_extensions.md @@ -0,0 +1,37 @@ +--- +title: Manage Extensions +sidebar_position: 4 +description: How to manage extensions in the OpenBB Platform +keywords: [openbb, platform, introduction] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + + +To install an extension hosted on PyPI, use the `pip install ` command. + +To install an extension that is developed locally, ensure that it contains a `pyproject.toml` file and then use the `pip install ` command. + +> To install the extension in editable mode using pip, add the `-e` argument. + +Alternatively, for local extensions, you can add this line in the `LOCAL_DEPS` variable in `dev_install.py` file: + +```toml +# If this is a community dependency, add this under "Community dependencies", +# with additional argument optional = true +openbb-extension = { path = "", develop = true } +``` + +Now you can use the `python dev_install.py [-e]` command to install the local extension. + +## Add an extension as a dependency + +To add the `openbb-qa` extension as a dependency, you'll need to add it to the `pyproject.toml` file: + +```toml +[tool.poetry.dependencies] +openbb-qa = "^0.0.0a2" +``` + +Then you can follow the same process as above to install the extension. diff --git a/website/yarn.lock b/website/yarn.lock index 2450c055ac92..1e9165a11903 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -84,7 +84,7 @@ "@algolia/requester-common" "4.20.0" "@algolia/transporter" "4.20.0" -"@algolia/client-search@4.20.0": +"@algolia/client-search@>= 4.9.1 < 6", "@algolia/client-search@4.20.0": version "4.20.0" resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.20.0.tgz" integrity sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg== @@ -158,6 +158,27 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.14.tgz" integrity sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw== +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.18.6", "@babel/core@^7.19.6", "@babel/core@^7.4.0-0": + version "7.20.12" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz" + integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.7" + "@babel/helper-compilation-targets" "^7.20.7" + "@babel/helper-module-transforms" "^7.20.11" + "@babel/helpers" "^7.20.7" + "@babel/parser" "^7.20.7" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.12" + "@babel/types" "^7.20.7" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.0" + "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz" @@ -180,27 +201,6 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.18.6", "@babel/core@^7.19.6": - version "7.20.12" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz" - integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helpers" "^7.20.7" - "@babel/parser" "^7.20.7" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.12" - "@babel/types" "^7.20.7" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - "@babel/generator@^7.12.5", "@babel/generator@^7.18.7", "@babel/generator@^7.20.7": version "7.20.14" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.20.14.tgz" @@ -332,16 +332,16 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-plugin-utils@7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.20.2" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz" integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== +"@babel/helper-plugin-utils@7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz" + integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== + "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz" @@ -524,15 +524,6 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@7.12.1": - version "7.12.1" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz" - integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-transform-parameters" "^7.12.1" - "@babel/plugin-proposal-object-rest-spread@^7.20.2": version "7.20.7" resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz" @@ -544,6 +535,15 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.20.7" +"@babel/plugin-proposal-object-rest-spread@7.12.1": + version "7.12.1" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz" + integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-proposal-optional-catch-binding@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz" @@ -636,13 +636,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@7.12.1": - version "7.12.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz" - integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz" @@ -650,6 +643,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-syntax-jsx@7.12.1": + version "7.12.1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz" + integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" @@ -671,7 +671,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@7.8.3", "@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": +"@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3", "@babel/plugin-syntax-object-rest-spread@7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== @@ -1212,9 +1212,9 @@ "@docsearch/css" "3.5.2" algoliasearch "^4.19.1" -"@docusaurus/core@2.4.3", "@docusaurus/core@^2.4.3": +"@docusaurus/core@^2.4.3", "@docusaurus/core@2.4.3": version "2.4.3" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.4.3.tgz#d86624901386fd8164ce4bff9cc7f16fde57f523" + resolved "https://registry.npmjs.org/@docusaurus/core/-/core-2.4.3.tgz" integrity sha512-dWH5P7cgeNSIg9ufReX6gaCl/TmrGKD38Orbwuz05WPhAQtFXHd5B8Qym1TiXfvUNvwoYKkAJOJuGe8ou0Z7PA== dependencies: "@babel/core" "^7.18.6" @@ -1330,7 +1330,7 @@ url-loader "^4.1.1" webpack "^5.73.0" -"@docusaurus/module-type-aliases@2.4.3": +"@docusaurus/module-type-aliases@^2.4.3", "@docusaurus/module-type-aliases@2.4.3": version "2.4.3" resolved "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.3.tgz" integrity sha512-cwkBkt1UCiduuvEAo7XZY01dJfRn7UR/75mBgOdb1hKknhrabJZ8YH+7savd/y9kLExPyrhe0QwdS9GuzsRRIA== @@ -1344,23 +1344,9 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" -"@docusaurus/module-type-aliases@^2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.3.tgz#d08ef67e4151e02f352a2836bcf9ecde3b9c56ac" - integrity sha512-cwkBkt1UCiduuvEAo7XZY01dJfRn7UR/75mBgOdb1hKknhrabJZ8YH+7savd/y9kLExPyrhe0QwdS9GuzsRRIA== - dependencies: - "@docusaurus/react-loadable" "5.5.2" - "@docusaurus/types" "2.4.3" - "@types/history" "^4.7.11" - "@types/react" "*" - "@types/react-router-config" "*" - "@types/react-router-dom" "*" - react-helmet-async "*" - react-loadable "npm:@docusaurus/react-loadable@5.5.2" - "@docusaurus/plugin-client-redirects@^2.4.3": version "2.4.3" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.3.tgz#0da7e6facadbca3bd7cb8d0453f21bea7f4f1721" + resolved "https://registry.npmjs.org/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.3.tgz" integrity sha512-iCwc/zH8X6eNtLYdyUJFY6+GbsbRgMgvAC/TmSmCYTmwnoN5Y1Bc5OwUkdtoch0XKizotJMRAmGIAhP8sAetdQ== dependencies: "@docusaurus/core" "2.4.3" @@ -1395,9 +1381,9 @@ utility-types "^3.10.0" webpack "^5.73.0" -"@docusaurus/plugin-content-docs@2.4.3", "@docusaurus/plugin-content-docs@^2.4.3": +"@docusaurus/plugin-content-docs@^2.4.3", "@docusaurus/plugin-content-docs@2.4.3": version "2.4.3" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.3.tgz#aa224c0512351e81807adf778ca59fd9cd136973" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.3.tgz" integrity sha512-N7Po2LSH6UejQhzTCsvuX5NOzlC+HiXOVvofnEPj0WhMu1etpLEXE6a4aTxrtg95lQ5kf0xUIdjX9sh3d3G76A== dependencies: "@docusaurus/core" "2.4.3" @@ -1490,7 +1476,7 @@ "@docusaurus/preset-classic@^2.4.3": version "2.4.3" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.4.3.tgz#074c57ebf29fa43d23bd1c8ce691226f542bc262" + resolved "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.4.3.tgz" integrity sha512-tRyMliepY11Ym6hB1rAFSNGwQDpmszvWYJvlK1E+md4SW8i6ylNHtpZjaYFff9Mdk3i/Pg8ItQq9P0daOJAvQw== dependencies: "@docusaurus/core" "2.4.3" @@ -1507,7 +1493,7 @@ "@docusaurus/theme-search-algolia" "2.4.3" "@docusaurus/types" "2.4.3" -"@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": +"@docusaurus/react-loadable@5.5.2": version "5.5.2" resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== @@ -1598,7 +1584,7 @@ fs-extra "^10.1.0" tslib "^2.4.0" -"@docusaurus/types@2.4.3": +"@docusaurus/types@*", "@docusaurus/types@2.4.3": version "2.4.3" resolved "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.3.tgz" integrity sha512-W6zNLGQqfrp/EoPD0bhb9n7OobP+RHpmvVzpA+Z/IuU3Q63njJM24hmT0GYboovWcDtFmnIJC9wcyx4RVPQscw== @@ -1711,7 +1697,16 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.2" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/gen-mapping@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== @@ -1738,7 +1733,7 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@1.4.14": version "1.4.14" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== @@ -1799,7 +1794,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -2199,7 +2194,7 @@ "@svgr/babel-plugin-transform-react-native-svg" "^6.5.1" "@svgr/babel-plugin-transform-svg-component" "^6.5.1" -"@svgr/core@^6.5.1": +"@svgr/core@*", "@svgr/core@^6.0.0", "@svgr/core@^6.5.1": version "6.5.1" resolved "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz" integrity sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw== @@ -2474,7 +2469,7 @@ "@types/history" "^4.7.11" "@types/react" "*" -"@types/react@*": +"@types/react@*", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^16.9.0 || ^17.0.0 || ^18.0.0", "@types/react@>= 16.8.0 < 19.0.0": version "18.0.27" resolved "https://registry.npmjs.org/@types/react/-/react-18.0.27.tgz" integrity sha512-3vtRKHgVxu3Jp9t718R9BuzoD4NcQ8YJ5XRzsSKxNDiDonD2MXIT1TmSkenxuCycZJoQT5d2vE8LwWJxBC1gmA== @@ -2714,7 +2709,17 @@ acorn@^7.0.0: resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1: +acorn@^8, acorn@^8.7.1: + version "8.8.2" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +acorn@^8.0.4: + version "8.8.2" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +acorn@^8.5.0: version "8.8.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -2751,7 +2756,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2761,7 +2766,17 @@ ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.8.0: +ajv@^8.0.0: + version "8.12.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ajv@^8.8.0, ajv@^8.8.2: version "8.12.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -2778,7 +2793,7 @@ algoliasearch-helper@^3.10.0: dependencies: "@algolia/events" "^4.0.1" -algoliasearch@^4.13.1, algoliasearch@^4.19.1: +algoliasearch@^4.13.1, algoliasearch@^4.19.1, "algoliasearch@>= 3.1 < 6", "algoliasearch@>= 4.9.1 < 6": version "4.20.0" resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.20.0.tgz" integrity sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g== @@ -2871,16 +2886,16 @@ aria-hidden@^1.1.1: dependencies: tslib "^2.0.0" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - array-flatten@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" @@ -3077,7 +3092,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.3, browserslist@^4.21.4: +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.3, browserslist@^4.21.4, "browserslist@>= 4.21.0": version "4.21.5" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz" integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== @@ -3136,7 +3151,7 @@ camel-case@^4.1.2: pascal-case "^3.1.2" tslib "^2.0.3" -camelcase-css@2.0.1, camelcase-css@^2.0.1: +camelcase-css@^2.0.1, camelcase-css@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== @@ -3324,16 +3339,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + colord@^2.9.1: version "2.9.3" resolved "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz" @@ -3369,7 +3384,12 @@ commander@^7.2.0: resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.0.0, commander@^8.3.0: +commander@^8.0.0: + version "8.3.0" + resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + +commander@^8.3.0: version "8.3.0" resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== @@ -3684,20 +3704,27 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== -debug@2.6.9, debug@^2.6.0: +debug@^2.6.0: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1: +debug@^4.1.0, debug@^4.1.1, debug@4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" @@ -3759,16 +3786,16 @@ del@^6.1.1: rimraf "^3.0.2" slash "^3.0.0" -depd@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - depd@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + destroy@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" @@ -3922,16 +3949,16 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - duplexer@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== +duplexer3@^0.1.4: + version "0.1.5" + resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz" + integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" @@ -4240,7 +4267,7 @@ fflate@^0.4.1: resolved "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz" integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== -file-loader@^6.2.0: +file-loader@*, file-loader@^6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz" integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== @@ -4451,7 +4478,14 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1, glob-parent@^6.0.2: +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== @@ -4789,6 +4823,16 @@ http-deceiver@^1.2.7: resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" @@ -4800,16 +4844,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-parser-js@>=0.5.1: version "0.5.8" resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz" @@ -4905,7 +4939,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3, inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4915,16 +4949,16 @@ inherits@2.0.3: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -ini@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" - integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== - ini@^1.3.5, ini@~1.3.0: version "1.3.8" resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +ini@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + inline-style-parser@0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz" @@ -4942,17 +4976,17 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - ipaddr.js@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz" integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== -is-alphabetical@1.0.4, is-alphabetical@^1.0.0: +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-alphabetical@^1.0.0, is-alphabetical@1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== @@ -5130,16 +5164,16 @@ is-yarn-global@^0.3.0: resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -5383,7 +5417,7 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.uniq@4.5.0, lodash.uniq@^4.5.0: +lodash.uniq@^4.5.0, lodash.uniq@4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== @@ -5526,7 +5560,7 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": +"mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -5536,14 +5570,40 @@ mime-db@~1.33.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz" integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== -mime-types@2.1.18, mime-types@~2.1.17: +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime-types@^2.1.31: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime-types@~2.1.17, mime-types@2.1.18: version "2.1.18" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz" integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" -mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@~2.1.24: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -5577,7 +5637,7 @@ minimalistic-assert@^1.0.0: resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -5953,6 +6013,13 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" @@ -5963,13 +6030,6 @@ path-to-regexp@2.2.1: resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz" integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -6276,7 +6336,7 @@ postcss-reduce-transforms@^5.1.0: dependencies: postcss-value-parser "^4.2.0" -postcss-selector-parser@6.0.10, postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: +postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9, postcss-selector-parser@6.0.10: version "6.0.10" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz" integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== @@ -6324,7 +6384,7 @@ postcss-zindex@^5.1.0: resolved "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz" integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A== -postcss@^8.0.9, postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.17, postcss@^8.4.18, postcss@^8.4.19: +"postcss@^7.0.0 || ^8.0.1", postcss@^8.0.0, postcss@^8.0.9, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.2.15, postcss@^8.2.2, postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.16, postcss@^8.4.17, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.21, postcss@>=8.0.9: version "8.4.21" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz" integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== @@ -6474,16 +6534,21 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" - integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== +range-parser@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -range-parser@^1.2.1, range-parser@~1.2.1: +range-parser@~1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== +range-parser@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" + integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== + raw-body@2.5.1: version "2.5.1" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" @@ -6494,7 +6559,7 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -rc@1.2.8, rc@^1.2.8: +rc@^1.2.8, rc@1.2.8: version "1.2.8" resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -6544,7 +6609,7 @@ react-dev-utils@^12.0.1: strip-ansi "^6.0.1" text-table "^0.2.0" -react-dom@^17.0.2: +react-dom@*, "react-dom@^16.6.0 || ^17.0.0 || ^18.0.0", "react-dom@^16.8 || ^17.0 || ^18.0", "react-dom@^16.8.4 || ^17.0.0", "react-dom@^17.0.0 || ^16.3.0 || ^15.5.4", react-dom@^17.0.2, "react-dom@>= 16.8.0 < 19.0.0", react-dom@>=16.8.0: version "17.0.2" resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -6601,6 +6666,14 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1: dependencies: "@babel/runtime" "^7.10.3" +react-loadable@*, "react-loadable@npm:@docusaurus/react-loadable@5.5.2": + version "5.5.2" + resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" + integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== + dependencies: + "@types/react" "*" + prop-types "^15.6.2" + react-remove-scroll-bar@^2.3.3: version "2.3.4" resolved "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz" @@ -6640,7 +6713,7 @@ react-router-dom@^5.3.3: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.3.4, react-router@^5.3.3: +react-router@^5.3.3, react-router@>=5, react-router@5.3.4: version "5.3.4" resolved "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz" integrity sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA== @@ -6673,7 +6746,7 @@ react-textarea-autosize@^8.3.2: use-composed-ref "^1.3.0" use-latest "^1.2.1" -react@^17.0.2: +react@*, "react@^15.0.2 || ^16.0.0 || ^17.0.0", "react@^16.13.1 || ^17.0.0", "react@^16.6.0 || ^17.0.0 || ^18.0.0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.4 || ^17.0.0", "react@^16.9.0 || ^17.0.0 || ^18.0.0", "react@^17.0.0 || ^16.3.0 || ^15.5.4", react@^17.0.2, "react@>= 16.8.0 < 19.0.0", react@>=0.14.9, react@>=15, react@>=16.8.0, react@17.0.2: version "17.0.2" resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -6988,15 +7061,20 @@ rxjs@^7.5.4: dependencies: tslib "^2.1.0" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.1.0, safe-buffer@>=5.1.0, safe-buffer@~5.2.0, safe-buffer@5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== "safer-buffer@>= 2.1.2 < 3": version "2.1.2" @@ -7016,15 +7094,6 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - schema-utils@^2.6.5: version "2.7.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz" @@ -7034,7 +7103,25 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: +schema-utils@^3.0.0: + version "3.1.1" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== @@ -7053,6 +7140,20 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" +schema-utils@2.7.0: + version "2.7.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" + integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== + dependencies: + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" + +"search-insights@>= 1 < 3": + version "2.8.2" + resolved "https://registry.npmjs.org/search-insights/-/search-insights-2.8.2.tgz" + integrity sha512-PxA9M5Q2bpBelVvJ3oDZR8nuY00Z6qwOxL53wNpgzV28M/D6u9WUbImDckjLSILBF8F1hn/mgyuUaOPtjow4Qw== + section-matter@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz" @@ -7085,7 +7186,27 @@ semver@^5.4.1: resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^6.1.1: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^6.1.2: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^6.2.0: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -7341,22 +7462,45 @@ state-toggle@^1.0.0: resolved "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz" integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - "statuses@>= 1.4.0 < 2": version "1.5.0" resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + std-env@^3.0.1: version "3.3.2" resolved "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz" integrity sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA== -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.2: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.2.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7374,20 +7518,6 @@ string-width@^5.0.1: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - stringify-object@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz" @@ -7431,7 +7561,7 @@ strip-json-comments@~2.0.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -style-to-object@0.3.0, style-to-object@^0.3.0: +style-to-object@^0.3.0, style-to-object@0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz" integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== @@ -7495,7 +7625,7 @@ tailwindcss-radix@^2.7.0: resolved "https://registry.npmjs.org/tailwindcss-radix/-/tailwindcss-radix-2.7.0.tgz" integrity sha512-fIVkT5zQYdsjT9+/Mvp+DTlJDdTFpRDuyS5+PLuJDAIIVr9+rWYKhK6rsB9QtjwUwwb0YF+BkAJN6CjZivOfLA== -tailwindcss@^3.2.3: +tailwindcss@^3.2.3, "tailwindcss@>=3.0.0 || insiders": version "3.2.6" resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.6.tgz" integrity sha512-BfgQWZrtqowOQMC2bwaSNe7xcIjdDEgixWGYOd6AL0CbKHJlvhfdbINeAW76l1sO+1ov/MJ93ODJ9yluRituIw== @@ -7652,7 +7782,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^4.7.4: +typescript@^4.7.4, "typescript@>= 2.7": version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -7693,10 +7823,10 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -unified@9.2.0: - version "9.2.0" - resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" - integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== +unified@^9.0.0, unified@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz" + integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== dependencies: bail "^1.0.0" extend "^3.0.0" @@ -7705,10 +7835,10 @@ unified@9.2.0: trough "^1.0.0" vfile "^4.0.0" -unified@^9.0.0, unified@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz" - integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== +unified@9.2.0: + version "9.2.0" + resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" + integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== dependencies: bail "^1.0.0" extend "^3.0.0" @@ -7724,7 +7854,7 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -unist-builder@2.0.3, unist-builder@^2.0.0: +unist-builder@^2.0.0, unist-builder@2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== @@ -7780,7 +7910,7 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" -unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: +unist-util-visit@^2.0.0, unist-util-visit@^2.0.3, unist-util-visit@2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== @@ -7794,7 +7924,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -8055,7 +8185,7 @@ webpack-sources@^3.2.2, webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.73.0: +"webpack@^4.0.0 || ^5.0.0", "webpack@^4.37.0 || ^5.0.0", webpack@^5.0.0, webpack@^5.1.0, webpack@^5.20.0, webpack@^5.73.0, "webpack@>= 4", webpack@>=2, "webpack@>=4.41.1 || 5.x", "webpack@3 || 4 || 5": version "5.76.2" resolved "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz" integrity sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w== @@ -8095,7 +8225,7 @@ webpackbar@^5.0.2: pretty-time "^1.1.0" std-env "^3.0.1" -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: +websocket-driver@^0.7.4, websocket-driver@>=0.5.1: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== From 3105407a0a1c87f90ac4cb70246aef241ac6c546 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Sun, 1 Oct 2023 17:00:48 +0200 Subject: [PATCH 08/23] Add hyperlinks --- .../contributing/extension-development/custom_data.md | 8 ++++---- .../contributing/introduction/data_standardization.md | 4 ++-- .../contributing/platform-development/add_data_point.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/website/content/platform/contributing/extension-development/custom_data.md b/website/content/platform/contributing/extension-development/custom_data.md index 9cdf5bc1843c..835a667e2741 100644 --- a/website/content/platform/contributing/extension-development/custom_data.md +++ b/website/content/platform/contributing/extension-development/custom_data.md @@ -17,8 +17,8 @@ Saying that, we highly recommend following the standardization framework, as it When standardizing, all data is defined using two different pydantic models: -1. Define the [query parameters](platform/provider/openbb_provider/abstract/query_params.py) model. -2. Define the resulting [data schema](platform/provider/openbb_provider/abstract/data.py) model. +1. Define the [query parameters](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/query_params.py) model. +2. Define the resulting [data schema](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/data.py) model. > The models can be entirely custom, or inherit from the OpenBB standardized models. > They enforce a safe and consistent data structure, validation and type checking. @@ -31,9 +31,9 @@ After you've defined both models, you'll need to define a `Fetcher` class which 2. `extract_data` - makes the request to the API endpoint and returns the raw data. 3. `transform_data` - transforms the raw data into the defined data model. -> Note that the `Fetcher` should inherit from the [`Fetcher`](platform/provider/openbb_provider/abstract/fetcher.py) class, which is a generic class that receives the query parameters and the data model as type parameters. +> Note that the `Fetcher` should inherit from the [`Fetcher`](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/fetcher.py) class, which is a generic class that receives the query parameters and the data model as type parameters. -After finalizing your models, you need to make them visible to the Openbb Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](platform/provider/openbb_provider/abstract/provider.py). +After finalizing your models, you need to make them visible to the Openbb Platform. This is done by adding the `Fetcher` to the `__init__.py` file of the `/` folder as part of the [`Provider`](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/provider.py). Any command, that uses the `Fetcher` class you've just defined, will be calling the `transform_query`, `extract_data` and `transform_data` methods under the hood in order to get the data and output it do the end user. diff --git a/website/content/platform/contributing/introduction/data_standardization.md b/website/content/platform/contributing/introduction/data_standardization.md index 5f8bea182141..f20fb778d9ba 100644 --- a/website/content/platform/contributing/introduction/data_standardization.md +++ b/website/content/platform/contributing/introduction/data_standardization.md @@ -11,7 +11,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. -Each data model should inherit from a [standard data](platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. +Each data model should inherit from a [standard data](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/standard_models) model that is already defined inside the OpenBB Platform. All standard models are created and maintained by the OpenBB team. Usage of these models will unlock a set of perks that are only available to standardized data, namely: @@ -23,7 +23,7 @@ Usage of these models will unlock a set of perks that are only available to stan The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. -They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. +They define the [`QueryParams`](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. ## Standardization Caveats diff --git a/website/content/platform/contributing/platform-development/add_data_point.md b/website/content/platform/contributing/platform-development/add_data_point.md index 226a19f46b93..59360d62ffed 100644 --- a/website/content/platform/contributing/platform-development/add_data_point.md +++ b/website/content/platform/contributing/platform-development/add_data_point.md @@ -9,7 +9,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. +In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](https://github.com/OpenBB-finance/OpenBBTerminal/tree/feature/openbb-sdk-v4/openbb_platform/platform/provider/openbb_provider/standard_models) model. ## Identify which type of data you want to add From 31c673db8fc9055b45689296036cb0ddfdf61feb Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:22:19 +0200 Subject: [PATCH 09/23] Add some SEO and QA --- openbb_platform/CONTRIBUTING.md | 8 ++++++++ .../contributing/extension-development/custom_data.md | 2 +- .../contributing/extension-development/index.md | 2 +- .../platform/contributing/extension-development/qa.md | 10 +++++++++- .../extension-development/share_extension.md | 3 ++- website/content/platform/contributing/index.md | 2 +- .../contributing/introduction/data_standardization.md | 2 +- .../platform/contributing/introduction/extensions.md | 2 +- .../platform-development/add_data_point.md | 2 +- .../contributing/platform-development/create_pr.md | 2 +- .../platform-development/environments_dependencies.md | 2 +- .../contributing/platform-development/index.md | 2 +- .../platform-development/manage_extensions.md | 3 ++- 13 files changed, 30 insertions(+), 12 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 710482359331..697fdda24d42 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -280,6 +280,14 @@ uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0. These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. +To run the tests we can do: + +```bash +pytest openbb_platform -m "not integration" --> only unit tests +pytest openbb_platform -m "integration" --> only integration tests +pytest openbb_platform --> everything +``` + ### Import time We aim to have a short import time for the package. To measure that we use `tuna`. diff --git a/website/content/platform/contributing/extension-development/custom_data.md b/website/content/platform/contributing/extension-development/custom_data.md index 835a667e2741..2ba7d8e29f7f 100644 --- a/website/content/platform/contributing/extension-development/custom_data.md +++ b/website/content/platform/contributing/extension-development/custom_data.md @@ -2,7 +2,7 @@ title: Add a custom data source sidebar_position: 2 description: How to add a custom data source to the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, extension, custom, data, source, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/extension-development/index.md b/website/content/platform/contributing/extension-development/index.md index ece37f578320..4ad8bd22a309 100644 --- a/website/content/platform/contributing/extension-development/index.md +++ b/website/content/platform/contributing/extension-development/index.md @@ -2,7 +2,7 @@ title: Extension Development sidebar_position: 1 description: Introduction to the Extensions inside OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, extension, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/extension-development/qa.md b/website/content/platform/contributing/extension-development/qa.md index 9a73d1a15d4c..048c5633cdfe 100644 --- a/website/content/platform/contributing/extension-development/qa.md +++ b/website/content/platform/contributing/extension-development/qa.md @@ -2,7 +2,7 @@ title: Extension QA sidebar_position: 3 description: How to QA your extension -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, qa, contributing, extension, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; @@ -55,6 +55,14 @@ uvicorn openbb_platform.platform.core.openbb_core.api.rest_api:app --host 0.0.0. These automated tests are a great way to reduce the amount of code you need to write, but they are not a replacement for manual testing and might require tweaking. That's why we have unit tests that test the generated integration tests to ensure they cover all providers and parameters. +To run the tests we can do: + +```bash +pytest openbb_platform -m "not integration" --> only unit tests +pytest openbb_platform -m "integration" --> only integration tests +pytest openbb_platform --> everything +``` + ## Import time We aim to have a short import time for the package. To measure that we use `tuna`. diff --git a/website/content/platform/contributing/extension-development/share_extension.md b/website/content/platform/contributing/extension-development/share_extension.md index 0addd688e7ad..02fe35049339 100644 --- a/website/content/platform/contributing/extension-development/share_extension.md +++ b/website/content/platform/contributing/extension-development/share_extension.md @@ -2,7 +2,8 @@ title: Share your extension sidebar_position: 4 description: How to share your extension with the community -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, share, extension, contributing, + documentation, pypi] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/index.md b/website/content/platform/contributing/index.md index e74f0abe310c..c0af02454ba7 100644 --- a/website/content/platform/contributing/index.md +++ b/website/content/platform/contributing/index.md @@ -2,7 +2,7 @@ title: Introduction to the OpenBB Platform sidebar_position: 1 description: Introduction to the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/introduction/data_standardization.md b/website/content/platform/contributing/introduction/data_standardization.md index f20fb778d9ba..b93dd887363b 100644 --- a/website/content/platform/contributing/introduction/data_standardization.md +++ b/website/content/platform/contributing/introduction/data_standardization.md @@ -2,7 +2,7 @@ title: Data Standardization sidebar_position: 1 description: What is data standardization and how does it work inside the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, data, standardization, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/introduction/extensions.md b/website/content/platform/contributing/introduction/extensions.md index 30f32fc815d0..bb992fc10bc4 100644 --- a/website/content/platform/contributing/introduction/extensions.md +++ b/website/content/platform/contributing/introduction/extensions.md @@ -2,7 +2,7 @@ title: Extensions in the OpenBB Platform sidebar_position: 2 description: Introduction to the Extensions inside OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, extension, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/add_data_point.md b/website/content/platform/contributing/platform-development/add_data_point.md index 59360d62ffed..19d8553bb1ac 100644 --- a/website/content/platform/contributing/platform-development/add_data_point.md +++ b/website/content/platform/contributing/platform-development/add_data_point.md @@ -2,7 +2,7 @@ title: Add a new data point sidebar_position: 3 description: How to add a new data point to the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, data, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/create_pr.md b/website/content/platform/contributing/platform-development/create_pr.md index 8ed46f6bf23f..6b139339807f 100644 --- a/website/content/platform/contributing/platform-development/create_pr.md +++ b/website/content/platform/contributing/platform-development/create_pr.md @@ -2,7 +2,7 @@ title: Create a Pull Request sidebar_position: 5 description: How to create a Pull Request -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, pull request, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/environments_dependencies.md b/website/content/platform/contributing/platform-development/environments_dependencies.md index eada1a1740f0..197fd4f659c2 100644 --- a/website/content/platform/contributing/platform-development/environments_dependencies.md +++ b/website/content/platform/contributing/platform-development/environments_dependencies.md @@ -2,7 +2,7 @@ title: Setup your development environment sidebar_position: 2 description: How to setup your development environment -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, environment, setup, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/index.md b/website/content/platform/contributing/platform-development/index.md index 074157d1daa0..7ae5d4a4ef91 100644 --- a/website/content/platform/contributing/platform-development/index.md +++ b/website/content/platform/contributing/platform-development/index.md @@ -2,7 +2,7 @@ title: OpenBB Platform Development sidebar_position: 1 description: Introduction to the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, development, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/manage_extensions.md b/website/content/platform/contributing/platform-development/manage_extensions.md index d70cfb3326e4..3f83666a3a9a 100644 --- a/website/content/platform/contributing/platform-development/manage_extensions.md +++ b/website/content/platform/contributing/platform-development/manage_extensions.md @@ -2,7 +2,8 @@ title: Manage Extensions sidebar_position: 4 description: How to manage extensions in the OpenBB Platform -keywords: [openbb, platform, introduction] +keywords: [openbb, platform, introduction, manage, extension, contributing, + documentation, pypi] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; From 7bb96f8621b83e9911850687dd847b04651c50dc Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 2 Oct 2023 15:28:54 +0100 Subject: [PATCH 10/23] removing references to SDK --- openbb_platform/extensions/charting/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_platform/extensions/charting/README.md b/openbb_platform/extensions/charting/README.md index 8fa77110527f..c0cf66cc3cdb 100644 --- a/openbb_platform/extensions/charting/README.md +++ b/openbb_platform/extensions/charting/README.md @@ -1,12 +1,12 @@ # OpenBB Charting extension -This extension provides a charting library for OpenBB SDK. +This extension provides a charting library for OpenBB Platform. The library includes: - a charting infrastructure based on Plotly - a set of charting components -- prebuilt charts for a set of commands that are built-in OpenBB SDK extensions +- prebuilt charts for a set of commands that are built-in OpenBB extensions ## Installation @@ -34,7 +34,7 @@ When using Linux distributions, the PyWry dependency requires certain dependenci ## Usage -To use the extension, run any of the OpenBB SDK endpoints with the `chart` argument set to `True`. +To use the extension, run any of the OpenBB Platform endpoints with the `chart` argument set to `True`. Here's an example how it would look like in a python interface: From d5a75ef1de645a9b2f9db2588770d383734432b9 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 2 Oct 2023 15:30:57 +0100 Subject: [PATCH 11/23] fix path --- openbb_platform/extensions/charting/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/extensions/charting/README.md b/openbb_platform/extensions/charting/README.md index c0cf66cc3cdb..3be0eefe782f 100644 --- a/openbb_platform/extensions/charting/README.md +++ b/openbb_platform/extensions/charting/README.md @@ -55,7 +55,7 @@ stock_data.show() ## Add a visualization to an existing Platform command -One should first ensure that the already implemented endpoint is available in the [charting router](extensions/charting/openbb_charting/charting_router.py). +One should first ensure that the already implemented endpoint is available in the [charting router](/openbb_platform/extensions/charting/openbb_charting/charting_router.py). To do so, you can run: `python openbb_platform/extensions/charting/openbb_charting/builder.py` - which will read all the available endpoints and add them to the charting router. From 109496fdc2532445450fa31f70723af06956efe4 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 2 Oct 2023 15:32:03 +0100 Subject: [PATCH 12/23] adjust path and routes --- openbb_platform/extensions/charting/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_platform/extensions/charting/README.md b/openbb_platform/extensions/charting/README.md index 3be0eefe782f..13a21b823faa 100644 --- a/openbb_platform/extensions/charting/README.md +++ b/openbb_platform/extensions/charting/README.md @@ -60,10 +60,10 @@ One should first ensure that the already implemented endpoint is available in th To do so, you can run: `python openbb_platform/extensions/charting/openbb_charting/builder.py` - which will read all the available endpoints and add them to the charting router. -Afterwards, you'll need to add the visualization to the [charting router](extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: +Afterwards, you'll need to add the visualization to the [charting router](/openbb_platform/extensions/charting/openbb_charting/charting_router.py). The convention to match the endpoint with the respective charting function is the following: -- `stocks/load` -> `stocks_load` -- `ta/ema` -> `ta_ema` +- `/stocks/load` -> `stocks_load` +- `/ta/ema` -> `ta_ema` When you spot the charting function on the charting router file, you can add the visualization to it. From 458dac87eb2a870ed129824fd45504b3680fe497 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:35:40 +0200 Subject: [PATCH 13/23] Update openbb_platform/CONTRIBUTING.md Co-authored-by: Henrique Joaquim --- openbb_platform/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 697fdda24d42..846d4a432088 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -82,7 +82,7 @@ Usage of these models will unlock a set of perks that are only available to stan - Can expect consistent data types and validation. - Will work seamlessly with other providers that use the same standard model. -The standard models are defined under the `./platform/core/provider/openbb_provider/standard_models/` directory. +The standard models are defined under the `/OpenBBTerminal/openbb_platform/platform/core/provider/openbb_provider/standard_models/` directory. They define the [`QueryParams`](platform/provider/openbb_provider/abstract/query_params.py) and [`Data`](platform/provider/openbb_provider/abstract/data.py) models, which are used to query and output data. They are pydantic and you can leverage all the pydantic features such as validators. From b6fab052b73ae9e240ef3b5fc1d008b6f092bb4b Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:35:52 +0200 Subject: [PATCH 14/23] Update openbb_platform/CONTRIBUTING.md Co-authored-by: Henrique Joaquim --- openbb_platform/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 846d4a432088..e0cfaaafe64c 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -47,7 +47,7 @@ The Python interfaces we provide to users is the `openbb` python package. The code you will find in this package is generated from a script and it is just a wrapper around the `openbb-core` and any installed extensions. -When the user runs `import openbb`, `from openbb import obb` or other variants, the script that generates the package code is triggered. It detects if there are new openbb extensions installed in the environment and rebuilds the package code accordingly. If new extensions are not found, it just uses the current package version. +When the user runs `import openbb`, `from openbb import obb` or other variants, the script that generates the packaged code is triggered. It detects if there are new extensions installed in the environment and rebuilds the packaged code accordingly. If new extensions are not found, it just uses the current packaged version. When you are developing chances are you want to manually trigger the package rebuild. From 9f1cef9b24998b12dc43026231f9eb7c5d3ef957 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:37:06 +0200 Subject: [PATCH 15/23] Update openbb_platform/CONTRIBUTING.md Co-authored-by: Henrique Joaquim --- openbb_platform/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index e0cfaaafe64c..8c7a61d41980 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -412,7 +412,7 @@ Each router is categorized under different extensions (stocks, forex, crypto, et Given the fact that there's already an endpoint for OHLCV stock data, we can check if the standard exists. -In this case, it's `StockHistorical` which can be found inside the `./platform/core/provider/openbb_provider/standard_models/` directory. +In this case, it's `StockHistorical` which can be found inside the `/OpenBBTerminal/openbb_platform/platform/core/provider/openbb_provider/standard_models/` directory. If the standard model doesn't exist: From d78c2daa07e198f617d062af28ba24a32b17b0be Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:38:34 +0200 Subject: [PATCH 16/23] Update openbb_platform/CONTRIBUTING.md Co-authored-by: Henrique Joaquim --- openbb_platform/CONTRIBUTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 8c7a61d41980..61261713f9ad 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -282,11 +282,10 @@ These automated tests are a great way to reduce the amount of code you need to w To run the tests we can do: +Unit tests only: + ```bash -pytest openbb_platform -m "not integration" --> only unit tests -pytest openbb_platform -m "integration" --> only integration tests -pytest openbb_platform --> everything -``` +pytest openbb_platform -m "not integration" ### Import time From 971c48c6a83f6fad0569a6b4f43e977001e3af48 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 2 Oct 2023 15:43:37 +0100 Subject: [PATCH 17/23] pytest descriptions --- openbb_platform/CONTRIBUTING.md | 15 ++++++++++++++- .../contributing/extension-development/qa.md | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 61261713f9ad..458da38419e8 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -282,10 +282,23 @@ These automated tests are a great way to reduce the amount of code you need to w To run the tests we can do: -Unit tests only: +- Unit tests only: ```bash pytest openbb_platform -m "not integration" +``` + +- Integration tests only: + +```bash +pytest openbb_platform -m integration +``` + +- Both integration and unit tests: + +```bash +pytest openbb_platform +``` ### Import time diff --git a/website/content/platform/contributing/extension-development/qa.md b/website/content/platform/contributing/extension-development/qa.md index 048c5633cdfe..4005c7463d8e 100644 --- a/website/content/platform/contributing/extension-development/qa.md +++ b/website/content/platform/contributing/extension-development/qa.md @@ -57,10 +57,22 @@ These automated tests are a great way to reduce the amount of code you need to w To run the tests we can do: +- Unit tests only: + +```bash +pytest openbb_platform -m "not integration" +``` + +- Integration tests only: + +```bash +pytest openbb_platform -m integration +``` + +- Both integration and unit tests: + ```bash -pytest openbb_platform -m "not integration" --> only unit tests -pytest openbb_platform -m "integration" --> only integration tests -pytest openbb_platform --> everything +pytest openbb_platform ``` ## Import time From c3b9cb090e42736a4d249741c2ba815cad4c5b5d Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 3 Oct 2023 04:07:46 +0530 Subject: [PATCH 18/23] added step to setup keys locally for development --- openbb_platform/CONTRIBUTING.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index 458da38419e8..bd5401618ab6 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -388,13 +388,13 @@ Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installati 2. Create and activate a virtual environment: - > Supported python versions: python = ">=3.8,<3.12" - ```bash conda create -n "obb-dev" python=3.9.13 conda activate obb-dev ``` + > Supported python versions: python = ">=3.8,<3.12" + 3. Manage your environment with [Poetry](https://python-poetry.org/): ```bash @@ -409,6 +409,21 @@ Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installati > To install all the packages, including extras, use the `-e` argument with the above script. +5. Setup your API keys locally by adding them to the `~/.openbb_platform/user_settings.json` file. Populate this file with the following template and replace the values with your keys: + + ```json + { + "credentials": { + "fmp_api_key": "REPLACE_ME", + "polygon_api_key": "REPLACE_ME", + "benzinga_api_key": "REPLACE_ME", + "fred_api_key": "REPLACE_ME" + } + } + ``` + + > You can also setup and use your keys from the OpenBB Hub and the Python interface at runtime. Follow the steps in [API Keys](./README.md#api-keys) section to know more about it. + ## Add a new data point In this section, we'll be adding a new data point to the OpenBB Platform. We will add a new provider with an existing [standard data](platform/provider/openbb_provider/standard_models) model. From 2a152ae81b5a279b7cbb2458ff23f0b3cac8c212 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 3 Oct 2023 04:08:23 +0530 Subject: [PATCH 19/23] Removed leftover folder --- .../openbb_core/app/model/abstract/singleton.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 openbb_sdk/sdk/core/openbb_core/app/model/abstract/singleton.py diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/abstract/singleton.py b/openbb_sdk/sdk/core/openbb_core/app/model/abstract/singleton.py deleted file mode 100644 index 7d6bad71a1bb..000000000000 --- a/openbb_sdk/sdk/core/openbb_core/app/model/abstract/singleton.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Dict, Generic, TypeVar - -T = TypeVar("T") - - -class SingletonMeta(type, Generic[T]): - # TODO : check if we want to update this to be thread safe - _instances: Dict[T, T] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - instance = super().__call__(*args, **kwargs) - cls._instances[cls] = instance - - return cls._instances[cls] From 91479724afddfe0f6d2effe2e9d40e2eb3297945 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:24:13 +0200 Subject: [PATCH 20/23] Fix typos, add API keys to website docs --- openbb_terminal/forecast/trans_model.py | 2 +- .../stocks/options/options_chains_model.py | 6 +++--- website/README.md | 2 +- .../environments_dependencies.md | 15 +++++++++++++++ website/content/platform/usage/guides/api-keys.md | 2 +- website/content/platform/usage/index.md | 2 +- .../usage/intros/stocks/stocks-screener.md | 2 +- .../version-v3/sdk/reference/forecast/trans.md | 4 ++-- .../version-v3/sdk/usage/basics/index.md | 4 ++-- .../version-v3/sdk/usage/guides/api-keys.md | 2 +- .../sdk/usage/intros/stocks/stocks-screener.md | 2 +- .../version-v3/terminal/usage/guides/api-keys.md | 2 +- .../version-v3/terminal/usage/intros/common/ta.md | 2 +- .../terminal/usage/intros/stocks/screener.md | 2 +- 14 files changed, 32 insertions(+), 17 deletions(-) diff --git a/openbb_terminal/forecast/trans_model.py b/openbb_terminal/forecast/trans_model.py index 87980792fc86..714e90f89a10 100644 --- a/openbb_terminal/forecast/trans_model.py +++ b/openbb_terminal/forecast/trans_model.py @@ -81,7 +81,7 @@ def get_trans_data( activation: str The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. dropout: float - Fraction of neurons afected by Dropout. Defaults to 0.0. + Fraction of neurons affected by Dropout. Defaults to 0.0. batch_size: int Number of time series (input and output sequences) used in each training pass. Defaults to 32. n_epochs: int diff --git a/openbb_terminal/stocks/options/options_chains_model.py b/openbb_terminal/stocks/options/options_chains_model.py index d6506f3de035..3f98054fccd7 100644 --- a/openbb_terminal/stocks/options/options_chains_model.py +++ b/openbb_terminal/stocks/options/options_chains_model.py @@ -759,7 +759,7 @@ def calculate_strangle( strangle: dict[str, Any] = {} - # Includees the as-of date if it is historical EOD data. + # Includes the as-of date if it is historical EOD data. if ( options.source == "Intrinio" and options.date != "" @@ -892,7 +892,7 @@ def calculate_vertical_call_spread( max_profit = sold - bought - spread_cost[0] call_spread_: dict[str, Any] = {} if sold != bought and spread_cost[0] != 0: - # Includees the as-of date if it is historical EOD data. + # Includes the as-of date if it is historical EOD data. if ( options.source == "Intrinio" and options.date != "" @@ -1036,7 +1036,7 @@ def calculate_vertical_put_spread( max_loss = (sold - bought - max_profit) * -1 put_spread_: dict[str, Any] = {} if sold != bought and max_loss != 0: - # Includees the as-of date if it is historical EOD data. + # Includes the as-of date if it is historical EOD data. if ( options.source == "Intrinio" and options.date != "" diff --git a/website/README.md b/website/README.md index 22fafd2d2d15..695ad882c1a9 100644 --- a/website/README.md +++ b/website/README.md @@ -238,7 +238,7 @@ website/content/_index.md /... ``` -Note that the `common` folder holds features that are common across contexts, e.g. `technical analysis` can be performed on both `stocks` or `crytpo`. +Note that the `common` folder holds features that are common across contexts, e.g. `technical analysis` can be performed on both `stocks` or `crypto`. ### New Feature diff --git a/website/content/platform/contributing/platform-development/environments_dependencies.md b/website/content/platform/contributing/platform-development/environments_dependencies.md index 197fd4f659c2..e7afb1d79b94 100644 --- a/website/content/platform/contributing/platform-development/environments_dependencies.md +++ b/website/content/platform/contributing/platform-development/environments_dependencies.md @@ -47,3 +47,18 @@ Please refer to [OpenBBTerminal docs](https://docs.openbb.co/terminal/installati ``` > To install all the packages, including extras, use the `-e` argument with the above script. + +5. Setup your API keys locally by adding them to the `~/.openbb_platform/user_settings.json` file. Populate this file with the following template and replace the values with your keys: + + ```json + { + "credentials": { + "fmp_api_key": "REPLACE_ME", + "polygon_api_key": "REPLACE_ME", + "benzinga_api_key": "REPLACE_ME", + "fred_api_key": "REPLACE_ME" + } + } + ``` + + > You can also setup and use your keys from the OpenBB Hub and the Python interface at runtime. Follow the steps in [API Keys](./README.md#api-keys) section to know more about it. diff --git a/website/content/platform/usage/guides/api-keys.md b/website/content/platform/usage/guides/api-keys.md index 08a1602d4f02..c2f60bff8420 100644 --- a/website/content/platform/usage/guides/api-keys.md +++ b/website/content/platform/usage/guides/api-keys.md @@ -377,7 +377,7 @@ openbb.keys.finnhub(key = 'REPLACE_WITH_KEY', persist = True) ### Financial Modeling Prep -> Enchance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more! +> Enhance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more!
Instructions diff --git a/website/content/platform/usage/index.md b/website/content/platform/usage/index.md index bf99b25776b1..5fde1ff6b3ce 100644 --- a/website/content/platform/usage/index.md +++ b/website/content/platform/usage/index.md @@ -76,7 +76,7 @@ jupyter lab Or -```cosole +```console conda activate obb jupyter notebook ``` diff --git a/website/content/platform/usage/intros/stocks/stocks-screener.md b/website/content/platform/usage/intros/stocks/stocks-screener.md index 8d3fb1d8ac71..ad300463e2c2 100644 --- a/website/content/platform/usage/intros/stocks/stocks-screener.md +++ b/website/content/platform/usage/intros/stocks/stocks-screener.md @@ -75,7 +75,7 @@ These signals offer a good starting point, and results can be narrowed by creati :::note -Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accpeted values. +Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accepted values. All of the included presets can be viewed online [here](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/miscellaneous/stocks/screener) ::: diff --git a/website/versioned_docs/version-v3/sdk/reference/forecast/trans.md b/website/versioned_docs/version-v3/sdk/reference/forecast/trans.md index 16f8e3c4e084..68eee23795ba 100644 --- a/website/versioned_docs/version-v3/sdk/reference/forecast/trans.md +++ b/website/versioned_docs/version-v3/sdk/reference/forecast/trans.md @@ -39,7 +39,7 @@ openbb.forecast.trans(data: Union[pd.Series, pd.DataFrame], target_column: str = | num_decoder_layers | int | The number of decoder layers in the encoder. Defaults to 3. | 3 | True | | dim_feedforward | int | The dimension of the feedforward network model. Defaults to 512. | 512 | True | | activation | str | The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. | relu | True | -| dropout | float | Fraction of neurons afected by Dropout. Defaults to 0.0. | 0.0 | True | +| dropout | float | Fraction of neurons affected by Dropout. Defaults to 0.0. | 0.0 | True | | batch_size | int | Number of time series (input and output sequences) used in each training pass. Defaults to 32. | 32 | True | | n_epochs | int | Number of epochs over which to train the model. Defaults to 100. | 100 | True | | learning_rate | float | Defaults to 1e-3. | 0.001 | True | @@ -117,4 +117,4 @@ This function does not return anything - \ No newline at end of file + diff --git a/website/versioned_docs/version-v3/sdk/usage/basics/index.md b/website/versioned_docs/version-v3/sdk/usage/basics/index.md index cdd3b1019ef5..491adf67a4e6 100644 --- a/website/versioned_docs/version-v3/sdk/usage/basics/index.md +++ b/website/versioned_docs/version-v3/sdk/usage/basics/index.md @@ -76,7 +76,7 @@ jupyter lab Or -```cosole +```console conda activate obb jupyter notebook ``` @@ -152,7 +152,7 @@ Call signature: openbb.stocks.gov.contracts(*args: Any, **kwargs: Any) -> Any Type: get_contracts String form: File: ~/GitHub/OpenBBTerminal/openbb_terminal/stocks/government/quiverquant_model.py -Docstring: +Docstring: Get government contracts for ticker [Source: quiverquant.com] Parameters diff --git a/website/versioned_docs/version-v3/sdk/usage/guides/api-keys.md b/website/versioned_docs/version-v3/sdk/usage/guides/api-keys.md index 288b26b14086..621c6fe7917e 100644 --- a/website/versioned_docs/version-v3/sdk/usage/guides/api-keys.md +++ b/website/versioned_docs/version-v3/sdk/usage/guides/api-keys.md @@ -397,7 +397,7 @@ openbb.keys.finnhub(key = 'REPLACE_WITH_KEY', persist = True) ### Financial Modeling Prep -> Enchance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more! +> Enhance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more!
Instructions diff --git a/website/versioned_docs/version-v3/sdk/usage/intros/stocks/stocks-screener.md b/website/versioned_docs/version-v3/sdk/usage/intros/stocks/stocks-screener.md index b3940d9ee684..a1e9c6789728 100644 --- a/website/versioned_docs/version-v3/sdk/usage/intros/stocks/stocks-screener.md +++ b/website/versioned_docs/version-v3/sdk/usage/intros/stocks/stocks-screener.md @@ -75,7 +75,7 @@ These signals offer a good starting point, and results can be narrowed by creati :::note -Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accpeted values. +Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accepted values. All of the included presets can be viewed online [here](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/miscellaneous/stocks/screener) ::: diff --git a/website/versioned_docs/version-v3/terminal/usage/guides/api-keys.md b/website/versioned_docs/version-v3/terminal/usage/guides/api-keys.md index 75ff8caac824..7c5092a06b97 100644 --- a/website/versioned_docs/version-v3/terminal/usage/guides/api-keys.md +++ b/website/versioned_docs/version-v3/terminal/usage/guides/api-keys.md @@ -346,7 +346,7 @@ Add this key to the OpenBB Terminal by entering: ### Financial Modeling Prep -> Enchance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more! +> Enhance your application with our data that goes up to 30 years back in history. Earnings calendar, financial statements, multiple exchanges and more!
Instructions diff --git a/website/versioned_docs/version-v3/terminal/usage/intros/common/ta.md b/website/versioned_docs/version-v3/terminal/usage/intros/common/ta.md index 99f2fd9561ef..ead726e6a50a 100644 --- a/website/versioned_docs/version-v3/terminal/usage/intros/common/ta.md +++ b/website/versioned_docs/version-v3/terminal/usage/intros/common/ta.md @@ -240,7 +240,7 @@ load qqq -i 1 -s 2023-04-21/macd The Accumulation/Distribution Line at the same one-minute interval signals in advance of the upward drift reversal, beginning to sell into the Friday close just before 14:00. -![Accumlation Distribution](https://user-images.githubusercontent.com/85772166/233764089-531dad18-d3c1-4bbb-aa6c-3c2c182f8fd3.png) +![Accumulation Distribution](https://user-images.githubusercontent.com/85772166/233764089-531dad18-d3c1-4bbb-aa6c-3c2c182f8fd3.png) ## Indicators Dashboard diff --git a/website/versioned_docs/version-v3/terminal/usage/intros/stocks/screener.md b/website/versioned_docs/version-v3/terminal/usage/intros/stocks/screener.md index 7fda168d3609..f560a52f1c97 100644 --- a/website/versioned_docs/version-v3/terminal/usage/intros/stocks/screener.md +++ b/website/versioned_docs/version-v3/terminal/usage/intros/stocks/screener.md @@ -56,7 +56,7 @@ The default preset upon entering the sub-menu is, `top_gainers`. This preset, l These signals offer a good starting point, and results can be narrowed by creating a custom preset with defined parameters. Place new presets (which are text files saved as an `.ini` type) in the OpenBBUserData folder: `~/OpenBBUserData/presets/stocks/screener`. Files saved here will populate as a choice the next time the Terminal is launched. The next section provides guidance for using and creating presets. -:::note Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accpeted values. +:::note Refer to the template file [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/11153280/all_parameters.txt) for all of the available parameters and accepted values. All of the included presets can be viewed online [here](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/miscellaneous/stocks/screener) ::: From 83aa83f988c1afd2718cb76204a48eb59e70cff9 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:27:17 +0200 Subject: [PATCH 21/23] Improve SEO --- .../contributing/extension-development/custom_data.md | 4 ++-- .../platform/contributing/extension-development/index.md | 6 +++--- .../platform/contributing/extension-development/qa.md | 4 ++-- .../contributing/extension-development/share_extension.md | 6 +++--- website/content/platform/contributing/index.md | 6 +++--- .../contributing/introduction/data_standardization.md | 4 ++-- .../platform/contributing/introduction/extensions.md | 6 +++--- .../contributing/platform-development/add_data_point.md | 5 +++-- .../contributing/platform-development/create_pr.md | 8 ++++---- .../platform-development/environments_dependencies.md | 4 ++-- .../platform/contributing/platform-development/index.md | 4 ++-- .../platform-development/manage_extensions.md | 6 +++--- 12 files changed, 32 insertions(+), 31 deletions(-) diff --git a/website/content/platform/contributing/extension-development/custom_data.md b/website/content/platform/contributing/extension-development/custom_data.md index 2ba7d8e29f7f..5c1dcb4a4af6 100644 --- a/website/content/platform/contributing/extension-development/custom_data.md +++ b/website/content/platform/contributing/extension-development/custom_data.md @@ -1,8 +1,8 @@ --- title: Add a custom data source sidebar_position: 2 -description: How to add a custom data source to the OpenBB Platform -keywords: [openbb, platform, extension, custom, data, source, contributing, documentation] +description: Add a custom data source to the OpenBB Platform. +keywords: [openbb platform, extension, custom data source, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/extension-development/index.md b/website/content/platform/contributing/extension-development/index.md index 4ad8bd22a309..eee1083d324a 100644 --- a/website/content/platform/contributing/extension-development/index.md +++ b/website/content/platform/contributing/extension-development/index.md @@ -1,15 +1,15 @@ --- title: Extension Development sidebar_position: 1 -description: Introduction to the Extensions inside OpenBB Platform -keywords: [openbb, platform, introduction, extension, contributing, documentation] +description: Learn how to develop Extensions inside the OpenBB Platform. +keywords: [openbb platform, introduction, extensions, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -We have a Cookiecutter template that will help you get started. It serves as a jumpstart for your extension development, so you can focus on the data and not on the boilerplate. +We have a Cookiecutter template that will help you get started. It serves as a jumpstart for your extensions development, so you can focus on the data and not on the boilerplate. Please refer to the [Cookiecutter template](https://github.com/OpenBB-finance/openbb-cookiecutter) and follow the instructions there. diff --git a/website/content/platform/contributing/extension-development/qa.md b/website/content/platform/contributing/extension-development/qa.md index 4005c7463d8e..562ac7d7394b 100644 --- a/website/content/platform/contributing/extension-development/qa.md +++ b/website/content/platform/contributing/extension-development/qa.md @@ -1,8 +1,8 @@ --- title: Extension QA sidebar_position: 3 -description: How to QA your extension -keywords: [openbb, platform, introduction, qa, contributing, extension, documentation] +description: Learn how to QA your extension. +keywords: [openbb platform, introduction, qa, contributing, extension, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/extension-development/share_extension.md b/website/content/platform/contributing/extension-development/share_extension.md index 02fe35049339..d6ad45a2ebb1 100644 --- a/website/content/platform/contributing/extension-development/share_extension.md +++ b/website/content/platform/contributing/extension-development/share_extension.md @@ -1,9 +1,9 @@ --- title: Share your extension sidebar_position: 4 -description: How to share your extension with the community -keywords: [openbb, platform, introduction, share, extension, contributing, - documentation, pypi] +description: How to share your extension with the community. +keywords: [openbb platform, introduction, share, extension, contributing, + documentation, PyPI, community] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/index.md b/website/content/platform/contributing/index.md index c0af02454ba7..f1541f9f6f85 100644 --- a/website/content/platform/contributing/index.md +++ b/website/content/platform/contributing/index.md @@ -1,8 +1,8 @@ --- -title: Introduction to the OpenBB Platform +title: OpenBB Platform - An Introduction sidebar_position: 1 -description: Introduction to the OpenBB Platform -keywords: [openbb, platform, introduction, contributing, documentation] +description: Learn how to contribute to the OpenBB Platform. +keywords: [openbb platform, introduction, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/introduction/data_standardization.md b/website/content/platform/contributing/introduction/data_standardization.md index b93dd887363b..bcf3478f1ed8 100644 --- a/website/content/platform/contributing/introduction/data_standardization.md +++ b/website/content/platform/contributing/introduction/data_standardization.md @@ -1,8 +1,8 @@ --- title: Data Standardization sidebar_position: 1 -description: What is data standardization and how does it work inside the OpenBB Platform -keywords: [openbb, platform, introduction, data, standardization, contributing, documentation] +description: Learn what is data standardization and how does it work inside the OpenBB Platform. +keywords: [openbb platform, introduction, data standardization, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/introduction/extensions.md b/website/content/platform/contributing/introduction/extensions.md index bb992fc10bc4..c9b5840d9806 100644 --- a/website/content/platform/contributing/introduction/extensions.md +++ b/website/content/platform/contributing/introduction/extensions.md @@ -1,15 +1,15 @@ --- title: Extensions in the OpenBB Platform sidebar_position: 2 -description: Introduction to the Extensions inside OpenBB Platform -keywords: [openbb, platform, introduction, extension, contributing, documentation] +description: Learn about the Extensions inside the OpenBB Platform. +keywords: [openbb platform, introduction, extensions, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -An extension adds functionality to the OpenBB Platform. It can be a new data source, a new command, a new visualization, etc. +Extensions add functionality to the OpenBB Platform. They can be a new data source, a new command, a new visualization, etc. ## Types of extensions diff --git a/website/content/platform/contributing/platform-development/add_data_point.md b/website/content/platform/contributing/platform-development/add_data_point.md index 19d8553bb1ac..06ade5368f0f 100644 --- a/website/content/platform/contributing/platform-development/add_data_point.md +++ b/website/content/platform/contributing/platform-development/add_data_point.md @@ -1,8 +1,9 @@ --- title: Add a new data point sidebar_position: 3 -description: How to add a new data point to the OpenBB Platform -keywords: [openbb, platform, introduction, data, contributing, documentation] +description: Learn how to add a new data point to the OpenBB Platform. +keywords: [openbb platform, introduction, data point, contributing, documentation, +provider, QueryParams, Data, Fetcher, transform, extract] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/create_pr.md b/website/content/platform/contributing/platform-development/create_pr.md index 6b139339807f..ba6aa70471b2 100644 --- a/website/content/platform/contributing/platform-development/create_pr.md +++ b/website/content/platform/contributing/platform-development/create_pr.md @@ -1,15 +1,15 @@ --- title: Create a Pull Request sidebar_position: 5 -description: How to create a Pull Request -keywords: [openbb, platform, introduction, pull request, contributing, documentation] +description: Learn how to create a Pull Request to the OpenBB Platform. +keywords: [openbb platform, introduction, pull request, contributing, documentation, github] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + -To create a PR to the OpenBB Platform, you'll need to fork the repository and create a new branch. +To create a Pull Request to the OpenBB Platform, you'll need to fork the repository and create a new branch. 1. Create your Feature Branch, e.g. `git checkout -b feature/AmazingFeature` 2. Check the files you have touched using `git status` diff --git a/website/content/platform/contributing/platform-development/environments_dependencies.md b/website/content/platform/contributing/platform-development/environments_dependencies.md index e7afb1d79b94..d049e08ec21e 100644 --- a/website/content/platform/contributing/platform-development/environments_dependencies.md +++ b/website/content/platform/contributing/platform-development/environments_dependencies.md @@ -1,8 +1,8 @@ --- title: Setup your development environment sidebar_position: 2 -description: How to setup your development environment -keywords: [openbb, platform, introduction, environment, setup, contributing, documentation] +description: Learn how to setup your development environment for the OpenBB Platform. +keywords: [openbb platform, introduction, environment, setup, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/index.md b/website/content/platform/contributing/platform-development/index.md index 7ae5d4a4ef91..1200f520311e 100644 --- a/website/content/platform/contributing/platform-development/index.md +++ b/website/content/platform/contributing/platform-development/index.md @@ -1,8 +1,8 @@ --- title: OpenBB Platform Development sidebar_position: 1 -description: Introduction to the OpenBB Platform -keywords: [openbb, platform, introduction, development, contributing, documentation] +description: Introduction to the OpenBB Platform. +keywords: [openbb platform, introduction, development, contributing, documentation] --- import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; diff --git a/website/content/platform/contributing/platform-development/manage_extensions.md b/website/content/platform/contributing/platform-development/manage_extensions.md index 3f83666a3a9a..4458d1e5926f 100644 --- a/website/content/platform/contributing/platform-development/manage_extensions.md +++ b/website/content/platform/contributing/platform-development/manage_extensions.md @@ -1,8 +1,8 @@ --- title: Manage Extensions sidebar_position: 4 -description: How to manage extensions in the OpenBB Platform -keywords: [openbb, platform, introduction, manage, extension, contributing, +description: Learn how to manage extensions in the OpenBB Platform. +keywords: [openbb, platform, introduction, manage extensions, contributing, documentation, pypi] --- @@ -10,7 +10,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -To install an extension hosted on PyPI, use the `pip install ` command. +To install extensions hosted on PyPI, use the `pip install ` command. To install an extension that is developed locally, ensure that it contains a `pyproject.toml` file and then use the `pip install ` command. From 77deebd7a6f4da2ede959d27af19fd3b6ea62fee Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:19:29 +0200 Subject: [PATCH 22/23] Add graph --- openbb_platform/CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openbb_platform/CONTRIBUTING.md b/openbb_platform/CONTRIBUTING.md index bd5401618ab6..d85331323aba 100644 --- a/openbb_platform/CONTRIBUTING.md +++ b/openbb_platform/CONTRIBUTING.md @@ -68,6 +68,13 @@ This document will take you through two types of contributions: 1. Building a custom extension 2. Contributing directly to the OpenBB Platform +Before moving forward, please take a look at the high-level view of the OpenBB Platform architecture. We will go over each bit in this document. + + + + OpenBB Platform High-Level Architecture + + ## What is the Standardization Framework? The Standardization Framework is a set of tools and guidelines that enable the user to query and obtain data in a consistent way across multiple providers. From 53c44416ef05ec4ab79b6db51dd3825bcc94cd0e Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:33:18 +0200 Subject: [PATCH 23/23] Add graph to website --- website/content/platform/contributing/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/content/platform/contributing/index.md b/website/content/platform/contributing/index.md index f1541f9f6f85..b0d1f5c9c8ea 100644 --- a/website/content/platform/contributing/index.md +++ b/website/content/platform/contributing/index.md @@ -41,3 +41,10 @@ This section will take you through two types of contributions: 1. Building a custom extension 2. Contributing directly to the OpenBB Platform + +Before moving forward, please take a look at the high-level view of the OpenBB Platform architecture. We will go over each bit in the following sections. + + + + OpenBB Platform High-Level Architecture +