Disable explicit mypy tests?

Aperta
#10,934 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, python
Ambito
ci-cd, testing

Direzione di ricerca

Inizia individuando i test espliciti di mypy introdotti in PR #10038 e i job di GitHub CI che li eseguono. Esamina i loro errori attuali, il tempo di esecuzione e la copertura del typing; il lavoro è terminato quando i test espliciti fragili sono disabilitati senza oscurare i controlli di typing rimanenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

CI
What is your issue?

The explicit mypy tests introduced in https://github.com/pydata/xarray/pull/10038 seem to be quite fragile, e.g., they are currently broken at head and I know have been broken at head previously at least once. In neither case was there a real regression.

I see at least three issues with them:

  1. They seem to be particularly prone to version skew issues where they fail on GitHub but pass locally due to slight differences in environments. I think the current failure is due to mis-matched NumPy versions. (This might be improved when we switch to pixi.)
  2. They are really slow. Testing ~40 specific errors takes ~9 minutes on a single GitHub CI worker, which is not a great use of CI resources and clearly not scalable. Currently we use two CI workers just to test typing for the pipe method!
  3. They are inherently very fragile, checking for exact messages printed by mypy. Pretty much any package update causes error messages to change, which means these tests break, whether or not there is a real underlying issue.
Lingua principale
Python
Stelle
4.2k
Fork
1.5k
Merge medio
2g 21h
PR unite (30g)
74

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pydata/xarray

Tutte le issue di pydata/xarray

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.