From ded6758eb9ae885292bd9af0c3aad1472db9fe1b Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 15:22:09 +0200 Subject: [PATCH 01/29] avoid test build on draft PR --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa8191a37..514e9355e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,11 +7,12 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, ready_for_review] jobs: build: + if: github.event.pull_request.draft == false name: Build for (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} From 6885707609bc0406cae352d272379fbd975aab6c Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 15:24:07 +0200 Subject: [PATCH 02/29] coveralls without the if --- .github/workflows/coveralls.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 92a744c4e..debc42d4b 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -5,7 +5,7 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, ready_for_review] jobs: build: @@ -26,6 +26,6 @@ jobs: - name: Coveralls env: GITHUB_TOKEN: ${{ secrets.github_token }} - COVERALLS_FLAG_NAME: python-${{ matrix.version }} + COVERALLS_FLAG_NAME: python-${{ matrix.os }} run: | coveralls --service=github \ No newline at end of file From 57df351da3bc12a48a6e6737ffc8ab573845d14a Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 15:25:25 +0200 Subject: [PATCH 03/29] skip all tests on draft PR --- .github/workflows/coveralls.yml | 1 + .github/workflows/fair-software.yml | 3 ++- .github/workflows/linting.yml | 3 ++- .github/workflows/markdown-link-check.yml | 5 ++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index debc42d4b..ace9b27e5 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -9,6 +9,7 @@ on: jobs: build: + if: github.event.pull_request.draft == false name: Coveralls runs-on: ${{ matrix.os }} diff --git a/.github/workflows/fair-software.yml b/.github/workflows/fair-software.yml index 9b5d23bfe..67ba0eea7 100644 --- a/.github/workflows/fair-software.yml +++ b/.github/workflows/fair-software.yml @@ -5,10 +5,11 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, ready_for_review] jobs: verify: + if: github.event.pull_request.draft == false name: "fair-software" runs-on: ubuntu-latest steps: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d0bb3112d..5c2f085ae 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,10 +5,11 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, ready_for_review] jobs: build: + if: github.event.pull_request.draft == false name: Linting build runs-on: ${{ matrix.os }} diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index e63c86b3b..8e35e12cc 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -5,12 +5,11 @@ on: branches: - main pull_request: - branches: - - main + types: [opened, synchronize, reopened, ready_for_review] jobs: - markdown-link-check: + if: github.event.pull_request.draft == false name: Check markdown links runs-on: ubuntu-latest steps: From b04236eda8491c667960cdb02b9319807057ab2c Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 15:58:32 +0200 Subject: [PATCH 04/29] limit actions based on path/filetype --- .github/workflows/build.yml | 21 +++++++++++++++++---- .github/workflows/coveralls.yml | 18 +++++++++++++++++- .github/workflows/linting.yml | 18 +++++++++++++++++- .github/workflows/markdown-link-check.yml | 8 ++++++++ 4 files changed, 59 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 514e9355e..a881a2029 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,27 @@ name: build on: - # Trigger analysis when pushing in main or pull requests, and when creating - # a pull request. push: + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/build.yml' branches: - main pull_request: - types: [opened, synchronize, reopened, ready_for_review] - + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/build.yml' jobs: build: diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index ace9b27e5..e1648856f 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -2,10 +2,26 @@ name: coveralls on: push: + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/linting.yml' branches: - - main + - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/linting.yml' jobs: build: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 5c2f085ae..6005cdaef 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -2,10 +2,26 @@ name: linting on: push: + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/linting.yml' branches: - - main + - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - '**.md' + - '**.rst' + - '**.ipynb' + paths: + - 'deeprankcore/**' + - 'tests/**' + - '.github/workflows/linting.yml' jobs: build: diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 8e35e12cc..b7c8162f2 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -4,8 +4,16 @@ on: push: branches: - main + paths: + - "**.md" + - "**.rst" + - ".github/workflows/markdown-link-check.yml" pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths: + - "**.md" + - "**.rst" + - ".github/workflows/markdown-link-check.yml" jobs: markdown-link-check: From acb005f6ad1b062fae9aa9a814a47f78e6465f21 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:07:56 +0200 Subject: [PATCH 05/29] include mlc config --- .github/workflows/markdown-link-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index b7c8162f2..c38176714 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -8,12 +8,14 @@ on: - "**.md" - "**.rst" - ".github/workflows/markdown-link-check.yml" + - ".github/workflows/.mlc-config.json" pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: - "**.md" - "**.rst" - ".github/workflows/markdown-link-check.yml" + - ".github/workflows/.mlc-config.json" jobs: markdown-link-check: From 84bef1b671c190fe0ac5b83161b54853fb8f91e3 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:29:32 +0200 Subject: [PATCH 06/29] include actions and setug as trigger for build --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a881a2029..b7b87b987 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ on: - 'deeprankcore/**' - 'tests/**' - '.github/workflows/build.yml' + - '.github/actions/install-python-and-package/action.yml' + - 'setup.cfg' branches: - main pull_request: @@ -22,6 +24,8 @@ on: - 'deeprankcore/**' - 'tests/**' - '.github/workflows/build.yml' + - '.github/actions/install-python-and-package/action.yml' + - 'setup.cfg' jobs: build: From a6e53cd55684db3dc7aa361555cf1179c0fdd8ed Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:31:48 +0200 Subject: [PATCH 07/29] replace single for double quotation marks --- .github/workflows/build.yml | 36 ++++++++++++++++----------------- .github/workflows/coveralls.yml | 26 ++++++++++++------------ .github/workflows/linting.yml | 26 ++++++++++++------------ 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7b87b987..f3d53e129 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,29 +3,29 @@ name: build on: push: paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/build.yml' - - '.github/actions/install-python-and-package/action.yml' - - 'setup.cfg' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/build.yml" + - ".github/actions/install-python-and-package/action.yml" + - "setup.cfg" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/build.yml' - - '.github/actions/install-python-and-package/action.yml' - - 'setup.cfg' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/build.yml" + - ".github/actions/install-python-and-package/action.yml" + - "setup.cfg" jobs: build: @@ -36,8 +36,8 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] - python-version: ['3.9', '3.10'] + os: ["ubuntu-latest"] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index e1648856f..6a7194319 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -3,25 +3,25 @@ name: coveralls on: push: paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/linting.yml' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/linting.yml' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" jobs: build: @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] + os: ["ubuntu-latest"] python-version: [3.9] steps: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6005cdaef..f76fde8c7 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -3,25 +3,25 @@ name: linting on: push: paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/linting.yml' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - - '**.md' - - '**.rst' - - '**.ipynb' + - "**.md" + - "**.rst" + - "**.ipynb" paths: - - 'deeprankcore/**' - - 'tests/**' - - '.github/workflows/linting.yml' + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" jobs: build: @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] + os: ["ubuntu-latest"] python-version: [3.9] steps: From 98ceb05e3b625dbe7639b09c0365bfe26b2f370e Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:33:42 +0200 Subject: [PATCH 08/29] try out change to test_trainer --- tests/test_trainer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_trainer.py b/tests/test_trainer.py index 4e1724fa0..284baad8d 100644 --- a/tests/test_trainer.py +++ b/tests/test_trainer.py @@ -630,6 +630,5 @@ def test_invalid_no_cuda_available(self): - if __name__ == "__main__": unittest.main() From a8523f348f62a7aa108fa133975577b89b958fb1 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:35:29 +0200 Subject: [PATCH 09/29] remove ignore paths --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3d53e129..579041435 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,6 @@ on: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" paths: - "deeprankcore/**" - "tests/**" From 5dc021bc13a9921aef73bbaefa6d8456998bfd9f Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:37:17 +0200 Subject: [PATCH 10/29] remove mlc config --- .github/workflows/.mlc-config.json | 13 ------------- .github/workflows/build.yml | 4 ++++ 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .github/workflows/.mlc-config.json diff --git a/.github/workflows/.mlc-config.json b/.github/workflows/.mlc-config.json deleted file mode 100644 index c18313658..000000000 --- a/.github/workflows/.mlc-config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "_comment": "Markdown Link Checker configuration, see https://github.com/gaurav-nelson/github-action-markdown-link-check and https://github.com/tcort/markdown-link-check", - "ignorePatterns": [ - { - "pattern": "^https://opensource.org/license/*", - "//comment": "for some reason this is flagged as a broken link even though it is not." - } - ], - "replacementPatterns": [ - ], - "retryOn429": true, - "timeout": "20s" -} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 579041435..f3d53e129 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,10 @@ on: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" paths: - "deeprankcore/**" - "tests/**" From e77a9ae61a198c50f91810f16b1eb8c4f1c7725a Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:45:24 +0200 Subject: [PATCH 11/29] try without paths --- .github/workflows/build.yml | 20 ++++++++++---------- .github/workflows/markdown-link-check.yml | 2 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3d53e129..14864068b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,16 +16,16 @@ on: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" - paths: - - "deeprankcore/**" - - "tests/**" - - ".github/workflows/build.yml" - - ".github/actions/install-python-and-package/action.yml" - - "setup.cfg" + # paths-ignore: + # - "**.md" + # - "**.rst" + # - "**.ipynb" + # paths: + # - "deeprankcore/**" + # - "tests/**" + # - ".github/workflows/build.yml" + # - ".github/actions/install-python-and-package/action.yml" + # - "setup.cfg" jobs: build: diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index c38176714..b7c8162f2 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -8,14 +8,12 @@ on: - "**.md" - "**.rst" - ".github/workflows/markdown-link-check.yml" - - ".github/workflows/.mlc-config.json" pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: - "**.md" - "**.rst" - ".github/workflows/markdown-link-check.yml" - - ".github/workflows/.mlc-config.json" jobs: markdown-link-check: From dce6d4cf4b264e11642539921a413df0c09b9047 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:46:41 +0200 Subject: [PATCH 12/29] spaces? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14864068b..813edca58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ on: branches: - main pull_request: - types: [opened, synchronize, reopened, ready_for_review] + types: [opened, synchronize, reopened, ready_for_review] # paths-ignore: # - "**.md" # - "**.rst" From 7b612483e05adf0692820666ca2dad3922556fd4 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:51:57 +0200 Subject: [PATCH 13/29] test --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 813edca58..a2920c177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,16 +2,16 @@ name: build on: push: - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" - paths: - - "deeprankcore/**" - - "tests/**" - - ".github/workflows/build.yml" - - ".github/actions/install-python-and-package/action.yml" - - "setup.cfg" + # paths-ignore: + # - "**.md" + # - "**.rst" + # - "**.ipynb" + # paths: + # - "deeprankcore/**" + # - "tests/**" + # - ".github/workflows/build.yml" + # - ".github/actions/install-python-and-package/action.yml" + # - "setup.cfg" branches: - main pull_request: @@ -36,8 +36,8 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest"] - python-version: ["3.9", "3.10"] + os: ['ubuntu-latest'] + python-version: ['3.9', '3.10'] steps: - uses: actions/checkout@v3 From 7b1607944e0b1b538dd19d093db6c3b2c8d1147e Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:56:18 +0200 Subject: [PATCH 14/29] readd paths on push --- .github/workflows/build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2920c177..5742482fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,16 +2,16 @@ name: build on: push: - # paths-ignore: - # - "**.md" - # - "**.rst" - # - "**.ipynb" - # paths: - # - "deeprankcore/**" - # - "tests/**" - # - ".github/workflows/build.yml" - # - ".github/actions/install-python-and-package/action.yml" - # - "setup.cfg" + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" + paths: + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/build.yml" + - ".github/actions/install-python-and-package/action.yml" + - "setup.cfg" branches: - main pull_request: From d4e1c3acdd589bf95305f39991acc75ca42fff76 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:57:12 +0200 Subject: [PATCH 15/29] dont specify folders --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5742482fa..80c814e39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,8 @@ on: - "**.rst" - "**.ipynb" paths: - - "deeprankcore/**" - - "tests/**" + # - "deeprankcore/**" + # - "tests/**" - ".github/workflows/build.yml" - ".github/actions/install-python-and-package/action.yml" - "setup.cfg" From 742d0b49f2d19077c95d7c616874cc9435c81f3e Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 16:57:49 +0200 Subject: [PATCH 16/29] dont ignore paths --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80c814e39..f4eceda36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,13 +2,13 @@ name: build on: push: - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" + # paths-ignore: + # - "**.md" + # - "**.rst" + # - "**.ipynb" paths: - # - "deeprankcore/**" - # - "tests/**" + - "deeprankcore/**" + - "tests/**" - ".github/workflows/build.yml" - ".github/actions/install-python-and-package/action.yml" - "setup.cfg" From a33cbdab17c025a1d51004b782f4e74b7ea6bb28 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 17:07:40 +0200 Subject: [PATCH 17/29] can only use paths XOR ignore-paths (not both) --- .github/workflows/build.yml | 36 +++++++++++++---------- .github/workflows/coveralls.yml | 24 ++++++++------- .github/workflows/linting.yml | 20 ++++++++----- .github/workflows/markdown-link-check.yml | 4 +++ 4 files changed, 51 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4eceda36..5a96fabfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,30 +2,36 @@ name: build on: push: - # paths-ignore: - # - "**.md" - # - "**.rst" - # - "**.ipynb" paths: + # specific folder locations - "deeprankcore/**" - "tests/**" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self - ".github/workflows/build.yml" + # setup - ".github/actions/install-python-and-package/action.yml" - "setup.cfg" branches: - main pull_request: - types: [opened, synchronize, reopened, ready_for_review] - # paths-ignore: - # - "**.md" - # - "**.rst" - # - "**.ipynb" - # paths: - # - "deeprankcore/**" - # - "tests/**" - # - ".github/workflows/build.yml" - # - ".github/actions/install-python-and-package/action.yml" - # - "setup.cfg" + types: [opened, synchronize, reopened, ready_for_review] + paths: + # specific folder locations + - "deeprankcore/**" + - "tests/**" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self + - ".github/workflows/build.yml" + # setup + - ".github/actions/install-python-and-package/action.yml" + - "setup.cfg" jobs: build: diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 6a7194319..2187227e1 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -2,26 +2,30 @@ name: coveralls on: push: - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" paths: + # specific folder locations - "deeprankcore/**" - "tests/**" - - ".github/workflows/linting.yml" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self + - ".github/workflows/coveralls.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" paths: + # specific folder locations - "deeprankcore/**" - "tests/**" - - ".github/workflows/linting.yml" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self + - ".github/workflows/coveralls.yml" jobs: build: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f76fde8c7..056f1fbbb 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -2,25 +2,29 @@ name: linting on: push: - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" paths: + # specific folder locations - "deeprankcore/**" - "tests/**" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self - ".github/workflows/linting.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "**.md" - - "**.rst" - - "**.ipynb" paths: + # specific folder locations - "deeprankcore/**" - "tests/**" + # exclude filetypes + - "!**.md" + - "!**.rst" + - "!**.ipynb" + # self - ".github/workflows/linting.yml" jobs: diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index b7c8162f2..4756d1a86 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -5,14 +5,18 @@ on: branches: - main paths: + # filetypes - "**.md" - "**.rst" + # self - ".github/workflows/markdown-link-check.yml" pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: + # filetypes - "**.md" - "**.rst" + # self - ".github/workflows/markdown-link-check.yml" jobs: From ab7a22ec9d9ed199bda6dae217cd2a59f86cb341 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 17:08:49 +0200 Subject: [PATCH 18/29] cache the CI environment --- .github/actions/install-python-and-package/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 40d72b9f3..8360f9d1f 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -41,7 +41,14 @@ runs: - run: which python shell: bash {0} + - uses: actions/cache@v3 + id: cache-python-env + with: + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} + - name: Upgrade pip and install dependencies + if: steps.cache-python-env.outputs.cache-hit != 'true' shell: bash {0} env: CMAKE_INSTALL_PREFIX: .local @@ -60,6 +67,7 @@ runs: pip install git+https://github.com/DeepRank/h5xplorer.git@master - name: Install the package + if: steps.cache-python-env.outputs.cache-hit != 'true' shell: bash {0} run: python3 -m pip install .[${{ inputs.extras-require }}] env: From aac60f369f66dec548df4809adc5419c34d19305 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 27 Jun 2023 17:17:59 +0200 Subject: [PATCH 19/29] try out whether caching worked --- tests/test_trainer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_trainer.py b/tests/test_trainer.py index 284baad8d..4e1724fa0 100644 --- a/tests/test_trainer.py +++ b/tests/test_trainer.py @@ -630,5 +630,6 @@ def test_invalid_no_cuda_available(self): + if __name__ == "__main__": unittest.main() From 15268fb1b72a4f38772bc461979051edeec8ecb0 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Thu, 29 Jun 2023 13:01:58 +0200 Subject: [PATCH 20/29] test single step env creation workflow --- .../actions/install-python-and-package/action.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 8360f9d1f..f3b776964 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -47,11 +47,12 @@ runs: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - - name: Upgrade pip and install dependencies + - name: Upgrade pip, install dependencies and package if: steps.cache-python-env.outputs.cache-hit != 'true' shell: bash {0} env: CMAKE_INSTALL_PREFIX: .local + CONDA_PREFIX: /usr/share/miniconda run: | python3 -m pip install --upgrade pip setuptools wheel # Install dssp @@ -65,11 +66,6 @@ runs: python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html # In the future, release h5xplorer on PyPI pip install git+https://github.com/DeepRank/h5xplorer.git@master - - - name: Install the package - if: steps.cache-python-env.outputs.cache-hit != 'true' - shell: bash {0} - run: python3 -m pip install .[${{ inputs.extras-require }}] - env: - CONDA_PREFIX: /usr/share/miniconda + # install the package + python3 -m pip install .[${{ inputs.extras-require }}] \ No newline at end of file From e670cc0b4513b2d4140a180f5622a4d7424a3a38 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Thu, 29 Jun 2023 13:04:36 +0200 Subject: [PATCH 21/29] minor change to env --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c1122cb83..86b933c8a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,7 +40,6 @@ install_requires = numpy >= 1.21.5 scipy >= 1.8.0 h5py >= 3.6.0 - h5xplorer networkx >= 2.6.3 matplotlib >= 3.5.1 pdb2sql >= 0.5.1 From 5a3e12ba48e5b93047f8dd371a328d50623ff832 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Thu, 29 Jun 2023 13:08:58 +0200 Subject: [PATCH 22/29] remove unused install --- .github/actions/install-python-and-package/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index f3b776964..1bd1534fa 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -64,8 +64,6 @@ runs: conda install pyg -c pyg # Install optional pyg dependencies python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html - # In the future, release h5xplorer on PyPI - pip install git+https://github.com/DeepRank/h5xplorer.git@master # install the package python3 -m pip install .[${{ inputs.extras-require }}] \ No newline at end of file From 2c6318fe7c9eba0db41133aa99c6ff104c3d26ef Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Thu, 29 Jun 2023 13:10:38 +0200 Subject: [PATCH 23/29] test without caching --- .../actions/install-python-and-package/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 1bd1534fa..419ce325e 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -41,14 +41,14 @@ runs: - run: which python shell: bash {0} - - uses: actions/cache@v3 - id: cache-python-env - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} + # - uses: actions/cache@v3 + # id: cache-python-env + # with: + # path: ${{ env.pythonLocation }} + # key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - name: Upgrade pip, install dependencies and package - if: steps.cache-python-env.outputs.cache-hit != 'true' + # if: steps.cache-python-env.outputs.cache-hit != 'true' shell: bash {0} env: CMAKE_INSTALL_PREFIX: .local From 6d853462bcbfb9de2bf8d722576ab728158cbd71 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 11:35:26 +0200 Subject: [PATCH 24/29] apt install in separate step --- .github/actions/install-python-and-package/action.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 419ce325e..ce4243e34 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -55,8 +55,6 @@ runs: CONDA_PREFIX: /usr/share/miniconda run: | python3 -m pip install --upgrade pip setuptools wheel - # Install dssp - sudo apt-get install -y dssp # Only way to install msms is through conda conda install -c bioconda msms # Safest way to install PyTorch and PyTorch Geometric is through conda @@ -66,4 +64,11 @@ runs: python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html # install the package python3 -m pip install .[${{ inputs.extras-require }}] - \ No newline at end of file + + # apt installs aren't cached, so needs to be separate + steps: + - name: Install dssp (via apt) + shell: bash {0} + run: | + # Install dssp + sudo apt-get install -y dssp From 7c07f857f199f808b729f13010158bce459c9f9a Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 12:02:36 +0200 Subject: [PATCH 25/29] remove steps keyqord --- .github/actions/install-python-and-package/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index ce4243e34..97d767450 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -66,7 +66,6 @@ runs: python3 -m pip install .[${{ inputs.extras-require }}] # apt installs aren't cached, so needs to be separate - steps: - name: Install dssp (via apt) shell: bash {0} run: | From 0ab682aeb96811332e9258fab8d8a99476daca83 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 12:19:54 +0200 Subject: [PATCH 26/29] install non-pip stuff before --- .../install-python-and-package/action.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 97d767450..e9f22469f 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -41,6 +41,15 @@ runs: - run: which python shell: bash {0} + - name: Install non pip items + shell: bash {0} + run: | + # Safest way to install PyTorch and PyTorch Geometric is through conda + conda install pytorch==2.0.0 torchvision=0.15.0 torchaudio=2.0.0 cpuonly -c pytorch + conda install pyg -c pyg + # Install dssp + sudo apt-get install -y dssp + # - uses: actions/cache@v3 # id: cache-python-env # with: @@ -57,17 +66,7 @@ runs: python3 -m pip install --upgrade pip setuptools wheel # Only way to install msms is through conda conda install -c bioconda msms - # Safest way to install PyTorch and PyTorch Geometric is through conda - conda install pytorch==2.0.0 torchvision=0.15.0 torchaudio=2.0.0 cpuonly -c pytorch - conda install pyg -c pyg # Install optional pyg dependencies python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html # install the package python3 -m pip install .[${{ inputs.extras-require }}] - - # apt installs aren't cached, so needs to be separate - - name: Install dssp (via apt) - shell: bash {0} - run: | - # Install dssp - sudo apt-get install -y dssp From 5c96f9c80ad2e386ce8cd0b62d8b999dc8eaf248 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 12:33:48 +0200 Subject: [PATCH 27/29] replace h5explorer --- .github/actions/install-python-and-package/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index e9f22469f..fcdb56cd8 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -70,3 +70,5 @@ runs: python3 -m pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-$(python3 -c "import torch; print(torch.__version__)")+cpu.html # install the package python3 -m pip install .[${{ inputs.extras-require }}] + # In the future, release h5xplorer on PyPI + pip install git+https://github.com/DeepRank/h5xplorer.git@master From 920d119577d22936b3e6169cd3c07895107c1c19 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 12:35:07 +0200 Subject: [PATCH 28/29] reactivate cacheing --- .../actions/install-python-and-package/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index fcdb56cd8..dbd865ac3 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -50,14 +50,14 @@ runs: # Install dssp sudo apt-get install -y dssp - # - uses: actions/cache@v3 - # id: cache-python-env - # with: - # path: ${{ env.pythonLocation }} - # key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} + - uses: actions/cache@v3 + id: cache-python-env + with: + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - name: Upgrade pip, install dependencies and package - # if: steps.cache-python-env.outputs.cache-hit != 'true' + if: steps.cache-python-env.outputs.cache-hit != 'true' shell: bash {0} env: CMAKE_INSTALL_PREFIX: .local From cfddafecdcaedd1e7c6fb3ed954472fe493fed58 Mon Sep 17 00:00:00 2001 From: Dani Bodor Date: Tue, 4 Jul 2023 12:40:39 +0200 Subject: [PATCH 29/29] Revert "can only use paths XOR ignore-paths (not both)" This reverts commit a33cbdab17c025a1d51004b782f4e74b7ea6bb28. --- .github/workflows/build.yml | 36 ++++++++++------------- .github/workflows/coveralls.yml | 24 +++++++-------- .github/workflows/linting.yml | 20 +++++-------- .github/workflows/markdown-link-check.yml | 4 --- 4 files changed, 33 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a96fabfd..f4eceda36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,36 +2,30 @@ name: build on: push: + # paths-ignore: + # - "**.md" + # - "**.rst" + # - "**.ipynb" paths: - # specific folder locations - "deeprankcore/**" - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - ".github/workflows/build.yml" - # setup - ".github/actions/install-python-and-package/action.yml" - "setup.cfg" branches: - main pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - # specific folder locations - - "deeprankcore/**" - - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - - ".github/workflows/build.yml" - # setup - - ".github/actions/install-python-and-package/action.yml" - - "setup.cfg" + types: [opened, synchronize, reopened, ready_for_review] + # paths-ignore: + # - "**.md" + # - "**.rst" + # - "**.ipynb" + # paths: + # - "deeprankcore/**" + # - "tests/**" + # - ".github/workflows/build.yml" + # - ".github/actions/install-python-and-package/action.yml" + # - "setup.cfg" jobs: build: diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 2187227e1..6a7194319 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -2,30 +2,26 @@ name: coveralls on: push: + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" paths: - # specific folder locations - "deeprankcore/**" - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - - ".github/workflows/coveralls.yml" + - ".github/workflows/linting.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" paths: - # specific folder locations - "deeprankcore/**" - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - - ".github/workflows/coveralls.yml" + - ".github/workflows/linting.yml" jobs: build: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 056f1fbbb..f76fde8c7 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -2,29 +2,25 @@ name: linting on: push: + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" paths: - # specific folder locations - "deeprankcore/**" - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - ".github/workflows/linting.yml" branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" paths: - # specific folder locations - "deeprankcore/**" - "tests/**" - # exclude filetypes - - "!**.md" - - "!**.rst" - - "!**.ipynb" - # self - ".github/workflows/linting.yml" jobs: diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 4756d1a86..b7c8162f2 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -5,18 +5,14 @@ on: branches: - main paths: - # filetypes - "**.md" - "**.rst" - # self - ".github/workflows/markdown-link-check.yml" pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: - # filetypes - "**.md" - "**.rst" - # self - ".github/workflows/markdown-link-check.yml" jobs: