Skip to content

Fixed README conflict. #8

Fixed README conflict.

Fixed README conflict. #8

name: Style checks
on: push
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Fix code style with isort (import calls)
run: |
python -m pip install isort
isort . -l 120 --balanced --multi-line 3 --lines-between-types 1 --lines-after-imports 2 --trailing-comma
- name: Fix code style with black (line lengths)
run: |
pip install black
# The GitHub editor is 127 chars wide. See https://black.readthedocs.io/en/stable/installation_and_usage.html
black . --line-length 120 .
- name: Fix code style with docformatter (docstrings)
run: |
pip install docformatter
# See https://github.com/myint/docformatter
docformatter . --wrap-summaries 120 --wrap-descriptions 113 --blank --make-summary-multi-line --recursive
#- name: Detect remaining style errors with flake8
# run: |
# pip install flake8
# # The GitHub editor is 127 chars wide. See https://flake8.pycqa.org/en/latest/user/configuration.html
# flake8 . --exclude file --max-line-length=127 --max-complexity=10 --ignore E303,C901,E203,W503
#- name: Detect remaining style errors with Pylint (fail under)
# run: |
# pip install pylint
# # See http://pylint.pycqa.org/en/latest/index.html
# pylint . --max-line-length=127 --load-plugins=pylint.extensions.docparams --load-plugins=pylint.extensions.docstyle --variable-naming-style=any --argument-naming-style=any --reports=n --suggestion-mode=y --disable=E303 --disable=R0913 --disable=R0801 --disable=C0114 --disable=E203 --disable=E0401 --disable=W9006 --disable=C0330 --disable=R0914 --disable=R0912 --disable=R0915 --disable=W0102 --disable=W0511 --disable=C1801 --disable=C0111 --disable=R1705 --disable=R1720 --disable=C0301 --disable=C0415 --disable=C0103 --disable=C0302 --disable=R1716 --disable=W0632 --disable=E1136 --extension-pkg-whitelist=numpy --exit-zero --fail-under 9.80
#- name: Commit changes
# uses: EndBug/add-and-commit@v4
# with:
# message: "Commit style fixes"
# add: "*.py"
# cwd: "."
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}