From abe55e685a93f5f3b5ab08cd3865931fa49151a2 Mon Sep 17 00:00:00 2001 From: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com> Date: Wed, 27 Sep 2023 15:57:30 +0100 Subject: [PATCH] Correct errors in build configuration examples (#267) --- docs/source/writing_config.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/source/writing_config.rst b/docs/source/writing_config.rst index 165e96ab..9795a8cb 100644 --- a/docs/source/writing_config.rst +++ b/docs/source/writing_config.rst @@ -23,6 +23,7 @@ Here's a simple configuration without any steps. logger = getLogger('fab') if __name__ == '__main__': + with BuildConfig(project_label='') as state: pass @@ -57,7 +58,7 @@ A grab step will copy files from a folder or remote repo into a folder called from fab.build_config import BuildConfig from fab.steps.find_source_files import find_source_files - from fab.steps.grab import GrabFolder + from fab.steps.grab.folder import grab_folder logger = getLogger('fab') @@ -107,13 +108,14 @@ The Fortran preprocessor will read the :ref:`FPP` environment variable .. code-block:: :linenos: :caption: build_it.py - :emphasize-lines: 6,15 + :emphasize-lines: 7,16 #!/usr/bin/env python3 - from logging getLogger + from logging import getLogger from fab.build_config import BuildConfig from fab.steps.find_source_files import find_source_files + from fab.steps.grab.folder import grab_folder from fab.steps.preprocess import preprocess_fortran logger = getLogger('fab') @@ -155,7 +157,7 @@ The Analyse step looks for source to analyse in several collections: from fab.steps.analyse import analyse from fab.build_config import BuildConfig from fab.steps.find_source_files import find_source_files - from fab.steps.grab import GrabFolder + from fab.steps.grab.folder import grab_folder from fab.steps.preprocess import preprocess_fortran logger = getLogger('fab') @@ -194,11 +196,11 @@ then creates the executable. from fab.build_config import BuildConfig from fab.steps.compile_fortran import compile_fortran from fab.steps.find_source_files import find_source_files - from fab.steps.grab import GrabFolder + from fab.steps.grab.folder import grab_folder from fab.steps.link import link_exe from fab.steps.preprocess import preprocess_fortran - logger = logging.getLogger('fab') + logger = getLogger('fab') if __name__ == '__main__':