Skip to content

Commit

Permalink
added pydocstyle (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanisaac authored Aug 23, 2023
1 parent e26e151 commit 0d52d37
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/test-rules-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,19 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
pytest
pytest
pydocstyle:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: "./.github/actions/setup-rules-engine"
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
pydocstyle .
4 changes: 4 additions & 0 deletions rules-engine/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dev = [
"black",
"isort",
"mypy",
"pydocstyle",
"pytest",
]

Expand All @@ -24,3 +25,6 @@ profile = "black"
[tool.mypy]
disallow_any_generics = true
disallow_incomplete_defs = true

[tool.pydocstyle]
select = "D207,D208,D3,D417"
4 changes: 4 additions & 0 deletions rules-engine/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ platformdirs==3.7.0
# via black
pluggy==1.0.0
# via pytest
pydocstyle==6.3.0
# via rules-engine (pyproject.toml)
pytest==7.3.2
# via rules-engine (pyproject.toml)
snowballstemmer==2.2.0
# via pydocstyle
tomli==2.0.1
# via
# black
Expand Down
1 change: 1 addition & 0 deletions rules-engine/src/rules_engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def calculate_balance_point_and_ua_customizable(
Args:
bps_to_remove: a list of Billing Periods that user wishes to remove from calculation
balance_point_sensitivity: the amount to adjust when refining the balance point
"""

customized_bills = [bp for bp in self.bills if bp not in bps_to_remove]
Expand Down

0 comments on commit 0d52d37

Please sign in to comment.