Skip to content

Commit

Permalink
Remove flake8 and pydocstyle from pytest command
Browse files Browse the repository at this point in the history
  • Loading branch information
mirand863 committed Nov 25, 2024
1 parent 46ed16b commit 83ee6e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
python -m pip install -e ".[dev]"
- name: Test with pytest
run: |
pytest -v --flake8 --pydocstyle --cov=hiclass --cov-fail-under=90 --cov-report html
flake8
pydocstyle
pytest -v --cov=hiclass --cov-fail-under=90 --cov-report html
coverage xml
- name: Upload Coverage to Codecov
if: matrix.os == 'ubuntu-latest'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
python -m pip install -e ".[dev]"
- name: Test with pytest
run: |
pytest -v --flake8 --pydocstyle --cov=hiclass --cov-fail-under=90 --cov-report html
flake8
pydocstyle hiclass tests
pytest -v --cov=hiclass --cov-fail-under=90 --cov-report html
coverage xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
4 changes: 2 additions & 2 deletions hiclass/HierarchicalClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def _fit_node_classifier(
self, nodes, local_mode: bool = False, use_joblib: bool = False
):
def logging_wrapper(func, idx, node, node_length):
self.logger_.info(f"fitting node {idx+1}/{node_length}: {str(node)}")
self.logger_.info(f"fitting node {idx + 1}/{node_length}: {str(node)}")
return func(self, node)

if self.n_jobs > 1:
Expand Down Expand Up @@ -481,7 +481,7 @@ def _fit_node_calibrator(
self, nodes, local_mode: bool = False, use_joblib: bool = False
):
def logging_wrapper(func, idx, node, node_length):
self.logger_.info(f"calibrating node {idx+1}/{node_length}: {str(node)}")
self.logger_.info(f"calibrating node {idx + 1}/{node_length}: {str(node)}")
return func(self, node)

if self.n_jobs > 1:
Expand Down
4 changes: 2 additions & 2 deletions hiclass/LocalClassifierPerLevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _fit_digraph(self, local_mode: bool = False, use_joblib: bool = False):
self.logger_.info("Fitting local classifiers")

def logging_wrapper(func, level, separator, max_level):
self.logger_.info(f"fitting level {level+1}/{max_level}")
self.logger_.info(f"fitting level {level + 1}/{max_level}")
return func(self, level, separator)

if self.n_jobs > 1:
Expand Down Expand Up @@ -395,7 +395,7 @@ def _calibrate_digraph(self, local_mode: bool = False, use_joblib: bool = False)
self.logger_.info("Fitting local calibrators")

def logging_wrapper(func, level, separator, max_level):
self.logger_.info(f"calibrating level {level+1}/{max_level}")
self.logger_.info(f"calibrating level {level + 1}/{max_level}")
return func(self, level, separator)

if self.n_jobs > 1:
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
"ray": ["ray>=1.11.0"],
"xai": ["shap==0.44.1", "xarray==2023.1.0"],
"dev": [
"flake8==4.0.1",
"pytest==7.1.2",
"pytest-flake8==1.1.1",
"pydocstyle==6.1.1",
"pytest-pydocstyle==2.3.0",
"flake8",
"pytest",
"pydocstyle",
"pytest-cov==3.0.0",
"pyfakefs==5.3.5",
"black==24.2.0",
Expand Down

0 comments on commit 83ee6e8

Please sign in to comment.