Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
ashioyajotham committed Jan 11, 2025
1 parent f4a53e9 commit 5c37136
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@ permissions:
contents: read

jobs:
build:
quality:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort
pip install black
pip install flake8
pip install pytest
pip install pandas
pip install pandas-stubs
- name: Run isort
run: isort . --check-only --diff
- name: Run black
run: black . --check
- name: Run flake8
run: flake8
pip install black flake8 isort bandit safety pytest-cov
pip install -r requirements.txt
- name: Check formatting
run: |
black . --check
isort . --check-only --diff
- name: Lint
run: |
flake8 . --count --statistics
bandit -r .
- name: Security check
run: |
safety check
32 changes: 18 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ profile = "black"
multi_line_output = 3
py_version = 311

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
packages = ["fingpt_trader"]

[tool.bandit]
exclude_dirs = ["tests", "venv", ".git", "__pycache__"]
skips = ["B101", "B104"] # Skip assert statements and hardcoded bind
Expand All @@ -33,6 +19,24 @@ skips = ["test_*.py"]
[tool.bandit.hardcoded_bind_all_interfaces]
skips = ["start_bot.py"]

[tool.flake8]
max-line-length = 88
extend-ignore = E203, W503
exclude = .git,__pycache__,venv,tests, dist

[coverage:run]
branch = True
source = fingpt_trader

[coverage:report]
show_missing = True
skip_covered = True
fail_under = 100
exclude_lines =
pragma: no cover
def __repr__
raise NotImplementedError

[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
Expand Down

0 comments on commit 5c37136

Please sign in to comment.