mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 14:02:06 +00:00
Gitflow - Autodoc (#3922)
This commit is contained in:
5
.github/workflows/gh-pages.yml
vendored
5
.github/workflows/gh-pages.yml
vendored
@@ -1,13 +1,16 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types: [closed]
|
||||
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
name: Generate and Deploy documentation
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Git checkout
|
||||
|
||||
6
.github/workflows/linting.yml
vendored
6
.github/workflows/linting.yml
vendored
@@ -10,8 +10,8 @@ env:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "feature/*"
|
||||
- "hotfix/*"
|
||||
- 'feature/*'
|
||||
- 'hotfix/*'
|
||||
- 'release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?'
|
||||
|
||||
# Cancel previous runs that are not yet completed.
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- run: |
|
||||
pip install bandit black codespell mypy==0.982 pyupgrade safety pylint==2.15.2 packaging==22 ruff
|
||||
pip install bandit black codespell mypy==0.982 pyupgrade safety pylint==2.15.2 packaging==22 ruff==0.0.212
|
||||
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 .
|
||||
|
||||
2
.github/workflows/unit-test.yml
vendored
2
.github/workflows/unit-test.yml
vendored
@@ -92,7 +92,7 @@ jobs:
|
||||
MPLBACKEND: Agg
|
||||
run: |
|
||||
source $VENV
|
||||
pytest tests/ --optimization
|
||||
pytest tests/ --optimization --autodoc
|
||||
|
||||
- name: Start Terminal and exit
|
||||
run: |
|
||||
|
||||
8
CONTRIBUTING.md
vendored
8
CONTRIBUTING.md
vendored
@@ -1530,13 +1530,15 @@ Network model.
|
||||
to go back to step 3 to add these.
|
||||
|
||||
### Branch Naming Conventions
|
||||
|
||||
The accepted branch naming conventions are:
|
||||
|
||||
- `feature/feature-name`
|
||||
- `hotfix/hotfix-name`
|
||||
- `release/2.1.0` or `release/2.1.0rc0`.
|
||||
- `feature/feature-name`
|
||||
- `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.
|
||||
|
||||
## Add a Test
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
print("Hello, World!")
|
||||
|
||||
# print another
|
||||
print("Hello, World!")
|
||||
@@ -1,5 +1,6 @@
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def no_dfs(args: list, kwargs: dict) -> bool:
|
||||
"""Returns false if there are in dataframe objects given"""
|
||||
for item in args:
|
||||
@@ -8,4 +9,4 @@ def no_dfs(args: list, kwargs: dict) -> bool:
|
||||
for item in kwargs.values():
|
||||
if isinstance(item, pd.DataFrame):
|
||||
return False
|
||||
return True
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user