From ae2f549d9c0d1a7674bd84b8b3d4fcdf6d45a85f Mon Sep 17 00:00:00 2001 From: Riaz Virani Date: Fri, 29 May 2026 11:21:36 -0400 Subject: [PATCH 1/2] docs: set LOAD_ENTERPRISE_BLOCKS=TRUE in docs workflow build step Without this flag, the block-enumeration loader silently drops every enterprise block, so the docs CI never generates pages for them and links from the frontend 404. The workflow already checks out and installs the private workflows-enterprise-blocks repo; this just makes the build step actually load them. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c7fcdc74f7..44b7bb2e3e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -93,6 +93,8 @@ jobs: working-directory: ./inference_repo - name: Build block docs + env: + LOAD_ENTERPRISE_BLOCKS: "TRUE" run: python -m development.docs.build_block_docs working-directory: ./inference_repo From a57f4728d628f1301d75742b13604cd34a6421ca Mon Sep 17 00:00:00 2001 From: Riaz Virani Date: Fri, 29 May 2026 11:46:44 -0400 Subject: [PATCH 2/2] docs: fix source links for enterprise blocks in build_block_docs get_source_link_for_block_class only handled inference/core/workflows/, so enabling enterprise blocks produced pages with href="None" (the split raised IndexError and the link fell back to None). Resolve the path relative to the inference package root instead, so both core (inference/core/workflows/...) and enterprise (inference/enterprise/workflows/...) blocks get valid links. Core-block links are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- development/docs/build_block_docs.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/development/docs/build_block_docs.py b/development/docs/build_block_docs.py index 69f69f8c42..6cdde1706d 100644 --- a/development/docs/build_block_docs.py +++ b/development/docs/build_block_docs.py @@ -493,9 +493,17 @@ def _escape_jinja2_dollar_expression(match: re.Match) -> str: def get_source_link_for_block_class(block_class: Type[WorkflowBlock]) -> str: try: - filename = inspect.getfile(block_class).split("inference/core/workflows/")[1] - return f"https://github.com/roboflow/inference/blob/main/inference/core/workflows/{filename}" - except Exception as e: + filepath = inspect.getfile(block_class) + # Resolve the path relative to the `inference` package root so that both + # core blocks (inference/core/workflows/...) and enterprise blocks + # (inference/enterprise/workflows/...) produce valid links. + marker = f"{os.sep}inference{os.sep}" + idx = filepath.rfind(marker) + if idx == -1: + return None + relative_path = filepath[idx + 1 :].replace(os.sep, "/") + return f"https://github.com/roboflow/inference/blob/main/{relative_path}" + except Exception: return None def get_auto_generation_markers(