diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 40d72b9f3..dbd865ac3 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -41,27 +41,34 @@ runs: - run: which python shell: bash {0} - - name: Upgrade pip and install dependencies + - 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: + 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' shell: bash {0} env: CMAKE_INSTALL_PREFIX: .local + 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 - 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 }}] # In the future, release h5xplorer on PyPI pip install git+https://github.com/DeepRank/h5xplorer.git@master - - - name: Install the package - shell: bash {0} - run: python3 -m pip install .[${{ inputs.extras-require }}] - env: - CONDA_PREFIX: /usr/share/miniconda - \ No newline at end of file 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 fa8191a37..f4eceda36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,17 +1,35 @@ 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" + - ".github/actions/install-python-and-package/action.yml" + - "setup.cfg" branches: - main pull_request: - types: [opened, synchronize, reopened] - + 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: + if: github.event.pull_request.draft == false name: Build for (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 92a744c4e..6a7194319 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -2,20 +2,37 @@ 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] + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" + paths: + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" jobs: build: + if: github.event.pull_request.draft == false name: Coveralls runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] + os: ["ubuntu-latest"] python-version: [3.9] steps: @@ -26,6 +43,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 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..f76fde8c7 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -2,20 +2,37 @@ 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] + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "**.md" + - "**.rst" + - "**.ipynb" + paths: + - "deeprankcore/**" + - "tests/**" + - ".github/workflows/linting.yml" jobs: build: + if: github.event.pull_request.draft == false name: Linting build runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] + os: ["ubuntu-latest"] python-version: [3.9] steps: diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index e63c86b3b..b7c8162f2 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -4,13 +4,20 @@ on: push: branches: - main + paths: + - "**.md" + - "**.rst" + - ".github/workflows/markdown-link-check.yml" pull_request: - branches: - - main + types: [opened, synchronize, reopened, ready_for_review] + paths: + - "**.md" + - "**.rst" + - ".github/workflows/markdown-link-check.yml" jobs: - markdown-link-check: + if: github.event.pull_request.draft == false name: Check markdown links runs-on: ubuntu-latest steps: 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