Use a test Connection implementation instead of mocking a real one
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start by reading the Connection abstract class and the Ankaios tests that currently patch ControlInterfaceConnection.connect or write_request; the issue does not name specific files. Review run_checks.py for how to run unit tests, coverage, and lints. Done means applicable tests use a TestConnection to simulate behavior, with checks passing.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
With the new Command Interface implementation, there is now an abstract class called Connection which is needed by Ankaios to communicate to the cluster. For testing the Ankaios class, the current way is to mock the connection methods. For example:
with patch(
"ankaios_sdk.ControlInterfaceConnection.connect"
) as mock_ci_connect:
...
# or
with patch(
"ankaios_sdk.ControlInterfaceConnection.write_request",
) as mock_write:
...
This makes the tests harder to understand and to properly test.
With the new Connection abstract class, a TestConnection class can be developed and used throughout the tests, with which the functionality can be properly simulated and tested.
Goals
Rewrite the Ankaios tests and any other where it applies with a TestConnection class, as described above.
Final result
Summary
To be filled when the final solution is sketched.
Tasks
- Assign yourself as
assignee; - Implement enhancement;
- Check and fix utests, coverage and lints;
- Create Pull Request and fix possible workflow failures;
- Add the
ready_for_reviewlabel.
- Lenguaje dominante
- Python
- Estrellas
- 9
- Forks
- 5
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni 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 eclipse-ankaios/ank-sdk-python
-
Update Python support to 3.14Abiertopython-version
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
eclipse-ankaios/ank-sdk-python#99 · 1 comentario ·
-
Document the release processAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Improve methods orderAbiertoenhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de eclipse-ankaios/ank-sdk-python
Issues similares
-
customer-reported question
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azure-sdk-for-python#49548 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
btclib-org/btclib-wallet#409 ·
Los mantenedores suelen responder en 1 día
-
Phase 2 PSA Capability & Career Profile
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fastmachinelearning/hls4ml#1582 ·
Los mantenedores suelen responder en 3 días
-
Sort modelsAbiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día