Skip to content

update: volcano_plot improved significance coloring and top_label d… #122

update: volcano_plot improved significance coloring and top_label d…

update: volcano_plot improved significance coloring and top_label d… #122

# python linting - pylint and flake8
# pytest
name: Python application using pip
on:
push:
branches: [ "main", "dev*" ]
pull_request:
branches: [ "main", "dev*" ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11" ]
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
pip install pylint flake8 pytest
if [ -f "requirements/requirements_ci-cd.txt" ]; then
pip install -r requirements/requirements_ci-cd.txt
fi
- name: Install package
run: |
pip install -e .
- name: Collect Python files
id: pyfiles
run: |
EXCLUDE_DIRS=(
"^docs/"
)
PATTERN=$(IFS="|"; echo "${EXCLUDE_DIRS[*]}")
PY_FILES=$(git ls-files "*.py" \
| grep -vE "$PATTERN")
echo "PY_FILES<<EOF" >> "$GITHUB_ENV"
echo "$PY_FILES" >> "$GITHUB_ENV"
echo "EOF" >> "$GITHUB_ENV"
- name: Strict lint with flake8
run: |
# Syntax errors / undefined names
flake8 $PY_FILES \
--statistics \
--count \
--show-source \
--select=E9,F63,F82
# On clean files (manually increment)
flake8 \
proteopy/ann/proteins.py \
proteopy/datasets/williams_2018.py \
proteopy/datasets/karayel_2020.py \
proteopy/download/williams_2018.py \
proteopy/download/karayel_2020.py \
proteopy/pl/sequence.py \
proteopy/pp/quantification.py \
proteopy/pp/imputation.py \
proteopy/read/long.py \
proteopy/get/proteoforms.py \
proteopy/utils/anndata.py \
proteopy/utils/stat_tests.py \
tests/__init__.py \
tests/pp/test_quantification.py \
tests/read/__init__.py \
tests/tl/__init__.py \
tests/utils/__init__.py \
tests/utils/test_anndata.py \
tests/utils/test_parsers.py \
--statistics \
--count \
--show-source \
--max-complexity=10 \
--max-line-length=127
- name: Optional flake8 stats
run: |
# optional linting stats
flake8 $PY_FILES \
--exit-zero \
--statistics \
--count \
--show-source \
--max-complexity=10 \
--max-line-length=127
- name: Lint with pylint
run: |
pylint $PY_FILES --disable=all --enable=E,F
- name: Test with pytest
run: |
pytest -v -s tests/