Skip to content

Update environment to use Python 3.9 and adjust package versions for … #72

Update environment to use Python 3.9 and adjust package versions for …

Update environment to use Python 3.9 and adjust package versions for … #72

Workflow file for this run

name: CI
on:
push:
branches: [main, feature/*]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
swig \
cmake \
dssp \
build-essential \
curl \
git \
python3-dev \
gcc \
gfortran \
libblas-dev \
liblapack-dev \
libhdf5-dev \
libnetcdf-dev \
libfftw3-dev \
libopenmm-dev \
libboost-all-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libatlas-base-dev \
pkg-config
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
channels: conda-forge,defaults
channel-priority: strict
activate-environment: proteinflex-env
environment-file: environment-core.yml
auto-activate-base: false
auto-update-conda: true
- name: Install package
shell: bash -el {0}
run: |
# Verify conda environment
conda info
conda list
# Install dependencies first
python -m pip install --upgrade pip
# Install package without dependencies to avoid rebuilding
pip install --no-deps -e .
# Verify installations
python -c "import sys; print('Python path:'); [print(p) for p in sys.path]; import mdtraj; import prody; import openmm; print('Dependencies verified')"
- name: Run tests
shell: bash -el {0}
env:
PYTHONPATH: ${{ github.workspace }}
OPENMM_CPU_THREADS: 1
PROTEINFLEX_TEST_MODE: 1
PYTHONWARNINGS: ignore::DeprecationWarning
TRANSFORMERS_OFFLINE: 1
CUDA_VISIBLE_DEVICES: ""
run: |
pytest tests/ -v --cov=proteinflex --cov-report=xml --import-mode=importlib
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
- name: Check code style
shell: bash -el {0}
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
build:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
channels: conda-forge,defaults
channel-priority: strict
activate-environment: proteinflex-env
environment-file: environment-core.yml
auto-activate-base: false
auto-update-conda: true
- name: Build package
shell: bash -el {0}
run: |
pip install build wheel
python -m build
python setup.py bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/