Skip to content

Update AcquisitionConfig.py #33

Update AcquisitionConfig.py

Update AcquisitionConfig.py #33

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main", "develop", "ONE-PIX_dev" ]
pull_request:
branches: [ "main", "develop", "ONE-PIX_dev" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
# TODO fix dependencies installation with python 3.11
# python-version: '3.x'
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black pylint flake8 pytest coverage
sed -i 's/^picamera/#picamera/' ONE-PIX_soft/requirements.txt
python -m pip install -r ONE-PIX_soft/requirements.txt
- name: Check style with black
run: |
# TODO stop the build if a code style issue is found
python -m black --fast .
- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
python -m pylint --exit-zero HUB.py ONE-PIX_soft
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest
- name: Coverage with pytest
run: |
python -m coverage run -m pytest
python -m coverage report -m --fail-under=80