Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/financials-period-choices
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone committed May 23, 2024
2 parents 1c9845e + 1e46549 commit 19bffde
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 274 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/general-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
if: github.event_name == 'pull_request'
run: |
# "Checking PR diff"
echo "platform_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
echo $platform_files
echo "diff_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$|cli/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
echo $diff_files
- uses: actions/cache@v3
with:
Expand All @@ -58,16 +58,17 @@ jobs:
pip install openbb-devtools
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=.codespell.ignore --skip="$(tr '\n' ',' < .codespell.skip | sed 's/,$//')" --quiet-level=2
- run: ruff .
- run: |
# Run linters for openbb_platform
if [ -n "${{ env.platform_files }}" ]; then
pylint ${{ env.platform_files }}
pydocstyle ${{ env.platform_files }}
# Run linters for openbb_platform | cli
if [ -n "${{ env.diff_files }}" ]; then
black --diff --check ${{ env.diff_files }}
mypy ${{ env.diff_files }} --ignore-missing-imports --scripts-are-modules --check-untyped-defs
pydocstyle ${{ env.diff_files }}
pylint ${{ env.diff_files }}
ruff check ${{ env.diff_files }}
else
echo "No Python files changed in openbb_platform"
echo "No Python files changed in openbb_platform | cli"
fi
markdown-link-check:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.4.5"
hooks:
- id: ruff
- repo: https://github.com/pycqa/pydocstyle
Expand Down

0 comments on commit 19bffde

Please sign in to comment.