diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index 606ced04..f8acb080 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -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' diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 34e5cca5..7cdb3c3b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -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 diff --git a/hiclass/HierarchicalClassifier.py b/hiclass/HierarchicalClassifier.py index 75ec94c6..e23915b1 100644 --- a/hiclass/HierarchicalClassifier.py +++ b/hiclass/HierarchicalClassifier.py @@ -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: @@ -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: diff --git a/hiclass/LocalClassifierPerLevel.py b/hiclass/LocalClassifierPerLevel.py index 94680ab4..680e2146 100644 --- a/hiclass/LocalClassifierPerLevel.py +++ b/hiclass/LocalClassifierPerLevel.py @@ -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: @@ -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: diff --git a/setup.py b/setup.py index c5d7a4e2..1c362c1e 100644 --- a/setup.py +++ b/setup.py @@ -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",