From 9a0778e688d0e378a568032fcaaaa06ed57bcb37 Mon Sep 17 00:00:00 2001 From: Joao Andre Date: Mon, 18 Dec 2023 21:28:12 -0300 Subject: [PATCH] chore: enable mypy checks | add check for taipy templates changes --- .github/workflows/overall-tests.yml | 2 +- .github/workflows/packaging.yml | 4 ++-- .github/workflows/partial-tests.yml | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/overall-tests.yml b/.github/workflows/overall-tests.yml index df4365c76d..266d36ff2c 100644 --- a/.github/workflows/overall-tests.yml +++ b/.github/workflows/overall-tests.yml @@ -25,7 +25,7 @@ jobs: run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python - name: Install Dependencies - run: pipenv install --dev --python=${{ inputs.python-version }} + run: pipenv install --dev --python=${{ matrix.python-version }} - name: Setup LibMagic (MacOS) if: matrix.os == 'macos-latest' diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 903d8b5966..e66c63bf49 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -23,8 +23,8 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-versions }} diff --git a/.github/workflows/partial-tests.yml b/.github/workflows/partial-tests.yml index 7470a12b8d..90ca86de57 100644 --- a/.github/workflows/partial-tests.yml +++ b/.github/workflows/partial-tests.yml @@ -19,7 +19,7 @@ jobs: use-mypy: false extra-black-options: "--line-length=120 --diff" extra-pycodestyle-options: "--max-line-length=120 --exclude=tests/gui --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E203" - extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (taipy/templates/|generate_pyi.py) --follow-imports skip" + extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (taipy/templates/|generate_pyi.py|tools) --follow-imports skip" extra-isort-options: "--line-length=120 --force-grid-wrap=10 --multi-line=VERTICAL_HANGING_INDENT --trailing-comma" tests: needs: linter @@ -51,6 +51,8 @@ jobs: - 'taipy/logger/**' rest: - 'taipy/rest/**' + templates: + - 'taipy/templates/**' - uses: actions/setup-python@v5 with: @@ -104,3 +106,7 @@ jobs: - name: Pytest Rest if: steps.changes.outputs.rest == 'true' run: pipenv run pytest tests/rest + + - name: Pytest Rest + if: steps.changes.outputs.templates == 'true' + run: pipenv run pytest tests/templates