Skip to content

Commit

Permalink
Merge branch 'develop' into hotfix/Ultima-platform-endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiSai authored Dec 6, 2023
2 parents 96f5e0a + 0f78bdc commit c0604bd
Show file tree
Hide file tree
Showing 172 changed files with 138,903 additions and 118,510 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ env:
on:
push:
branches:
- release/*
- main
- release/v3/*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
mode: minimum
count: 1
labels: "guides, bug, build, do not merge, docker, docs, duplicate, enhancement, feat XS, feat S, feat M, feat L, feat XL, help wanted, refactor, tests, discord, dependencies, notebookreports, dashboards, analytics, portfolio, installer, SDK, release "
labels: "guides, bug, build, docker, docs, feat XS, feat S, feat M, feat L, feat XL, help wanted, refactor, tests, dependencies, release"
- uses: mheap/github-action-required-labels@v1
with:
mode: exactly
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Deploy to PyPI
on:
push:
branches:
- release/*
- main
- release/v3/*

workflow_dispatch:

Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def get_price_targets(cls, symbol: str) -> pd.DataFrame:
url = f"https://financialmodelingprep.com/api/v4/price-target?symbol={symbol}&apikey={current_user.credentials.API_KEY_FINANCIALMODELINGPREP}"
response = request(url)

# Check if response is valid
# Check if the response is valid
if response.status_code != 200 or "Error Message" in response.json():
message = f"Error, Status Code: {response.status_code}."
message = (
Expand Down Expand Up @@ -345,7 +345,7 @@ Now that we have the model and views, it is time to add to the controller.
- Call the function contained in a `_view.py` file with the arguments parsed by argparse.

Note that the function self.parse_known_args_and_warn() has some additional options we can add. If the function is showing a chart, but we want the option to show raw data, we can add the `raw=True` keyword and the resulting namespace will have the `raw` attribute.
Same with limit, we can pass limit=10 to add the `-l` flag with default=10. Here we also specify the export, and whether it is data only, plots only or anything. This function also adds the `source` attribute to the namespace. In our example, this is important because we added an additional source.
Same with limit, we can pass limit=10 to add the `-l` flag with default=10. Here we also specify the export, and whether it is data only, plots only or anything else. This function also adds the `source` attribute to the namespace. In our example, this is important because we added an additional source.

Our new function will be:

Expand Down Expand Up @@ -511,15 +511,15 @@ In order to add a command to the SDK, follow these steps:

### Add OpenBB Platform endpoint (V4)

Refer to the documentation [here](openbb_platform\CONTRIBUTING.md).
Refer to the documentation [here](https://docs.openbb.co/platform/development).

### Add Unit Tests

This is a vital part of the contribution process. We have a set of unit tests that are run on every Pull Request. These tests are located in the `tests` folder.

Unit tests minimize errors in code and quickly find errors when they do arise. Integration tests are standard usage examples, which are also used to identify errors.

A thorough introduction on the usage of unit tests and integration tests in OpenBBTerminal can be found on the following page respectively:
A thorough introduction on the usage of unit tests and integration tests in OpenBBTerminal can be found on the following page:

[Unit Test README](tests/README.md)

Expand Down Expand Up @@ -578,7 +578,7 @@ CLI :computer: → `_controller.py` :robot: → `_view.py` :art:  &nbs
| **File                           ** | **Role** | **Description** |
| :------------------------- | :------------- | :----------------------------------------------------- |
| **_controller.py** :robot: | The router/input validator | The controller file should hold the least amount of logic possible. Its role is to be a stupid (no logic) router and redirect the command correctly while checking the input with argparser. |
| **_view.py** :art: | The artist | The view file should only output or visualise the data it gets from the `_model` file! The `_view` can limit the data coming from the `_model`, otherwise the data object should be identical in the `_view` and the `_model` files. |
| **_view.py** :art: | The artist | The view file should only output or visualize the data it gets from the `_model` file! The `_view` can limit the data coming from the `_model`, otherwise the data object should be identical in the `_view` and the `_model` files. |
| **_model.py** 🧠 |The brain | The model file is where everything fun happens. The data is gathered (external APIs), processed and returned here. |
| **sdk.py** 🏭 |The SDK Factory | The SDK file is where the callable functions are created for the SDK. There is only one SDK file in the openbb_terminal folder. |

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<a href="https://codespaces.new/OpenBB-finance/OpenBBTerminal">
<img src="https://github.com/codespaces/badge.svg" height="20" />
</a>
<a target="_blank" href="https://colab.research.google.com/github/OpenBB-finance/OpenBBTerminal/blob/develop/examples/googleColab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

The first financial terminal that is free and fully open source. With over 600 commands, the terminal has access to equity, options, crypto, forex, macro economy, fixed income, alternative datasets, and more.

Expand Down
6 changes: 3 additions & 3 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Building Installers
This guide serves to assist developers construct OpenBB Terminal installers on MacOs and Windows.
This guide serves to assist developers construct OpenBB Terminal installers on macOS and Windows.

## Overview
Building an installer takes source code as input and produces deployable software as an output. For MacOS the output is a DMG while for windows it is an EXE. This process utilizes two major modules: Pyinstaller & Create-dmg. Windows additionally recruits the service of NSIS. There are two ways to build an installer: locally or through Github.
Building an installer takes source code as input and produces deployable software as an output. For MacOS the output is a DMG while for Windows it is an EXE. This process utilizes two major modules: Pyinstaller & Create-dmg. Windows additionally recruits the service of NSIS. There are two ways to build an installer: locally or through Github.

## Local
In this section we detail the steps necessary to construct an installer locally on a windows machine and mac machine. These steps can be performed on either one of these operating systems so long as they have the OpenBBTerminal repository codebase. This process assumes you already have a working conda environment. Building locally usually takes anywhere from 10-20 minutes.
In this section we detail the steps necessary to construct an installer locally on a Windows machine and Mac machine. These steps can be performed on either one of these operating systems so long as they have the OpenBBTerminal repository codebase. This process assumes you already have a working conda environment. Building locally usually takes anywhere from 10-20 minutes.

### MacOS Steps
1. `brew install create-dmg`
Expand Down
2 changes: 1 addition & 1 deletion build/pyinstaller/macOS/darwin/Resources/conclusion.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h3>WSO2 API Manager</h3>
<p style="color: #020202; font-size: 11px;">Thank you for installing WSO2 API MAnager.</p>
<h5>Run API Manager</h5>
<p style="color: #020202; font-size: 11px;">Open a new terminal and run the following command to get start with APIM server:</p>
<p style="color: #020202; font-size: 11px;">Open a new terminal and run the following command to get started with APIM server:</p>
<code style="color: #c6a72b; font-size: 11px;">&nbsp; $ <span style="color: #abb0b0">wso2am-2.6.0 [command]</span></code>
</div>
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
Expand Down
2 changes: 1 addition & 1 deletion build/pyinstaller/macOS/darwin/Resources/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ VERSION=__VERSION__
PRODUCT=__PRODUCT__

echo "Application uninstalling process started"
# remove link to shorcut file
# remove link to shortcut file
find "/usr/local/bin/" -name "__PRODUCT__-__VERSION__" | xargs rm
if [ $? -eq 0 ]
then
Expand Down
7 changes: 5 additions & 2 deletions build/pypi/openbb_platform/nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

SUB_PACKAGES = {}
DEPENDENCIES: Dict[str, Any] = {}
PLUGINS = {"openbb_core_extension": {}, "openbb_provider_extension": {}}
PLUGINS: Dict[str, Dict] = {
"openbb_core_extension": {},
"openbb_provider_extension": {},
}
CMD = [sys.executable, "-m", "poetry", "build"]


Expand Down Expand Up @@ -44,7 +47,7 @@ def gather_metadata(sub_path: str):

def build():
"""Build the Platform package."""
for sub_path in ["platform", "providers", "extensions"]:
for sub_path in ["core", "providers", "extensions"]:
gather_metadata(sub_path)

# need to pop these from the dependencies
Expand Down
2 changes: 1 addition & 1 deletion build/pypi/openbb_platform/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def publish(dry_run: bool = False, core: bool = False, extensions: bool = False)
for path in PLATFORM_PATH.rglob(f"{sub_path}/**/pyproject.toml"):
try:
# Update dependencies
if is_extension:
if is_extension and "devtools" not in str(path):
update_extension_dependencies(path)
# Bump version
bump_version(path)
Expand Down
89 changes: 31 additions & 58 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,49 @@
# Jupyter Notebook Examples Using the OpenBB SDK
# Jupyter Notebook Examples Using the OpenBB Platform

This folder is a collection of example notebooks that demonstrate some of the ways to get started using the OpenBB SDK. To run them, ensure that the active kernel selected is the same Python virtual environment where OpenBB was installed.
This folder is a collection of example notebooks that demonstrate some of the ways to get started with using the OpenBB Platform. To run them, ensure that the active kernel selected is the same Python virtual environment where OpenBB was installed.

## Table of Contents

### loadHistoricalPriceData

This notebook walks through collecting historical price data using a variety of methods and sources.

- Loading data with different intervals, and changing sources.
- A brief explanation of ticker symbology.
- Using other functions and modules to load data with besides `openbb.stocks.load()`.
- Gang-loading a list of tickers' price data in a single call.
- Drawing candle and line charts.

### copperToGoldRatio

This notebook explains how to calculate and plot the Copper-to-Gold ratio.

- Loading historical front-month futures prices.
- Getting the historical series from FRED for the 10-year constant maturity US treasury bill.
- Performing basic DataFrame operations.
- Creating OpenBB Figure objects, and plotting on two y-axis.

### realizedVolatilityModels
### googleColab

This notebook demonstrates the six, realized volatility models with in the Technical Analysis module.
This notebook installs the OpenBB Platform in a Google Colab environment with examples for:

- Explore differences between:
- Standard Deviation
- Parkinson
- Hodges-Tompkins
- Garman-Klass
- Rogers-Satchell
- Yang-Zhang
- Creating and plotting realized volatility cones.
- Overlaying multiple time series.
- Use the calculated outputs as inputs to a forecast model.
- Logging into OpenBB Hub
- Setting the output preference
- Fetching options and company fundamentals data
- Creating bar chart visualizations

