Skip to content

Mypy check on non-isolated install#4216

Merged
schnellerhase merged 4 commits into
mainfrom
schnellerhase/mypy-non-venv
May 15, 2026
Merged

Mypy check on non-isolated install#4216
schnellerhase merged 4 commits into
mainfrom
schnellerhase/mypy-non-venv

Conversation

@schnellerhase
Copy link
Copy Markdown
Contributor

@schnellerhase schnellerhase commented May 15, 2026

Adds mypy check to run on full fledged (non-PETSc) install. This allows dependency lookups and runtime awareness which enriches coverage of the mypy invocation.

This was previously done in the BASIx CI already, which caught in multiple occasions more strict typing errors https://github.com/FEniCS/basix/blob/main/.github/workflows/dolfinx-tests.yml#L86.

This should be extended to also check the test/ and demo/ source trees (and alter to the PETSc aware runs), to follow in another PR as this hot-fixes the BASIx CI.

Ref #4059 (comment), accompanies FEniCS/basix#1004.

Comment thread .github/workflows/ccpp.yml Outdated
Co-authored-by: Paul T. Kühner <56360279+schnellerhase@users.noreply.github.com>
@schnellerhase schnellerhase changed the title Mypy check on full install Mypy check on non-isolated install May 15, 2026
@schnellerhase schnellerhase marked this pull request as ready for review May 15, 2026 10:18
- name: Run mypy
working-directory: python
run: |
pip install mypy types-cffi scipy-stubs
- name: Run mypy
working-directory: python
run: |
pip install mypy types-cffi scipy-stubs
Copy link
Copy Markdown
Member

@jorgensd jorgensd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this. Its a shame that we can't separate typing from a full-blown installation.

@schnellerhase
Copy link
Copy Markdown
Contributor Author

schnellerhase commented May 15, 2026

Agreed, it would maybe make sense to move these install dependant linting checks outside of the general CI into an independent job. But that's something for the CI redesign if at all.

@schnellerhase schnellerhase added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit b4cbd24 May 15, 2026
19 of 20 checks passed
@schnellerhase schnellerhase deleted the schnellerhase/mypy-non-venv branch May 15, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants