Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fewer actions #454

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ded6758
avoid test build on draft PR
DaniBodor Jun 27, 2023
6885707
coveralls without the if
DaniBodor Jun 27, 2023
57df351
skip all tests on draft PR
DaniBodor Jun 27, 2023
b04236e
limit actions based on path/filetype
DaniBodor Jun 27, 2023
acb005f
include mlc config
DaniBodor Jun 27, 2023
84bef1b
include actions and setug as trigger for build
DaniBodor Jun 27, 2023
a6e53cd
replace single for double quotation marks
DaniBodor Jun 27, 2023
98ceb05
try out change to test_trainer
DaniBodor Jun 27, 2023
a8523f3
remove ignore paths
DaniBodor Jun 27, 2023
5dc021b
remove mlc config
DaniBodor Jun 27, 2023
e77a9ae
try without paths
DaniBodor Jun 27, 2023
dce6d4c
spaces?
DaniBodor Jun 27, 2023
7b61248
test
DaniBodor Jun 27, 2023
7b16079
readd paths on push
DaniBodor Jun 27, 2023
d4e1c3a
dont specify folders
DaniBodor Jun 27, 2023
742d0b4
dont ignore paths
DaniBodor Jun 27, 2023
a33cbda
can only use paths XOR ignore-paths (not both)
DaniBodor Jun 27, 2023
ab7a22e
cache the CI environment
DaniBodor Jun 27, 2023
aac60f3
try out whether caching worked
DaniBodor Jun 27, 2023
15268fb
test single step env creation workflow
DaniBodor Jun 29, 2023
e670cc0
minor change to env
DaniBodor Jun 29, 2023
5a3e12b
remove unused install
DaniBodor Jun 29, 2023
2c6318f
test without caching
DaniBodor Jun 29, 2023
6d85346
apt install in separate step
DaniBodor Jul 4, 2023
7c07f85
remove steps keyqord
DaniBodor Jul 4, 2023
0ab682a
install non-pip stuff before
DaniBodor Jul 4, 2023
5c96f9c
replace h5explorer
DaniBodor Jul 4, 2023
920d119
reactivate cacheing
DaniBodor Jul 4, 2023
cfddafe
Revert "can only use paths XOR ignore-paths (not both)"
DaniBodor Jul 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions .github/actions/install-python-and-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

13 changes: 0 additions & 13 deletions .github/workflows/.mlc-config.json

This file was deleted.

26 changes: 22 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 }}

Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
3 changes: 2 additions & 1 deletion .github/workflows/fair-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading