Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run python snippets as part of PR ci #6343

Open
Wumpf opened this issue May 15, 2024 · 0 comments
Open

Run python snippets as part of PR ci #6343

Wumpf opened this issue May 15, 2024 · 0 comments
Labels
enhancement New feature or request 🚢 CI

Comments

@Wumpf
Copy link
Member

Wumpf commented May 15, 2024

We run all python snippts on our main ci as part of the snippet comparison tests (and yes we even run those for which there's nothing much to compare).
The problem with this is however, that due to uncompiled & weakly typed nature of Python we easily run into issues where code isn't adequately checked (even considering that we run pixi run py-lint which executes mypy checks).
A recent example of such a failure was #6342 which would have been caught by running snippets. Note that this can't be caught by mypy since mypy lacks the information needed for knowing the named parameter actually exists.

Snippets have a much better code coverage than our tests and I believe it's unrealistic that pixi run py-test will cover cases like the cited one (ideally it would, but it implies that pretty much everything is covered not only by snippets but also by tests).

The expectation is that running snippets on python only should be fairly fast (especially compared to rust & cpp snippets which take quite a while to compile collectively)

@Wumpf Wumpf added enhancement New feature or request 🚢 CI labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🚢 CI
Projects
None yet
Development

No branches or pull requests

1 participant