From e5190f639f76ba381a4f39bac49f157c3aedc3cc Mon Sep 17 00:00:00 2001 From: Peter Verveer Date: Fri, 27 Sep 2024 11:48:39 +0200 Subject: [PATCH] Fix the everest doc generator script --- src/everest/docs/__main__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/everest/docs/__main__.py b/src/everest/docs/__main__.py index d25347ffaee..8891bea198f 100644 --- a/src/everest/docs/__main__.py +++ b/src/everest/docs/__main__.py @@ -1,12 +1,11 @@ -import os - -from tests.everest.utils import relpath +from pathlib import Path from everest.docs.generate_docs_from_config_spec import generate_docs_pydantic_to_rst -committed_file = os.path.abspath( - relpath("..", "..", "docs", "everest", "config_generated.rst") -) +committed_file = ( + Path(__file__).parents[3] / "docs" / "everest" / "config_generated.rst" +).resolve() + print(f"Writing new docs contents to {committed_file}") docs_content = generate_docs_pydantic_to_rst()