[BD-21] Document settings with annotations

We introduce the documentation of django settings via code annotations.
This will allow us to produce a human-readable documentatio of all Open
edX settings.
This commit is contained in:
Régis Behmo
2020-09-21 10:56:39 +02:00
parent d74f6d9800
commit e555d8a571
5 changed files with 40 additions and 5 deletions

View File

@@ -15,20 +15,27 @@ release = ""
# -- General configuration ---------------------------------------------------
extensions = ["code_annotations.config_and_tools.sphinx.extensions.featuretoggles"]
extensions = ["code_annotations.contrib.sphinx.extensions.featuretoggles", "code_annotations.contrib.sphinx.extensions.settings"]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
featuretoggles_source_path = os.path.abspath(
edxplatform_repo_url = "https://github.com/edx/edx-platform"
edxplatform_source_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "..")
)
featuretoggles_repo_url = "https://github.com/edx/edx-platform"
try:
edx_platform_version = git.Repo(search_parent_directories=True).head.object.hexsha
except git.InvalidGitRepositoryError:
edx_platform_version = "master"
featuretoggles_source_path = edxplatform_source_path
featuretoggles_repo_url = edxplatform_repo_url
featuretoggles_repo_version = edx_platform_version
settings_source_path = edxplatform_source_path
settings_repo_url = edxplatform_repo_url
settings_repo_version = edx_platform_version
# -- Options for HTML output -------------------------------------------------
html_theme = "edx_theme"

View File

@@ -1,3 +1,22 @@
Open edX Django settings
========================
This is the list of Django settings defined in the ``common.py`` modules of edx-platform.
LMS settings
------------
.. TODO move this to a dedicated page
.. settings::
:folder_path: lms/envs/common.py
CMS settings
------------
.. settings::
:folder_path: cms/envs/common.py
Open edX Feature Toggles
========================