Recetario saludable: interfaz de consola en Python - #2
Open
u1987505 wants to merge 2 commits into
Open
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Owner
Author
Pruebas end-to-end de
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Añade
recetario.py, una aplicación de consola (solo funciones, sin POO, solo librería estándar) que leerecetas_saludables.csvconcsv.DictReadery ofrece un menú en bucle: listar, ver detalle por id, buscar por nombre o ingrediente, filtrar por categoría o calorías máximas, y estadísticas (mín/media/máx de kcal, proteínas y tiempo medios).El CSV no estaba en
master, así que se incorpora en este PR junto al programa (100 recetas).El menú se define como una tabla de datos, de forma que añadir una opción es una sola línea:
Detalles de formato del CSV que maneja el código: los ingredientes vienen en un único campo separados por
|y se imprimen como lista; los valores numéricos se convierten cona_numero()tolerante a errores para que un campo vacío o mal formado no rompa filtros ni estadísticas.Ctrl+D(EOFError) sale limpiamente igual que la opción0.Link to Devin session: https://app.devin.ai/sessions/0bb1ad0ffd4047cbaf20ed3023b1a1e2
Requested by: @u1987505