Skip to content

New single-cell modules (and archiving old one) #3184

New single-cell modules (and archiving old one)

New single-cell modules (and archiving old one) #3184

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test Python package
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
src: "proteobench"
version: "~=23.0"
lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
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 dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 flake8-bugbear flake8-comprehensions pytest
# Install the web extra so the webinterface (streamlit) tests run instead of being skipped.
python -m pip install .[web]
- name: Lint with flake8
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: Lint with flake8 plugins (bugbear, comprehensions)
run: |
# Non-blocking: report bugbear (B) and comprehensions (C4) issues as warnings
flake8 proteobench --count --exit-zero --select=B,C4 --max-line-length=120 --statistics
- name: Test with pytest
run: |
pytest
- name: ensure paramater documentation is up-to-date
run: |
cd docs
python parse_tables.py
if git diff -- parsing_overview.tsv | grep .; then
echo "Error: Parameters overview not updated, run in docs folder: python parse_tables.py"
exit 1
fi
- name: ensure module grid documentation is up-to-date
run: |
cd docs
python generate_module_grid.py
if git diff -- module_grid_generated.rst | grep .; then
echo "Error: Module grid not updated, run in docs folder: python generate_module_grid.py"
exit 1
fi
- name: check if parse settings TOMLs changed
id: toml_changed
run: |
if git diff --name-only origin/main...HEAD | grep -q 'io_parse_settings.*\.toml'; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: ensure input files documentation tables are up-to-date
if: steps.toml_changed.outputs.changed == 'true'
run: |
cd docs
python generate_input_tables.py
if git diff -- modules/dda/*.md modules/dia/*.md | grep .; then
echo "Error: Input files tables not updated, run: cd docs && python generate_input_tables.py"
exit 1
fi
- name: check contributing-institutes logo symlink
run: bash scripts/check_contributing_institutes_symlink.sh