mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
* Gave forecasting memory * Fixed scripts, refactored * FIxed poetry lock * edge case check for forecast target * Improved combine and load functionality * Cleaned up translations * Fixed issue with covariates * Fixed issue checking covariates * Another covariates check fix * Ignored regr and linregr warnings * Fixed covariate issues * switched from forecasting to forecast * Finished transition to forecast * Can add entire dataset with one command * Improved combine description * Removed naming covariates * Created new installation * typo * Make plot show dates if available * Added better handling or users without the menu * Removed unused file * Fix * Better handling for nontraditional datasets * Fixed black and pylint * Fixed tests * Added darts install to main tests * Working on darts with CI * Added back test file * Made large tables print better * naive baseline * typo * Finished naive * no dollar on prediction * fixed positive MAPE bug * quick refactoring * Fixed two different args for same thing * added extra patience * linreg mape fix * info fix * Refactored API, bumped to Darts 0.21.0 * Added fixes * Increased verbosity for wrong column * Updated dependencies * Hid warnings * Fixed importing * Fixed tests * Fixed ugly seasonal plotting * Fixed forecast line color * Switched chart output to blue * Simplified lambda_price_prediction_color * fixed residuals * Chnage * Removed darts from CI per Chavi * Added fixes to tests * Added knnfix * Fixed issue where n!= o * Added changes * Added changes * Imrpoved forecast dash * Added Theo notebook * Added enhancements to dash * Added notebook * Added fix for jupyter lab * Added debug stuff * Change * Updated docs * Fixed formatting * Fixed formatting * Removed prints * Filtered some info * Added button to run model * Improved api * Added secret feautr (no peeking Martin) * Cleaned code * Fixed tests * Added test fixes * Added fixes * Fixes * FIxes for pres * Remove bad tests * Removed knn * Fixed issues with removing mc * doc for conda * Added forecast improvements * Added streamlit support * Fixed issues * fix expo with streamlit due to quantile() * fixed performance issues with streamlit for now.. * clean up historical forecast with new trainer * quick fix for regression trainer params * Added fixes * quick fix for other fix for regression trainer params * table formatting for timestamp * potential fix for inf in feature engineered datasets * Basic working in new format * dw * Trying * Fixed issues * Improved graphing * fixing trainer for LR and formatting * doge and linting * page break * automatic cleaning of datasets * automatic cleaning of datasets- fix * Fixed forecast dates * Made dashboard prettier * Added fixes * Added fixes * Added options * Fixed error * remove caching * adding in spinner * Added vairable n_predict in streamlit * Added mypy fix * renaming and range change * new index for n predict * check positive float for window size * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md * renaming * reorg files * Update _index.md * hidden which command for versions * Update _index.md * Update _index.md * which: ns parser * hugo for: which * hugo for: forecasting fix * formatting black * update stock controller test * Lay groundwork for better residual plotting * improved delete to allow for periods in title * improved automatic cleaning of inf * Added new API * Added new API * Added new API * formatting for black * Updated our testing CI * Reverted changes * Added forecast docs * Fixed mypy issues * Fixes tests * Did some refactoring, added a report * new api in streamlit * Added integrated tests * Update _index.md * improved loading in custom dataset * menu spacing * installer fixes * Added docs fixes * Adding comments to test if commit working * Fixed report * naming conventions * formatting * removing unused var * Made last report imporvements * Update README.md * Added fix * Switched to warning * Added fixes * Added fixes * Added fixes * Added fixes * Update economy av view test * Remove forgotten print statement * Update depencencies * Added verbosity to pytest * Added fixes * Fixed pylint * Fixed actions checkout * Added fixes Co-authored-by: colin99d <colin99delahunty@gmail.com> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: James Simmons <simmonsj330@gmail.com> Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
264 lines
8.6 KiB
YAML
Vendored
264 lines
8.6 KiB
YAML
Vendored
name: Tests
|
|
env:
|
|
OPENBB_ENABLE_QUICK_EXIT: true
|
|
OPENBB_LOG_COLLECT: false
|
|
OPENBB_USE_ION: false
|
|
OPENBB_USE_PROMPT_TOOLKIT: false
|
|
PIP_DEFAULT_TIMEOUT: 100
|
|
on: [pull_request, push]
|
|
jobs:
|
|
linting:
|
|
name: General Linting
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # actions/checkout v3.0.2
|
|
|
|
- name: Setup Python 3.9
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.9"
|
|
architecture: x64
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-v1-linting
|
|
restore-keys: ${{ runner.os }}-v1-linting
|
|
|
|
- run: python custom_pre_commit/check_doc.py --ignore-files=settings_controller.py,keys_controller.py,featflags_controller.py,degiro_controller.py,oanda_controller.py --ignore-commands=login,al_swe,info_swe,goodness,resources,yf,yolo
|
|
- run: pip install bandit black codespell flake8 mypy pyupgrade safety pylint==2.15.2
|
|
- run: pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
|
|
- run: bandit -x ./tests -r . || true
|
|
- run: black --diff --check .
|
|
- run: codespell --ignore-words-list=commun,statics,ro,zar,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller
|
|
- run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics --exclude ./build/pyinstaller
|
|
- run: mypy --ignore-missing-imports --exclude="/setup\.py$" .
|
|
- run: shopt -s globstar && pyupgrade --py38-plus **/*.py
|
|
- run: safety check
|
|
- run: |
|
|
pylint terminal.py openbb_terminal tests
|
|
test:
|
|
name: Base Tests - Ubuntu-latest - Python 3.9
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- 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.1.13
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- 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 --no-root
|
|
|
|
- name: Install Package
|
|
run: poetry install --no-interaction
|
|
|
|
- name: Run tests
|
|
env:
|
|
MPLBACKEND: Agg
|
|
run: |
|
|
source $VENV
|
|
pytest tests/
|
|
|
|
- name: Start Terminal and exit
|
|
run: |
|
|
source $VENV
|
|
python terminal.py
|
|
markdown-link-check:
|
|
name: Markdown Linting
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
name: Check out the code
|
|
- name: Lint Code Base
|
|
uses: docker://avtodev/markdown-lint:v1
|
|
with:
|
|
args: "./*.md ./changelogs/*.md ./openbb_terminal/**/*.md ./discordbot/**/*.md"
|
|
tests-python:
|
|
name: Vanilla Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }})
|
|
needs: test
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
python-version: ["3.8", "3.9", "3.10"]
|
|
os: [ubuntu-latest, macos-latest]
|
|
exclude:
|
|
- os: ubuntu-latest
|
|
python-version: "3.9"
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
architecture: x64
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.1.13
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- 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 --no-root
|
|
|
|
- name: Install Package
|
|
run: poetry install --no-interaction
|
|
|
|
- name: List installed packages
|
|
shell: bash -l {0}
|
|
run: |
|
|
source $VENV
|
|
pip list
|
|
|
|
- name: Run tests
|
|
env:
|
|
MPLBACKEND: Agg
|
|
run: |
|
|
source $VENV
|
|
pytest tests/
|
|
|
|
- name: Start Terminal and exit
|
|
run: |
|
|
source $VENV
|
|
python terminal.py
|
|
tests-conda:
|
|
name: Anaconda Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }})
|
|
needs: test
|
|
runs-on: ${{ matrix.os }}-latest
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ["ubuntu", "windows"]
|
|
python-version: ["3.9"]
|
|
dependencies: [""]
|
|
include:
|
|
- os: ubuntu
|
|
python: 3.9
|
|
- os: windows
|
|
python: 3.9
|
|
env:
|
|
OS: ${{ matrix.os }}
|
|
PYTHON: ${{ matrix.python }}
|
|
PYTHONNOUSERSITE: 1
|
|
steps:
|
|
- name: Set git to use LF
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
git config --global core.eol lf
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
# Need to fetch more than the last commit so that setuptools-scm can
|
|
# create the correct version string. If the number of commits since
|
|
# the last release is greater than this, the version still be wrong.
|
|
# Increase if necessary.
|
|
fetch-depth: 100
|
|
# The GitHub token is preserved by default but this job doesn't need
|
|
# to be able to push to GitHub.
|
|
persist-credentials: false
|
|
|
|
- name: Setup caching for conda packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/conda_pkgs_dir
|
|
key: conda-${{ runner.os }}-v1-${{ matrix.python }}-${{ hashFiles('build/conda/conda-3-9-env-full.yaml') }}
|
|
|
|
- name: Setup Miniconda
|
|
uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
miniconda-version: "latest"
|
|
auto-update-conda: true
|
|
channels: conda-forge,defaults
|
|
show-channel-urls: true
|
|
channel-priority: flexible
|
|
environment-file: build/conda/conda-3-9-env.yaml
|
|
activate-environment: testing
|
|
# Needed for caching
|
|
use-only-tar-bz2: true
|
|
|
|
- name: Update Temp permissions on windows
|
|
if: runner.os == 'Windows'
|
|
shell: cmd /C CALL {0}
|
|
run: >-
|
|
c:\windows\system32\icacls C:\Users\runneradmin\AppData\Local\Temp /grant "everyone":F /t
|
|
|
|
- name: Get pip cache dir
|
|
shell: bash -l {0}
|
|
id: pip-cache
|
|
run: |
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: pip cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-v1-3-9-pip-${{ hashFiles('requirements-full.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-v1-pip-
|
|
|
|
- name: Uninstall Brotlipy
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda remove brotlipy -y
|
|
|
|
- name: Install dependencies (Bash)
|
|
shell: bash -l {0}
|
|
run: |
|
|
pip install --requirement requirements-full.txt
|
|
|
|
- name: List installed packages (Bash)
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda list
|
|
pip list
|
|
|
|
- name: Run tests (Bash)
|
|
env:
|
|
MPLBACKEND: Agg
|
|
shell: bash -l {0}
|
|
run: pytest tests/ -m "not linux"
|
|
|
|
- name: Start Terminal and exit
|
|
shell: bash -l {0}
|
|
run: python terminal.py
|