From 242a321dc89ec9f95a87b3427118b9092d648efc Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Tue, 30 Jul 2024 12:28:39 +0200 Subject: [PATCH] Fix semanticUplift.additionalSteps baseUrl prematurely --- ogc/bblocks/postprocess.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ogc/bblocks/postprocess.py b/ogc/bblocks/postprocess.py index 34c0c17..1dc1cc6 100644 --- a/ogc/bblocks/postprocess.py +++ b/ogc/bblocks/postprocess.py @@ -152,13 +152,6 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool: base_url, cwd if base_url else output_file_root ) + '/' - if bblock.semanticUplift and bblock.semanticUplift.get('additionalSteps'): - for step in bblock.semanticUplift['additionalSteps']: - if step.get('ref'): - step['ref'] = PathOrUrl(bblock.files_path).resolve_ref(step['ref']).with_base_url( - base_url, cwd if base_url else output_file_root - ) - if not light: if not steps or 'tests' in steps: print(f" > Running tests for {bblock.identifier}", file=sys.stderr) @@ -198,6 +191,13 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool: transform['ref'] = urljoin(bblock.metadata['sourceFiles'], transform['ref']) bblock.metadata['transforms'].append({k: v for k, v in transform.items() if k != 'code'}) + if bblock.semanticUplift and bblock.semanticUplift.get('additionalSteps'): + for step in bblock.semanticUplift['additionalSteps']: + if step.get('ref'): + step['ref'] = PathOrUrl(bblock.files_path).resolve_ref(step['ref']).with_base_url( + base_url, cwd if base_url else output_file_root + ) + if not light and (not steps or 'doc' in steps): print(f" > Generating documentation for {bblock.identifier}", file=sys.stderr) doc_generator.generate_doc(bblock)