Replace AbstractDiagnostic with Diagnostic as the single diagnostic contract
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start by comparing the AbstractDiagnostic Protocol with the concrete Diagnostic class in climate_ref_core/diagnostics.py (the protocol is near line 492), then check how DiagnosticProvider.register in providers.py (around line 173) type-checks its argument. Search the repo for remaining AbstractDiagnostic references and retype them to Diagnostic. The issue leaves open whether to delete the protocol or keep it as a deprecated alias for one release, so confirm that choice with maintainers first. Done means the references are updated and the test suite and type checks pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
AbstractDiagnostic (climate_ref_core/diagnostics.py:492) is a @runtime_checkable Protocol, but isn't really used. DiagnosticProvider.register requires an instance of the concrete Diagnostic class (providers.py:173), so nothing can satisfy AbstractDiagnostic without subclassing Diagnostic anyway.
The two have also drifted. Diagnostic defines version, files and reconstruction_inputs with defaults, and AbstractDiagnostic lists none of them, so code typed against the protocol cannot rely on them.
We should:
- Make
Diagnosticthe single documented contract for new diagnostics. - Remove
AbstractDiagnostic, or keep it as a deprecated alias ofDiagnosticfor one release. - Retype internal uses of
AbstractDiagnostictoDiagnostic.
New attributes then go on Diagnostic with a default, which keeps existing diagnostics working, as DiagnosticProvider already does with its hooks. Using an base class makes it easier avoid making breaking changes from a new attribute
- Lenguaje dominante
- Python
- Estrellas
- 27
- Forks
- 14
- Merge medio
- 10 h 41 min
- PR fusionados (30 d)
- 68
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Climate-REF/climate-ref
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Climate-REF/climate-ref#701 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Climate-REF/climate-ref#442 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Climate-REF/climate-ref#1040 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Climate-REF/climate-ref#996 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Climate-REF/climate-ref#991 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Climate-REF/climate-ref
Issues similares
-
community enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Hochfrequenz/sapgui.mcp#1039 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
didi/helixharness#18 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
API /search : typer la réponseAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dataforgoodfr/democracy-watch#46 · 1 reacción ·