From a3b4d6ea2ef6813411315d9f0d467f4d846a86f6 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 16:38:09 +0200 Subject: [PATCH 01/13] Create yml draft Trying to run tests with github actions --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..08b28a28 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ['2.7', '3.6', '3.7', '3.8', 'pypy-2.7', 'pypy-3.6'] + exclude: + - os: macos-latest + python-version: '3.8' + - os: windows-latest + python-version: '3.6' + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: sudo apt-get install liblapack-dev + pip install --upgrade pip pytest + pip install wheel cython numpy scipy codecov pytest-cov scikit-learn + pytest test --cov + From bc8c7a8906dc2f6f53f82485532fac179acc8aa5 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 16:41:16 +0200 Subject: [PATCH 02/13] Update yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08b28a28..62494529 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Display Python version - run: sudo apt-get install liblapack-dev + run: | + sudo apt-get install liblapack-dev pip install --upgrade pip pytest pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pytest test --cov From 1ec62a23604d651065f380db81d6ff9c750d0e63 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 16:46:45 +0200 Subject: [PATCH 03/13] Update 2 --- .github/workflows/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62494529..2db9593d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] python-version: ['2.7', '3.6', '3.7', '3.8', 'pypy-2.7', 'pypy-3.6'] exclude: - os: macos-latest @@ -32,9 +32,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Display Python version - run: | - sudo apt-get install liblapack-dev - pip install --upgrade pip pytest - pip install wheel cython numpy scipy codecov pytest-cov scikit-learn - pytest test --cov + - run: sudo apt-get install liblapack-dev + - run: pip install --upgrade pip pytest + - run: pip install wheel cython numpy scipy codecov pytest-cov scikit-learn + - run: pytest test --cov From dac84145c129aecf6bfd3041f3351ae087af9163 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 16:49:09 +0200 Subject: [PATCH 04/13] Update 3 --- .github/workflows/main.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2db9593d..eca80c7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,11 +20,6 @@ jobs: matrix: os: [ubuntu-latest] python-version: ['2.7', '3.6', '3.7', '3.8', 'pypy-2.7', 'pypy-3.6'] - exclude: - - os: macos-latest - python-version: '3.8' - - os: windows-latest - python-version: '3.6' steps: - uses: actions/checkout@v2 - name: Set up Python @@ -32,8 +27,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Display Python version - - run: sudo apt-get install liblapack-dev - - run: pip install --upgrade pip pytest - - run: pip install wheel cython numpy scipy codecov pytest-cov scikit-learn - - run: pytest test --cov + run: | + sudo apt-get install liblapack-dev + pip install --upgrade pip pytest + pip install wheel cython numpy scipy codecov pytest-cov scikit-learn + pytest test --cov From faaf5d7b8fcc267de6bf3558ff2cf7c72b40cd79 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 16:51:28 +0200 Subject: [PATCH 05/13] YML: Only Python3 versions --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eca80c7a..094b9b6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['2.7', '3.6', '3.7', '3.8', 'pypy-2.7', 'pypy-3.6'] + python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6'] steps: - uses: actions/checkout@v2 - name: Set up Python From 0456111a0656d28f2a4a3ab3646ee9e7cee3f1c8 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 17:19:31 +0200 Subject: [PATCH 06/13] Add Codecov to CI --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 094b9b6a..a50c01b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6'] + python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] steps: - uses: actions/checkout@v2 - name: Set up Python @@ -32,4 +32,5 @@ jobs: pip install --upgrade pip pytest pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pytest test --cov - + - name: Codecov + uses: codecov/codecov-action@v2.1.0 From e6edd7557d8975320b0ef2cd6e776298c8165623 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 17:31:32 +0200 Subject: [PATCH 07/13] Mirroring actual yml from metric_learning repo --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a50c01b0..48e80a52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,18 +19,41 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy-3.6', 'pypy-3.7'] + python-version: ['3.6', '3.7', '3.8', '3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Display Python version + - name: Run Tests without skggm run: | sudo apt-get install liblapack-dev pip install --upgrade pip pytest pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pytest test --cov + - name: Run Tests with skggm + env: + SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 + run: | + sudo apt-get install liblapack-dev + pip install --upgrade pip pytest + pip install wheel cython numpy scipy codecov pytest-cov scikit-learn + pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} + pytest test --cov + - name: Run Tests with skggm + scikit-learn 0.20.3 + env: + SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 + run: | + sudo apt-get install liblapack-dev + pip install --upgrade pip pytest + pip install wheel cython numpy scipy codecov pytest-cov + pip install scikit-learn==0.20.3 + pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} + pytest test --cov + - name: Syntax checking with flake8 + run: | + pip install flake8 + flake8 --extend-ignore=E111,E114 --show-source; - name: Codecov uses: codecov/codecov-action@v2.1.0 From c3bdde2746278240e464f86daff1286d11b99699 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 17:36:24 +0200 Subject: [PATCH 08/13] Fix codecov --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48e80a52..aba6d810 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,7 @@ jobs: pip install --upgrade pip pytest pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pytest test --cov + bash <(curl -s https://codecov.io/bash) - name: Run Tests with skggm env: SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 @@ -41,6 +42,7 @@ jobs: pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov + bash <(curl -s https://codecov.io/bash) - name: Run Tests with skggm + scikit-learn 0.20.3 env: SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 @@ -51,9 +53,8 @@ jobs: pip install scikit-learn==0.20.3 pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov + bash <(curl -s https://codecov.io/bash) - name: Syntax checking with flake8 run: | pip install flake8 flake8 --extend-ignore=E111,E114 --show-source; - - name: Codecov - uses: codecov/codecov-action@v2.1.0 From 0a0c9e8c1394d3943d8d4592e89d3aa7cb785745 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 17:58:21 +0200 Subject: [PATCH 09/13] Fix old scikit learn --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aba6d810..b1ab62fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,9 +37,6 @@ jobs: env: SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 run: | - sudo apt-get install liblapack-dev - pip install --upgrade pip pytest - pip install wheel cython numpy scipy codecov pytest-cov scikit-learn pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov bash <(curl -s https://codecov.io/bash) @@ -47,11 +44,8 @@ jobs: env: SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 run: | - sudo apt-get install liblapack-dev - pip install --upgrade pip pytest - pip install wheel cython numpy scipy codecov pytest-cov + pip uninstall scikit-learn pip install scikit-learn==0.20.3 - pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov bash <(curl -s https://codecov.io/bash) - name: Syntax checking with flake8 From db1bde024a9ebb289ac6a38360ac7dccc05f9e2a Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 19:09:20 +0200 Subject: [PATCH 10/13] Update yml --- .github/workflows/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1ab62fa..a2e895e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,29 @@ on: workflow_dispatch: jobs: + compatibility: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['3.6', '3.7', '3.8', '3.9'] + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Run Tests with skggm + scikit-learn 0.20.3 + env: + SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 + run: | + sudo apt-get install liblapack-dev + pip install --upgrade pip pytest + pip install wheel cython numpy scipy codecov pytest-cov + pip install scikit-learn==0.20.3 + pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} + pytest test --cov + bash <(curl -s https://codecov.io/bash) build: runs-on: ${{ matrix.os }} strategy: From 8046281b10c6e3442930f861ea60096187dfdbd9 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 19:15:42 +0200 Subject: [PATCH 11/13] Remove 3.9 from compatibility --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2e895e5..ecaedcf2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.6', '3.7', '3.8'] steps: - uses: actions/checkout@v2 - name: Set up Python From 09fdd030e991396e521cb586aae309a3bfe51b8e Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Wed, 15 Sep 2021 19:42:24 +0200 Subject: [PATCH 12/13] Fixed issue with sklearn 0.20 --- .github/workflows/main.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ecaedcf2..175be4ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,14 +63,6 @@ jobs: pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov bash <(curl -s https://codecov.io/bash) - - name: Run Tests with skggm + scikit-learn 0.20.3 - env: - SKGGM_VERSION: a0ed406586c4364ea3297a658f415e13b5cbdaf8 - run: | - pip uninstall scikit-learn - pip install scikit-learn==0.20.3 - pytest test --cov - bash <(curl -s https://codecov.io/bash) - name: Syntax checking with flake8 run: | pip install flake8 From ab3dc5f810409e6516b873c3a3ebabc092308ed4 Mon Sep 17 00:00:00 2001 From: Maximiliano Vargas <43217761+mvargas33@users.noreply.github.com> Date: Thu, 16 Sep 2021 10:19:24 +0200 Subject: [PATCH 13/13] Delete comments, and unnecesary workflow_dispatch --- .github/workflows/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 175be4ae..46e5d2c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the workflow will run @@ -9,11 +7,10 @@ on: branches: [ master ] pull_request: branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - + jobs: + + # Checks compatibility with an old version of sklearn (0.20.3) compatibility: runs-on: ${{ matrix.os }} strategy: @@ -37,6 +34,8 @@ jobs: pip install git+https://github.com/skggm/skggm.git@${SKGGM_VERSION} pytest test --cov bash <(curl -s https://codecov.io/bash) + + # Run normal testing with the latests versions of all dependencies build: runs-on: ${{ matrix.os }} strategy: