diff --git a/.github/workflows/platform-api-integration-test.yml b/.github/workflows/platform-api-integration-test.yml new file mode 100644 index 000000000000..02545c85764e --- /dev/null +++ b/.github/workflows/platform-api-integration-test.yml @@ -0,0 +1,134 @@ +name: API Integration Tests + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + api-integration-tests: + runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + OPENBB_API_AUTH: true + OPENBB_API_USERNAME: "USER" + OPENBB_API_PASSWORD: "PASS" + + steps: + - name: Slack Notification - Starting + uses: act10ns/slack@v1 + with: + status: starting + channel: "#workflows" + message: Starting API Integration Test... + if: always() + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checkout specific ref + if: github.event_name == 'pull_request' + run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD + + - name: Setup Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + architecture: x64 + + - name: Load cached venv + id: cached-python-environment + uses: actions/cache@v3 + with: + path: runner_env + key: runner_env-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock', '**/dev_install.py') }} + + - name: Install Dependencies + if: steps.cached-python-environment.outputs.cache-hit != 'true' + run: | + python -m venv runner_env + source runner_env/bin/activate + pip install pytest poetry\ + ./openbb_platform \ + ./openbb_platform/providers/alpha_vantage \ + ./openbb_platform/providers/cboe \ + ./openbb_platform/providers/quandl \ + ./openbb_platform/providers/fmp \ + ./openbb_platform/providers/yfinance \ + ./openbb_platform/providers/intrinio \ + ./openbb_platform/extensions/futures \ + ./openbb_platform/extensions/qa \ + ./openbb_platform/extensions/ta \ + ./openbb_platform/extensions/econometrics + pip uninstall -y openbb_core + pip uninstall -y openbb_provider + cd openbb_platform/platform/core + pip install -U . + cd ../provider/ + pip install -U . + cd ../../../ + pip install -U pydantic + + - name: Populate System Setting Files + run: | + mkdir -p ~/.openbb_platform + touch ~/.openbb_platform/system_settings.json + echo '{"log_collect":false}' > ~/.openbb_platform/system_settings.json + cat ~/.openbb_platform/system_settings.json + + - name: Create and Populate user_settings.json from GitHub Secrets + run: | + touch ~/.openbb_platform/user_settings.json + echo '{ + "credentials": { + "benzinga_api_key": ${{ secrets.BENZINGA_API_KEY }}, + "fmp_api_key": "${{ secrets.FMP_API_KEY }}", + "polygon_api_key": "${{ secrets.POLYGON_API_KEY }}", + "alpha_vantage_api_key": "${{ secrets.ALPHA_VANTAGE_API_KEY }}", + "fred_api_key": "${{ secrets.FRED_API_KEY }}", + "intrinio_api_key": "${{ secrets.INTRINIO_API_KEY }}" + } + }' > ~/.openbb_platform/user_settings.json + + - name: Launch the Uvicorn Process + run: | + source runner_env/bin/activate + pip list + uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & + + - name: Wait for 10 seconds + run: sleep 10 + + - name: Run API Integration Tests + run: | + source runner_env/bin/activate + pip list + cd openbb_platform + pytest -m integration + + - name: Cache pip packages + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: runner_env-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock', '**/dev_install.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Upload summary to Slack + uses: adrey/slack-file-upload-action@master + with: + token: ${{ secrets.SLACK_API_TOKEN }} + initial_comment: "API Integration test summary" + title: "Integration test summary" + path: summary.txt + channel: ${{ secrets.SLACK_CHANNEL_ID }} + + - name: Slack Notification - Success/Failure + uses: act10ns/slack@v1 + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} + channel: "#workflows" + if: always() diff --git a/.github/workflows/platform-integration-test.yml b/.github/workflows/platform-integration-test.yml new file mode 100644 index 000000000000..806f2cc34e61 --- /dev/null +++ b/.github/workflows/platform-integration-test.yml @@ -0,0 +1,96 @@ +name: Integration Tests + +on: + push: + branches: + - release/* + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + integration-tests: + runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + steps: + - name: Slack Notification - Starting + uses: act10ns/slack@v1 + with: + status: starting + channel: '#workflows' + message: Starting Integration Test... + if: always() + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checkout specific ref + if: github.event_name == 'pull_request' + run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD + + - name: Setup Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + architecture: x64 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.4.0 + virtualenvs-create: true + virtualenvs-in-project: true + + - name: Setup sudo apt installs for ubuntu-latest + run: | + sudo apt-get update + sudo apt-get install -y \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction -E optimization + + - name: Run integration tests + id: integration-tests + run: | + source $VENV + python terminal.py -t | tee result.txt + grep "================================ Integration Test Summary ================================" result.txt -A100 | tail --bytes=2000 > summary.txt + echo >> summary.txt + + - name: Run Integration Tests Coverage Report + id: integration-tests-coverage + run: | + source $VENV + python terminal.py -t --coverage | tee result.txt + sed -n '/Integration Coverage Summary/,$p' result.txt >> summary.txt + + - name: Upload summary to Slack + uses: adrey/slack-file-upload-action@master + with: + token: ${{ secrets.SLACK_API_TOKEN }} + initial_comment: "Integration test summary" + title: "Integration test summary" + path: summary.txt + channel: ${{ secrets.SLACK_CHANNEL_ID }} + + - name: Slack Notification - Success/Failure + uses: act10ns/slack@v1 + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} + channel: '#workflows' + if: always() diff --git a/website/content/bot/reference/discord/autopost/add.md b/website/content/bot/reference/discord/autopost/add.md index bbcb3a75bba4..69211167f011 100644 --- a/website/content/bot/reference/discord/autopost/add.md +++ b/website/content/bot/reference/discord/autopost/add.md @@ -1,32 +1,38 @@ --- ########### THIS FILE IS AUTO GENERATED - ANY CHANGES WILL BE VOID ########### -title: add +title: commands add description: OpenBB Discord Command --- -# add +# commands add -This command allows the user to add an autopost webhook feed to a channel. It allows the user to receive notifications from OpenBB webhooks in the channel without having to manually post them. This can be used to keep track of flow, darkpool, market heatmap and more. +This command allows the user to add an autopost command to a channel. It allows the user to receive notifications from OpenBB bot in the channel without having to manually query them. This can be used for all commands that appear in the list when you run "autopost commands add" ### Usage ```python wordwrap -/autopost add +/autopost commands add cmd interval [start_time] [stop_time] ``` --- ## Parameters -This command has no parameters - - +| Name | Description | Optional | Choices | +| ---- | ----------- | -------- | ------- | +| cmd | Pick the command you want to assign for autoposting | False | List of commands that allow auto posting | +| interval | How oftern to post the autopost command | False | 5m, 15m, 30m, 1hr, 2hr, 4hr, 6hr | +| start_time | Time to start the autopost command - ex. If I want to start at 8am I do 8 | True | 24hr time | +| stop_time | Time to stop the autopost command - ex. If I want to stop at 6pm I do 18 | True | 24hr time | --- ## Examples ``` -/autopost add +/autopost commands add cmd:/cm interval:1 Hour +``` + +``` +/autopost commands add cmd: /cm interval: 1 Hour start_time: 9 stop_time: 10 ``` ---- diff --git a/website/content/bot/reference/discord/autopost/feeds.md b/website/content/bot/reference/discord/autopost/feeds.md new file mode 100644 index 000000000000..e6837cf5b55d --- /dev/null +++ b/website/content/bot/reference/discord/autopost/feeds.md @@ -0,0 +1,39 @@ +--- +########### THIS FILE IS AUTO GENERATED - ANY CHANGES WILL BE VOID ########### +title: feeds +description: OpenBB Discord Command +--- + +# feeds + +This command allows the user to add, remove, or list autopost webhook feeds to a channel. It allows the user to receive notifications from OpenBB webhooks in the channel without having to manually post them. This can be used to keep track of flow, darkpool, and market heatmaps. + + +### Usage + +```python wordwrap +/autopost feeds action +``` + +--- + +## Parameters + +| Name | Description | Optional | Choices | +| ---- | ----------- | -------- | ------- | +| action | Add, Remove, or List your feeds for Discord autoposts | False | Add, Remove, List | + + +## Examples + +``` +/autopost feeds action:Add +``` + +``` +/autopost feeds action:List +``` + +``` +/autopost feeds action:Remove +``` diff --git a/website/content/bot/reference/discord/autopost/index.mdx b/website/content/bot/reference/discord/autopost/index.mdx index 91fc999e128f..de5c3e78ee27 100644 --- a/website/content/bot/reference/discord/autopost/index.mdx +++ b/website/content/bot/reference/discord/autopost/index.mdx @@ -5,18 +5,18 @@ import ReferenceCard from "@site/src/components/General/ReferenceCard"; diff --git a/website/content/bot/reference/discord/autopost/list.md b/website/content/bot/reference/discord/autopost/list.md deleted file mode 100644 index 1c4d55edb7de..000000000000 --- a/website/content/bot/reference/discord/autopost/list.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -########### THIS FILE IS AUTO GENERATED - ANY CHANGES WILL BE VOID ########### -title: list -description: OpenBB Discord Command ---- - -# list - -This command allows users to view all webhook feeds associated with a particular channel that have been set up for automatic posting. It produces a list of all webhooks that have been configured to post content to the channel automatically, as well as information such as when they are scheduled. - -### Usage - -```python wordwrap -/autopost list -``` - ---- - -## Parameters - -This command has no parameters - - - ---- - -## Examples - -``` -/autopost list -``` ---- diff --git a/website/content/bot/reference/discord/autopost/remove.md b/website/content/bot/reference/discord/autopost/manage.md similarity index 54% rename from website/content/bot/reference/discord/autopost/remove.md rename to website/content/bot/reference/discord/autopost/manage.md index bccdc79482d7..f13103ba320e 100644 --- a/website/content/bot/reference/discord/autopost/remove.md +++ b/website/content/bot/reference/discord/autopost/manage.md @@ -1,32 +1,36 @@ --- ########### THIS FILE IS AUTO GENERATED - ANY CHANGES WILL BE VOID ########### -title: remove +title: commands manage description: OpenBB Discord Command --- -# remove +# commands manage This command allows the user to remove an autopost webhook feed from the channel. When executed, it will remove the feed from the channel and prevent any further autoposts from being sent. ### Usage ```python wordwrap -/autopost remove +/autopost commands manage action ``` --- ## Parameters -This command has no parameters - - +| Name | Description | Optional | Choices | +| ---- | ----------- | -------- | ------- | +| action | Remove, or List your feeds for Discord autoposts | True | Remove, List | --- ## Examples ``` -/autopost remove +/autopost commands manage action:List ``` ---- + +``` +/autopost commands manage action:Remove +``` + diff --git a/website/content/bot/usage/customizing/server.md b/website/content/bot/usage/customizing/server.md index 287d8f2b0e34..3103f4a09c63 100644 --- a/website/content/bot/usage/customizing/server.md +++ b/website/content/bot/usage/customizing/server.md @@ -15,11 +15,11 @@ The Server plan for OpenBB Bot offers three different capabilities - Charting, B ## Server -### Auto Posting (Discord Only) +### Auto Posting (Feeds) (Discord Only) -Auto Posting is our most powerful feature for Discord Servers - We offer the ability to push updates into the server for Flow, Darkpool, or Heatmap/Charts. (more to come soon!) Once you set up your account you will be able to query the bot directly in your server like below : +Auto Posting is our most powerful feature for Discord Servers - We offer the ability to push updates into the server for Flow, Darkpool, or Heatmap/Charts. Once you set up your account you will be able to query the bot directly in your server like below : -autoposting openBB +autoposting openBB Or you can manage them at the HUB : autoposting openBB @@ -46,6 +46,25 @@ For a further breakdown on what each Flow Auto Post entails - See below | Buy to Open | "Premium > $1,000,000" & "Volume > Open Interest" & "Trade Type is Above Ask" | | Whale | "Premium > $1.000,000" & "Days to Expiration < 45" | + +### Auto Posting (Commands) (Discord Only) + +Much like Feeds we now offer Commands to be set up as autoposts as well - These behave in the same way but can be setup to autopost bot commands. + +Once you set up your account you will be able to query the bot directly in your server like below : +commands add openBB + +Commands as autoposts are a great way to get your community the info they need in a timely manner. + +We have allowed even more autoposts to be set up in your server so you can really create a fun environment for all your needs: +autopost list openBB + +Below are a few examples of autoposts set up as commands in a server : + +earnings command autopost openBB + +earnings command autopost openBB + ### Charting Custom charting works the same way as Individual charting but it will apply to your full server. If you want everyone in your server to use the "Classic" theme and have RSI + 50d SMA then it will display that way for all users in your server (unless they have already registered their own individual account). diff --git a/website/content/sdk/showcase.md b/website/content/sdk/showcase.md index 714dc4bbaf48..916d15c706a3 100644 --- a/website/content/sdk/showcase.md +++ b/website/content/sdk/showcase.md @@ -13,30 +13,10 @@ import ShowcaseItem from "@site/src/components/General/ShowcaseItem" This page contains a list of projects that use the OpenBB SDK. -If you have a project that uses the OpenBB SDK, please feel free to add it [here](#). +If you have a project that uses the OpenBB SDK, please contact us via [Discord](https://discord.com/invite/Up2QGbMKHY) or [hello@openbb.co](mailto:hello@openbb.co). --- - - - - - - - - - - Ultima Insights' News Monitor is a platform that harnesses the power of GPT + LLMs to help deliver better, more relevant news to investors. We help find the news & tell you why it's important before it's on the front page of Bloomberg. +> Ultima Insights offers tools such as the SEC Filing Analyst, Company news monitoring, Industry event watch, and Earnings Call Roundup for comprehensive investment monitoring. It incorporates daily Wall Street-level Qualitative analysis into OpenBB to keep users updated. The News curation system, powered by GPT + LLMs technology, presents relevant news to investors, often before it appears on platforms like Bloomberg. Ultima aims to provide timely and significant information for its users.
Instructions