Abmarl 0 pacman simplifications #518
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will lint the code. | |
name: Lint | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install flake8 | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
- name: Lint with flake8 | |
run: | | |
# Lint source directory | |
flake8 abmarl/ --count --max-line-length 100 --indent-size 4 --doctests \ | |
--per-file-ignores="__init__.py:F401 abmarl/sim/wrappers/communication_wrapper.py,\ | |
abmarl/sim/components/wrappers/observer_wrapper.py,abmarl/algs/monte_carlo.py:W504,\ | |
abmarl/scripts/scripts.py:F401" \ | |
--ignore="E129,E261,E701,E731,E226,W504" | |
# Lint examples directory | |
flake8 examples/ --count --max-line-length 100 --indent-size 4 --doctests \ | |
--per-file-ignores="examples/rllib_config_prototype.py:F401,E401" \ | |
--ignore="E261,E701,E731,E226,E402" | |
# Lint the tests directory | |
flake8 tests/ --count --max-line-length 100 --indent-size 4 --doctests \ | |
--per-file-ignores="tests/test_predator_prey.py:E128" \ | |
--ignore="E261,E701,E731,E226,E231,E202,E241,E203,E303,E201" | |
# Lint the docs directory | |
flake8 docs/ --exclude=docs/build/* --count --max-line-length 100 --indent-size 4 \ | |
--doctests |