Make CFBM tests and their Python dependencies optional for production builds

オープン 初心者向け
#74 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cmake, python

調査の方向性

CFBM のトップレベルにある CMakeLists.txt と、無条件に実行される add_subdirectory(tests) の呼び出しから始め、BUILD_TESTING と Python3_EXECUTABLE が現在どのように扱われているかを確認してください。要求されたオプションを追加し、プロダクションビルドでの使用方法とインタープリターの上書き方法を文書化してください。Issue の説明に従い、無効時にはテストがスキップされ、有効時には選択したインタープリターで登録されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Fortran
スター
11
フォーク
18
平均マージ
2日 23時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NCAR/fire_behavior のほかの issue

NCAR/fire_behavior の issue をすべて見る

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。