Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Make tests deterministic and independent of global state

Abierto
#90 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 9 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
matplotlib, numpy, python
Área
testing-qa

Línea de trabajo

Start by locating the listed planners and filters, especially informed_rrt_star_path_planner.py, and inspect their random number and matplotlib setup; then review the test layout to see how tests are run. Add the test-level setup described in the issue and remove constructor changes to global state. Done means repeated test runs are deterministic and all tests pass on CI.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Problem

  • RRT, RRT*, bidirectional RRT*, particle filter, GNSS noise, EKF/UKF and MPPI use unseeded random numbers. A planner that fails to find a path makes the smoke test fail or hang by chance.
  • informed_rrt_star_path_planner.py calls matplotlib.use(...) and np.random.seed(42) inside its constructor, which changes global state for every later test in the same process.
  • CI doesn't set a non-interactive matplotlib backend.

Expected fix

  • Add test/conftest.py that sets the Agg backend and fixes the random seed for each test
  • Remove matplotlib.use and np.random.seed from component constructors

Done when

Repeated test runs give the same results and all tests pass on CI.

Lenguaje dominante
Python
Estrellas
1.9k
Forks
313
Merge medio
9 d 10 h
PR fusionados (30 d)
7

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ShisatoYano/AutonomousVehicleControlBeginnersGuide

Todos los issues de ShisatoYano/AutonomousVehicleControlBeginnersGuide

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.