From 980c1874eea3bdf1fb17bd3af284571e53ea9d9b Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Fri, 6 Sep 2024 08:12:40 +0000 Subject: [PATCH] Update tox.ini && conf.py file Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py --- doc/requirements.txt | 3 ++- doc/source/conf.py | 8 ++++++++ tox.ini | 2 ++ zuul.yaml | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 492834a..5723799 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -8,4 +8,5 @@ reno>=3.1.0 # Apache-2.0 otc-sphinx-directives>=0.1.0 sphinx-minify>=0.0.1 # Apache-2.0 git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata.git#egg=otc_metadata -setuptools \ No newline at end of file +setuptools +gitpython \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 9aa8cff..60ebc17 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -16,6 +16,8 @@ import os import sys +from git import Repo +from datetime import datetime extensions = [ 'otcdocstheme', @@ -111,3 +113,9 @@ html_copy_source = False # -- Options for PDF output -------------------------------------------------- latex_documents = [] + +# Get the Git commit values for last updated timestamp on each page +repo = Repo(search_parent_directories=True) +commit = repo.head.commit +current_commit_hash = commit.hexsha +current_commit_time = commit.committed_datetime.strftime('%Y-%m-%d %H:%M') \ No newline at end of file diff --git a/tox.ini b/tox.ini index 976f958..ae8a99f 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,8 @@ commands = stestr run {posargs} stestr slowest [testenv:pep8] +allowlist_externals = + doc8 commands = doc8 doc/source README.rst diff --git a/zuul.yaml b/zuul.yaml index a4d00bd..107ef29 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -1,3 +1,4 @@ +--- - project: merge-mode: squash-merge default-branch: main @@ -8,4 +9,4 @@ - noop gate: jobs: - - noop + - noop \ No newline at end of file