Skip to content

Commit

Permalink
Merge pull request #257 from biolab/reusable-workflows
Browse files Browse the repository at this point in the history
CI - Reusable workflows
  • Loading branch information
PrimozGodec committed Feb 8, 2023
2 parents 6b5c959 + e18430c commit f665581
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 107 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
uses: biolab/orange-ci-cd/.github/workflows/rebase-addons.yml@master
secrets: inherit
90 changes: 2 additions & 88 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,91 +9,5 @@ on:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 15
name: ${{ matrix.name }} (${{ matrix.os }}, ${{ matrix.python-version }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2016]
python-version: [3.7, 3.8]
tox_env: [py-orange-released]
experimental: [false]
name: [Released]
include:
- os: windows-2019
python-version: 3.8
tox_env: py-orange-released
experimental: true
name: Windows10
- os: macos-11.0
python-version: 3.8
tox_env: py-orange-released
experimental: true
name: Big Sur

- os: windows-2016
python-version: 3.7
tox_env: py-orange-oldest
experimental: false
name: Oldest
- os: macos-10.15
python-version: 3.7
tox_env: py-orange-oldest
name: Oldest
experimental: false
- os: ubuntu-18.04
python-version: 3.7
tox_env: py-orange-oldest
name: Oldest
experimental: false

- os: windows-2016
python-version: 3.8
tox_env: py-orange-latest
experimental: false
name: Latest
- os: macos-10.15
python-version: 3.8
tox_env: py-orange-latest
experimental: false
name: Latest
- os: ubuntu-18.04
python-version: 3.8
tox_env: py-orange-latest
experimental: false
name: Latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-pip-version
- name: Set environment variable
# this step sets QT_QPA_PLATFORM env which is required on Ubuntu and
# it is skipped on Windows - QLabel font issues
if: runner.os != 'Windows'
run: |
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
- name: Test with Tox
run: |
tox -e ${{ matrix.tox_env }}
- name: Upload code coverage
if: |
matrix.python-version == '3.8' &&
matrix.os == 'ubuntu-18.04' &&
matrix.tox_env == 'py-orange-released'
run: |
pip install codecov
codecov
test:
uses: biolab/orange-ci-cd/.github/workflows/test-addons.yml@master
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/owquickselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def commit(self):
annotated = matching = unmatched = None
self.n_matched = None
else:
column = self.data.get_column_view(self.variable)[0]
column = self.data.get_column(self.variable)
valind = self.variable.values.index(self.value)
mask = column == valind
annotated = create_annotated_table(self.data, np.flatnonzero(mask))
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/owsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __call__(self, data):
@staticmethod
def get_string_values(data, var):
# turn discrete to string variable
column = data.get_column_view(var)[0]
column = data.get_column(var)
if var.is_discrete:
return [var.str_val(x) for x in column]
return column
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/tests/test_owsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_split_nonexisting(self):
"""Test splitting when delimiter doesn't exist"""
self.widget.delimiter = "|"
self.send_signal(self.widget.Inputs.data, self.data)
new_cols = set(self.data.get_column_view("Country")[0])
new_cols = set(self.data.get_column("Country"))
self.assertFalse(any(self.widget.delimiter in v for v in new_cols))
self.assertEqual(len(self.get_output(
self.widget.Outputs.data).domain.attributes),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def include_documentation(local_dir, install_dir):
"orangecontrib.prototypes.widgets": ["icons/*.svg", "tests/*.tab"]
},
install_requires=[
'Orange3>=3.28',
'Orange3>=3.34',
'numpy',
'scipy',
'scikit-learn',
Expand Down
22 changes: 7 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{37,38}-orange-{oldest, latest, released}
orange-{oldest, latest, released}
skip_missing_interpreters = true
isolated_build = true

Expand All @@ -15,24 +15,16 @@ passenv = *
changedir =
{envsitepackagesdir}
setenv =
# Raise deprecations as errors in our tests
ORANGE_DEPRECATIONS_ERROR=y
# Need this otherwise unittest installs a warning filter that overrides
# our desire to have OrangeDeprecationWarnings raised
PYTHONWARNINGS=module
# set coverage output and project config
COVERAGE_FILE = {toxinidir}/.coverage
COVERAGE_RCFILE = {toxinidir}/.coveragerc
deps =
pyqt5==5.12.*
pyqtwebengine==5.12.*
oldest: scikit-learn~=0.22.0
oldest: orange3==3.25.0
# Use newer canvas-core and widget-base to avoid segfaults on windows
oldest: orange-canvas-core==0.1.9 ; sys_platform != 'win32'
oldest: orange-canvas-core==0.1.15 ; sys_platform == 'win32'
oldest: orange-widget-base==4.5.0 ; sys_platform != 'win32'
oldest: orange-widget-base==4.9.0 ; sys_platform == 'win32'
{env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*}
{env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*}
oldest: orange3==3.34.0
oldest: orange-canvas-core==0.1.28
oldest: orange-widget-base==4.19.0
oldest: scikit-learn==1.0.1
latest: https://github.com/biolab/orange3/archive/refs/heads/master.zip#egg=orange3
latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core
latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base
Expand Down

0 comments on commit f665581

Please sign in to comment.