Skip to content

pytest fix

pytest fix #18

Workflow file for this run

name: conda build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
conda-build:
name: Conda Installation
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: setup/environment.yml
auto-activate-base: false
activate-environment: probest
channels: conda-forge,bioconda,defaults
- name: Install PROBEst in editable mode
shell: bash -l {0}
run: |
pip install -e .
- name: Lint with flake8
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pytest
pip-build:
name: Pip Installation
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install PROBEst in editable mode
run: |
pip install -e .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test package installation and imports
run: |
# Verify package can be imported
python -c "import PROBESt; print('PROBESt imported successfully')"
python -c "from PROBESt.args import arguments_parse; print('Args module imported successfully')"
python -c "from PROBESt.evolution import mutate_position; print('Evolution module imported successfully')"