Skip to content

Commit

Permalink
adjust python lint paths and fix pre-commit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aclegg3 committed Nov 22, 2024
1 parent 57a5b38 commit fb00e5d
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/install_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,28 @@ jobs:
python-version: '3.9.16'
- name: setup
run: |-
pip install -U pip
pip install -U --prefer-binary \
black==23.1.0 \
flake8 \
flake8-bugbear==22.6.22 \
flake8-builtins \
flake8-comprehensions \
flake8-return \
flake8-simplify \
hypothesis==6.29.3 \
isort==5.12.0 \
mypy \
numpy==1.26.4 \
pytest \
sphinx \
tqdm
pip install --prefer-binary -r requirements.txt torch --progress-bar off
pip install black==23.1.0 --progress-bar off
pip install "isort[pyproject]" numpy --progress-bar off
pip install mypy==0.991 types-mock types-Pillow types-tqdm types-PyYAML --progress-bar off
pip install -r habitat-lab/requirements.txt --progress-bar off
- name: run black
run: |-
black --version
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --diff
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --check
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' habitat-lab/. habitat-baselines/. examples/. test/. --diff
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' habitat-lab/. habitat-baselines/. examples/. test/. --check
- name: run isort
run: |-
isort --version
isort src_python/habitat_sim/. examples/. tests/. setup.py --diff
isort src_python/habitat_sim/. examples/. tests/. setup.py --check-only
isort habitat-lab/. habitat-baselines/. examples/. test/. --diff
isort habitat-lab/. habitat-baselines/. examples/. test/. --check-only
- name: run flake8
run: |-
flake8 --version
flake8 src_python/habitat_sim/. examples/. tests/. setup.py
- name: run mypy
run: mypy
run: |-
mypy --version
mypy --exclude="^docs/|setup.py$"
install_and_test_lab_ubuntu:
runs-on: 4-core-ubuntu-gpu-t4
Expand Down Expand Up @@ -235,4 +224,5 @@ jobs:
python -c 'import habitat_baselines; print("habitat_baselines version:", habitat_baselines.__version__)'
#NOTE: use the below to debug with ssh: simply move this "job" just before the crashing job to intercept the workflow
#- name: Debugging with tmate
# uses: mxschmitt/[email protected]
# uses: mxschmitt/[email protected]

0 comments on commit fb00e5d

Please sign in to comment.