diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 71404af..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish to PyPI - -on: - release: - types: [published] - -jobs: - build-and-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - pip install twine - - - name: Build package - run: python -m build - - - name: Check distribution - run: twine check dist/* - - - name: Publish to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: twine upload dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f226213 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,12 @@ +name: Release +on: + release: + types: [published] + workflow_dispatch: + +jobs: + release: + uses: biolab/orange-ci-cd/.github/workflows/release.yml@master + with: + pure-python: true + secrets: inherit diff --git a/orangecontrib/fairness/widgets/tests/test_owequalizedodds.py b/orangecontrib/fairness/widgets/tests/test_owequalizedodds.py index 644a72c..3fe1ced 100644 --- a/orangecontrib/fairness/widgets/tests/test_owequalizedodds.py +++ b/orangecontrib/fairness/widgets/tests/test_owequalizedodds.py @@ -49,7 +49,6 @@ def test_model_output(self): self.assertIsNotNone(model) - def test_compatibility_with_predictions(self): """Check that the widget works with the predictions widget""" test_data = Table(self.data_path_adult) @@ -64,9 +63,14 @@ def test_compatibility_with_predictions(self): self.send_signal( self.predictions.Inputs.predictors, model, widget=self.predictions ) - predictions = self.get_output( - self.predictions.Outputs.predictions, widget=self.predictions - ) + if hasattr(self.predictions.Outputs, "predictions"): + # OWPredictions in Orange3<3.37 has attribute named predictions + attr = self.predictions.Outputs.predictions + else: + # in Orange3>=3.37 predictions is replaced with selected_predictions + attr = self.predictions.Outputs.selected_predictions + predictions = self.get_output(attr, widget=self.predictions) + results = self.get_output( self.predictions.Outputs.evaluation_results, widget=self.predictions ) diff --git a/setup.py b/setup.py index 602c13e..90e8271 100644 --- a/setup.py +++ b/setup.py @@ -59,9 +59,9 @@ def include_documentation(local_dir, install_dir): ), }, install_requires=[ + "numpy", "Orange3", - "aif360==0.5.0", - "numpy~=1.23.0" + "aif360>=0.6.0", ], extras_require={ "doc": [