### usdLiquidityIndex
### findSymbols

This notebook demonstrates how to query the Federal Reserve Economic Database and recreate the USD Liquidity Index.
This notebook provides an introduction to discovering, finding, and searching ticker symbols.

- Search FRED for series IDs.
- Load multiple series as a single call.
- Unpacking the data response from the FRED query.
- Perform arithmetic operations on a DataFrame.
- Normalization methods for a series or DataFrame.
- Simple processes for creating charts.
- Search
- Find company and institutional filings
- Screen stocks by region and metrics

### optionsChains
### loadHistoricalPriceData

This notebook demonstrates how to fetch and work with options chains data.
This notebook walks through collecting historical price data, at different intervals, using a variety of sources.

- Use the new method for loading options chains data.
- Examine the differences of the data, between sources.
- Calculate and visualize volume and open interest by strike and expiration.
- Calculate and visualize the Net Delta Exposure, in dollars, by strike and expiration.
- Visualize the term structure of the implied volatility skew.
- Get tables with multiple single-leg options strategies.
- Loading data with different intervals, and changing sources
- A brief explanation of ticker symbology
- Resampling a time series index
- Some differences between providers, and comparing outputs

### googleColabInstallation
### financialStatements

This notebook demonstrates how to install the OpenBB SDK within Google Colab.
This set of examples introduces financial statements in the OpenBB Platform and compares the free cash flow yields of large-cap retail industry companies.

- Financial statements
- What to expect with data from different sources
- Financial attributes
- Ratios and other metrics

### volumeAtPrice
### copperToGoldRatio

Volume-at-price is a chart used by technical analysts as a visual gauge to where the trading levels are concentrated, relative to price and volume. In short, it is the sum of volume at different price levels. This notebook utilizes individual components of the OpenBB SDK and combines them to build a new view.
This notebook explains how to calculate and plot the Copper-to-Gold ratio.

- Price
- Volume
- VWAP
- SMA
- OpenBBFigure
- Loading historical front-month futures prices.
- Getting the historical series from FRED for the 10-year constant maturity US treasury bill.
- Performing basic DataFrame operations.
- Creating charts with Plotly Graph Objects.
Loading

0 comments on commit c0604bd

Please sign in to comment.