Skip to content

Primera entrega: Implementación de analizador de fórmulas tipo Excel #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SantiagoAvila21
Copy link

Esta es la primera entrega del proyecto, que consiste en la implementación de una clase Logic en Python que permite analizar expresiones similares a fórmulas de Excel. La clase identifica y extrae los siguientes componentes de una fórmula:
- Funciones (como SUMA, PROMEDIO, etc.)
- Constantes numéricas (enteros o decimales, positivos o negativos)
- Referencias individuales a celdas (como A1, B23)
- Rangos de celdas (como A1:B3)

src/logic.py Outdated
Comment on lines 1 to 3
print("hola mnundo" \
"hola mundo")
print("hola mundo")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que está mal etiquetado este commit.

src/logic.py Outdated
Comment on lines 73 to 79
# Parte para hacer el test
while True:
test = input("Ingrese su expresión a valorar (ej: =SUMA(1,A1,B2:B5)): ")
prueba = Logic(test)
prueba.clasificacionFun()
if prueba.value:
break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si esto es un test, debe ir en tests, no en src, porque cuando sea importado el modulo se ejecutará este código, que adicionalmente es bloqueante.

Usa pytest para poder acceder facilmente a src.

from src.funciones import suma
def test_suma():
    assert suma(1,2,3)==6

y luego en terminal

pytest test/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants