Make CFBM tests and their Python dependencies optional for production builds

Aperta Adatta ai principianti
#74 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cmake, python

Direzione di ricerca

Inizia dal CMakeLists.txt di primo livello di CFBM e dalla sua chiamata incondizionata a add_subdirectory(tests); verifica come vengono gestiti attualmente BUILD_TESTING e Python3_EXECUTABLE. Aggiungi l’opzione richiesta e documentane l’uso nelle build di produzione e come sovrascrivere l’interprete. Verifica, come descritto nell’issue, che i test vengano saltati quando l’opzione è disabilitata e registrati con l’interprete selezionato quando è abilitata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Fortran
Stelle
11
Fork
18
Merge medio
2g 23h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NCAR/fire_behavior

Tutte le issue di NCAR/fire_behavior

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.