From 5edfd7af77d588cfc2261a90d07ccee4b2f21b51 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 4 Nov 2024 13:49:15 -0500 Subject: [PATCH] docs: Fix a linx in OEP-50 Link to the correct hooks documentation in the edx-platform repo. That doc could be much improved but at least now we won't have a dead link. --- .../oep-0050-hooks-extension-framework.rst | 5 +---- oeps/conf.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/oeps/architectural-decisions/oep-0050-hooks-extension-framework.rst b/oeps/architectural-decisions/oep-0050-hooks-extension-framework.rst index 5b6d7a6c6..d59f3aba0 100644 --- a/oeps/architectural-decisions/oep-0050-hooks-extension-framework.rst +++ b/oeps/architectural-decisions/oep-0050-hooks-extension-framework.rst @@ -37,7 +37,7 @@ Motivation ********** Following the open-closed principle, it would be desirable for the open edX -project to allow the extension points (great `summary of the current options`_) +project to allow the extension points (great :doc:`summary of the current options`) to modify as much of the code paths that define the business rules of an open edX instance in a way that is consistent and repeatable. @@ -56,9 +56,6 @@ This proposal draws inspiration from the cumulative experience of eduNEXT as the lead author, other members of the community, and from one of the largest extendable platforms for the web today for many years already, WordPress. -.. _summary of the current options: https://github.com/openedx/edx-platform/blob/master/docs/guides/extension_points.rst - - Specification ************* diff --git a/oeps/conf.py b/oeps/conf.py index 34d7646b9..ea611c2f1 100644 --- a/oeps/conf.py +++ b/oeps/conf.py @@ -14,6 +14,7 @@ import sys import os +import re from datetime import datetime @@ -337,12 +338,24 @@ #texinfo_no_detailmenu = False +# Intersphinx Extension Configuration +DIGITS_ONLY = r"^\d+$" +rtd_language = os.environ.get("READTHEDOCS_LANGUAGE", "en") +rtd_version = os.environ.get("READTHEDOCS_VERSION", "latest") +if re.search(DIGITS_ONLY, rtd_version): + # This is a PR build, use the latest versions of the other repos. + rtd_version = "latest" + # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { "python": ( 'https://docs.python.org/', None ), + "edx-platform": ( + f"https://docs.openedx.org/projects/edx-platform/{rtd_language}/{rtd_version}", + None, + ), } # -- Read the Docs Specific Configuration