Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorWounds committed May 15, 2024
2 parents b7a5c1f + 74652ec commit f9f5c93
Show file tree
Hide file tree
Showing 420 changed files with 35,228 additions and 37,698 deletions.
20 changes: 19 additions & 1 deletion .github/scripts/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
PLATFORM_TESTS = [
str(PLATFORM_DIR / p) for p in ["tests", "core", "providers", "extensions"]
]
CLI_DIR = ROOT_DIR / "cli"
CLI_TESTS = CLI_DIR / "tests"


@nox.session(python=["3.9", "3.10", "3.11"])
def tests(session):
def unit_test_platform(session):
"""Run the test suite."""
session.install("poetry", "toml")
session.run(
Expand All @@ -27,3 +29,19 @@ def tests(session):
session.run(
"pytest", *PLATFORM_TESTS, f"--cov={PLATFORM_DIR}", "-m", "not integration"
)


@nox.session(python=["3.9", "3.10", "3.11"])
def unit_test_cli(session):
"""Run the test suite."""
session.install("poetry", "toml")
session.run(
"python",
str(PLATFORM_DIR / "dev_install.py"),
"-e",
"all",
external=True,
)
session.install("pytest")
session.install("pytest-cov")
session.run("pytest", CLI_TESTS, f"--cov={CLI_DIR}")
226 changes: 47 additions & 179 deletions .github/workflows/README.md

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy the OpenBB Platform and the OpenBBTerminal to Test PyPI
name: Deploy the OpenBB Platform to Test PyPI

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Drafter
name: Draft release

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: General Linting

env:
OPENBB_ENABLE_QUICK_EXIT: true
OPENBB_LOG_COLLECT: false
OPENBB_USE_PROMPT_TOOLKIT: false
OPENBB_FILE_OVERWRITE: true
PIP_DEFAULT_TIMEOUT: 100

on:
Expand Down
File renamed without changes.
27 changes: 0 additions & 27 deletions .github/workflows/labels-issue.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/nightly-build.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/pypi.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: API Integration Tests
name: 🚉 Integration test Platform (API)

on:
workflow_dispatch:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test-unit-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 🖥️ Unit test CLI

on:
pull_request:
branches:
- develop
paths:
- 'cli/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
unit_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false

matrix:
python_version:
["3.9", "3.10", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true
cache: "pip"

- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('cli/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Run tests
run: |
pip install nox
nox -f .github/scripts/noxfile.py -s unit_test_cli --python ${{ matrix.python_version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Platform V4
name: 🚉 Unit test Platform

on:
pull_request:
Expand Down Expand Up @@ -43,4 +43,4 @@ jobs:
- name: Run tests
run: |
pip install nox
nox -f .github/scripts/noxfile.py -s tests --python ${{ matrix.python_version }}
nox -f .github/scripts/noxfile.py -s unit_test_platform --python ${{ matrix.python_version }}
72 changes: 0 additions & 72 deletions .github/workflows/unit-test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
types: [python]
files: '^openbb_platform/.*\.py$'
exclude: 'tests/.*\.py|openbb_platform/test_.*\.py'
args: ["--config=pyproject.toml"]
args: ["--config=ruff.toml"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
Expand All @@ -39,7 +39,7 @@ repos:
"--ignore-words-list=VAI,MIS,shs,gard,te,commun,parana,ro,zar,vie,hel,jewl,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,statics,ket,toke,certi,buidl,ot,fo",
"--quiet-level=2",
"--skip=./**/tests/**,./**/test_*.py,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*,./website/config.toml",
"-x=.github/workflows/linting.yml"
"-x=.github/workflows/general-linting.yml"
]
- repo: local
hooks:
Expand Down
Loading

0 comments on commit f9f5c93

Please sign in to comment.