Structural v/s symbolic equality for SymPy tests
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Empieza leyendo tests/test_compute_features.py y la discusión enlazada en #581 para entender dónde se utiliza la igualdad estructural y por qué se propuso la igualdad simbólica. El trabajo estará completo cuando el proyecto tenga una estrategia de igualdad acordada, las pruebas pertinentes la sigan de forma coherente y la suite de pruebas pase en todas las versiones de Python compatibles.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
#581 raises the question of structural (x == y) v/s symbolic (simplify(x - y) == 0 or Eq(x, y)) equality. Even though symbolic equality would be easier to maintain in the longer run, it would be better to use the structural equality wherever possible to be more strict as -
- we test (or at least, aim to test when we drop Python 3.8 support (uncompyle6 does not support Python 3.9+)) the ability of vector's compute functions to operate only on data containers using the SymPy tests - https://github.com/scikit-hep/vector/blob/main/tests/test_compute_features.py
- the SymPy tests don't fail often, so the maintainability is not that big of a problem
Originally posted by @Saransh-cpp in https://github.com/scikit-hep/vector/pull/581#pullrequestreview-2806944886
Tests failing without being mathematically wrong is bad IMO, since they will sooner or later fail with sympy updates (as is the case now from 1.13.1 -> 1.14.0). Hence I prefer symbolic comparison.
In fact it is quite similar to checking floating points by an epsilon range, since the backend computation can change, but the result is still right (wrt. the scope).
Originally posted by @APN-Pucky in https://github.com/scikit-hep/vector/issues/581#issuecomment-2863341676
Thanks! My comment behind using structural equality was because the "symbolic" nature of our compute functions will solely be tested by SymPy once Python 3.8 is removed from GH Actions; hence, we would want these tests to be strict (unless we find another way - #531). But at the same time, I don't think this strictness is actually adding anything to the test suite - the symbolic equality will test the exact same thing but in a more flexible way.
Given that we use structural equality everywhere in the tests, I have reverted to keep using that for now. However, I will open an issue to discuss this further (and possibly change all equalities in the tests in the future).
Originally posted by @Saransh-cpp in https://github.com/scikit-hep/vector/issues/581#issuecomment-2927882803
- Lenguaje dominante
- Python
- Estrellas
- 102
- Forks
- 45
- Merge medio
- 5 h 1 min
- PR fusionados (30 d)
- 2
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 scikit-hep/vector
-
theta and deltaangle lose precision for small anglesPosiblemente ocupada @robinbishtt la tomó hace 1 día. Abiertobug (unverified)
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
scikit-hep/vector#759 ·
Los mantenedores suelen responder en 1 día
-
Numba object backend: missing to_2D/to_3D/to_4D, momentum-named conversions, and like()Posiblemente ocupada @Thanatos9404 la tomó hace 21 días. Abiertofeature
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
scikit-hep/vector#750 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add ability to somehow map field names to coordinate axis names that vector expectsQuizá libre de nuevo @hjaat la tomó hace 101 días y no hay ningún pull request abierto. Abiertofeature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
scikit-hep/vector#732 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
scikit-hep/vector#731 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
scikit-hep/vector#711 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de scikit-hep/vector
Issues similares
-
bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
curriculum documentation quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
githubnext/gh-aw-workshop#5367 ·
Los mantenedores suelen responder en 3 días
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Create Noise Latents ignores randomize_seed and produces the same noise every runPosiblemente ocupada @griptapeops la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
Los mantenedores suelen responder en 1 día
-
Jenkins capacity report: metrics history is lost when archiving a month failsPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
adoptium/infrastructure#4568 ·
Los mantenedores suelen responder en 1 día