Make CFBM tests and their Python dependencies optional for production builds

Abierto Apto para principiantes
#74 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cmake, python

Línea de trabajo

Empieza por el CMakeLists.txt de nivel superior de CFBM y su llamada incondicional a add_subdirectory(tests); comprueba cómo se gestionan actualmente BUILD_TESTING y Python3_EXECUTABLE. Añade la opción solicitada y documenta su uso en compilaciones de producción y cómo sobrescribir el intérprete. Verifica, tal como se describe en la issue, que las pruebas se omiten cuando está desactivada y se registran con el intérprete seleccionado cuando está activada.

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

Descripción

Configuring WRF with -DENABLE_CFBM=ON also configures the CFBM test suite. The top-level CFBM CMakeLists.txt calls add_subdirectory(tests) unconditionally. With the default generated regression suite, CMake requires Python 3.11 or newer and imports NumPy, netCDF4, and PyYAML during configuration. A missing package therefore stops a production WRF-CFBM build before Fortran compilation starts, even when the user only wants the model executables. Passing -DBUILD_TESTING=OFF currently leaves that dependency in place.

Proposed change

Add a CMake option named CFBM_BUILD_TESTS, defaulting to ON, that controls whether CMake enters the CFBM tests directory. Document -DCFBM_BUILD_TESTS=OFF for production builds. For builds with tests enabled, document the existing -DPython3_EXECUTABLE=/path/to/python override for environments where CMake finds an interpreter without the required packages.

Verification
  • Configure and compile WRF with -DENABLE_CFBM=ON -DCFBM_BUILD_TESTS=OFF in an environment where Python is available for WRF configuration but the CFBM regression packages are absent. Confirm the coupled executable builds and CTest lists no CFBM tests.
  • With the option omitted or explicitly enabled, confirm the existing CFBM unit and regression tests are registered and the generated suite uses the selected Python interpreter.
Lenguaje dominante
Fortran
Estrellas
11
Forks
18
Merge medio
2 d 23 h
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 NCAR/fire_behavior

Todos los issues de NCAR/fire_behavior

Issues similares

Más issues de Build System

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.