From f76aa2d17a1ebe5ffe9cd9a393938804fafcd2f9 Mon Sep 17 00:00:00 2001 From: John Blischak Date: Thu, 3 Oct 2024 11:18:31 -0400 Subject: [PATCH] Better document run_test.r (#5479) * Better document run_test.r * Add news bullet for #5479 * Update news/5479-better-document-run_test.r --------- Co-authored-by: Bianca Henderson Co-authored-by: Bianca Henderson --- conda_build/skeletons/cran.py | 4 ++-- docs/source/concepts/recipe.rst | 2 +- docs/source/resources/define-metadata.rst | 12 ++++++------ news/5479-better-document-run_test.r | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 news/5479-better-document-run_test.r diff --git a/conda_build/skeletons/cran.py b/conda_build/skeletons/cran.py index 93958333fb..665f45a6e7 100755 --- a/conda_build/skeletons/cran.py +++ b/conda_build/skeletons/cran.py @@ -115,8 +115,8 @@ - $R -e "library('{cran_packagename}')" # [not win] - "\\"%R%\\" -e \\"library('{cran_packagename}')\\"" # [win] - # You can also put a file called run_test.py, run_test.sh, or run_test.bat - # in the recipe that will be run at test time. + # You can also put a file called run_test.r, run_test.py, run_test.sh, + # or run_test.bat in the recipe that will be run at test time. # requires: # Put any additional test requirements here. diff --git a/docs/source/concepts/recipe.rst b/docs/source/concepts/recipe.rst index 170f74f2ca..78d40ab50d 100644 --- a/docs/source/concepts/recipe.rst +++ b/docs/source/concepts/recipe.rst @@ -19,7 +19,7 @@ is a flat directory that contains the following files: * ``bld.bat`` — The build script that installs the files for the package on Windows. It is executed using ``cmd``. -* ``run_test.[py,pl,sh,bat]`` — An optional Python test file, a +* ``run_test.[py,pl,sh,bat,r]`` — An optional Python test file, a test script that runs automatically if it is part of the recipe. * Optional patches that are applied to the source. diff --git a/docs/source/resources/define-metadata.rst b/docs/source/resources/define-metadata.rst index d7b5e9ff70..26aea14f10 100644 --- a/docs/source/resources/define-metadata.rst +++ b/docs/source/resources/define-metadata.rst @@ -1127,7 +1127,7 @@ Test section ============ If this section exists or if there is a -``run_test.[py,pl,sh,bat]`` file in the recipe, the package is +``run_test.[py,pl,sh,bat,r]`` file in the recipe, the package is installed into a test environment after the build is finished and the tests are run there. @@ -1212,12 +1212,12 @@ following: Run test script --------------- -The script ``run_test.sh``---or ``.bat``, ``.py``, or -``.pl``---is run automatically if it is part of the recipe. +The script ``run_test.sh``---or ``.bat``, ``.py``, ``.pl``, +or ``.r``---is run automatically if it is part of the recipe. .. note:: - Python .py and Perl .pl scripts are valid only - as part of Python and Perl packages, respectively. + Python .py, Perl .pl, and R .r scripts are valid only + as part of Python, Perl, and R packages, respectively. Downstream tests @@ -1491,7 +1491,7 @@ You can test subpackages independently of the top-level package. Independent test script files for each separate package are specified under the subpackage's test section. These files support the same formats as the top-level ``run_test.*`` scripts, -which are .py, .pl, .bat, and .sh. These may be extended to +which are .py, .pl, .r, .bat, and .sh. These may be extended to support other script types in the future. .. code-block:: yaml diff --git a/news/5479-better-document-run_test.r b/news/5479-better-document-run_test.r new file mode 100644 index 0000000000..233a61bd96 --- /dev/null +++ b/news/5479-better-document-run_test.r @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* Better document `run_test.r`. (#5479) + +### Other + +*