From 071d1a21434959623f52e774c700d796d9562609 Mon Sep 17 00:00:00 2001 From: Joerg Henrichs Date: Sat, 2 Mar 2024 15:03:51 +1100 Subject: [PATCH 1/2] Minor documentation update for #277. --- docs/source/advanced_config.rst | 16 +++++++++------- docs/source/environment.rst | 4 ++-- docs/source/writing_config.rst | 4 ++-- source/fab/steps/compile_fortran.py | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/source/advanced_config.rst b/docs/source/advanced_config.rst index 4fd4b74e..3af9b179 100644 --- a/docs/source/advanced_config.rst +++ b/docs/source/advanced_config.rst @@ -82,18 +82,20 @@ import your grab configuration to find out where it put the source. if __name__ == '__main__': with BuildConfig(project_label='') as state: - grab_folder(state, src=grab_config.source_root), + grab_folder(state, src=my_grab_config.source_root), Housekeeping ============ -Fab will remove old files from the prebuilds folder. It will remove all prebuild files that are not part of the current build by default. - -If you add a :func:`~fab.steps.cleanup_prebuilds.cleanup_prebuilds` step, you -can keep prebuild files for longer. This may be useful, for example, if you -often switch between two versions of your code and want to keep the prebuild -speed benefits when building both. +You can add a :func:`~fab.steps.cleanup_prebuilds.cleanup_prebuilds` +step, where you can explicitly control how long to keep prebuild files. +This may be useful, for example, if you often switch between two versions +of your code and want to keep the prebuild speed benefits when building +both. If you do not add your own cleanup_prebuild step, Fab will +automatically run a default step which will remove old files from the +prebuilds folder. It will remove all prebuild files that are not part of +the current build by default. Sharing Prebuilds diff --git a/docs/source/environment.rst b/docs/source/environment.rst index 8747efd9..ef5b40ee 100644 --- a/docs/source/environment.rst +++ b/docs/source/environment.rst @@ -3,11 +3,11 @@ Environment *********** -Fab requires a suitible Python environment in which to run. This page outlines +Fab requires a suitable Python environment in which to run. This page outlines some routes to achieving such an environment. This page contains general instructions, there are additional instructions for -:ref:`Met Office` users elsewhere. +:ref:`Met Office` users elsewhere. .. _Requirements: diff --git a/docs/source/writing_config.rst b/docs/source/writing_config.rst index 9795a8cb..aaab8471 100644 --- a/docs/source/writing_config.rst +++ b/docs/source/writing_config.rst @@ -236,14 +236,14 @@ However preprocessing C currently requires a preceding step called the into the C code so Fab is able to deduce which inclusions are user code and which are system code. This allows system dependencies to be ignored. -See also :ref:`Advanced C Code` +See also :ref:`Advanced C Code` Further Reading =============== More advanced configuration topics are discussed in -:ref:`Advanced Configuration`. +:ref:`Advanced Config`. You can see more complicated configurations in the `developer testing directory `_. diff --git a/source/fab/steps/compile_fortran.py b/source/fab/steps/compile_fortran.py index 41c4e380..f84e71fa 100644 --- a/source/fab/steps/compile_fortran.py +++ b/source/fab/steps/compile_fortran.py @@ -67,7 +67,7 @@ def compile_fortran(config: BuildConfig, common_flags: Optional[List[str]] = Non A list of :class:`~fab.build_config.AddFlags`, defining flags to be included in the command line call for selected files. :param source: - An :class:`~fab.artefacts.ArtefactsGetter` which give us our c files to process. + An :class:`~fab.artefacts.ArtefactsGetter` which gives us our Fortran files to process. """ From 68eddfcfca26e3ed2d68a8461afd5a3993ce0d31 Mon Sep 17 00:00:00 2001 From: Joerg Henrichs Date: Mon, 18 Mar 2024 00:23:33 +1100 Subject: [PATCH 2/2] Addressed reviewer's comments. --- docs/source/advanced_config.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/advanced_config.rst b/docs/source/advanced_config.rst index 3af9b179..0e8a04d1 100644 --- a/docs/source/advanced_config.rst +++ b/docs/source/advanced_config.rst @@ -92,7 +92,9 @@ You can add a :func:`~fab.steps.cleanup_prebuilds.cleanup_prebuilds` step, where you can explicitly control how long to keep prebuild files. This may be useful, for example, if you often switch between two versions of your code and want to keep the prebuild speed benefits when building -both. If you do not add your own cleanup_prebuild step, Fab will +both. + +If you do not add your own cleanup_prebuild step, Fab will automatically run a default step which will remove old files from the prebuilds folder. It will remove all prebuild files that are not part of the current build by default.