matplotlib / matplotlib/pytest-mpl
default savefig format
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 272
- Forks
- 53
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
In the process of penning #150, I noticed that when capturing the test image to an io.Bytes in-memory buffer:
That the format kwarg to savefig isn't used.
Would you be adverse to defaulting to format='png', particularly when writing to a buffer, as (from what I understand) matplotlib will default to the rcParams to select the file-format to save to the buffer for the image, and this could be a source confusion/issues for hashing repeatability for developers when testing.
i.e., what I'm proposing is that a format='png' is injected into the savefig_kwargs, iff not specified by the caller as a kwarg option in the marker decorator.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Línea de trabajo
Empieza en pytest_mpl/plugin.py, en la llamada enlazada a savefig alrededor de las líneas 419–421, y sigue después cómo proviene savefig_kwargs del decorador del marcador. Comprueba cómo se gestiona el búfer en memoria y verifica que el formato predeterminado sea PNG, mientras que un formato proporcionado por quien realiza la llamada permanezca sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- matplotlib, python
- Área
- testing-qa
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 48/100