From d8e238945ca031bd4df111a1f211583b31cf494d Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Mon, 8 Feb 2021 12:17:21 +0000 Subject: [PATCH 1/5] Added text to state the Python version used to build the docs. --- docs/src/conf.py | 6 +++++- docs/src/developers_guide/contributing_documentation.rst | 3 +++ docs/src/installing.rst | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index 30e6150b39..2b673ad44d 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -95,9 +95,12 @@ def autolog(message): # Create a variable that can be inserted in the rst "|copyright_years|". # You can add more variables here if needed. + +build_python_version = ".".join([str(i) for i in sys.version_info[:3]]) + rst_epilog = f""" .. |copyright_years| replace:: 2010 - {upper_copy_year} -.. |python_version| replace:: {'.'.join([str(i) for i in sys.version_info[:3]])} +.. |python_version| replace:: {build_python_version} .. |iris_version| replace:: v{version} .. |build_date| replace:: ({datetime.datetime.now().strftime('%d %b %Y')}) """ @@ -226,6 +229,7 @@ def autolog(message): html_context = { "copyright_years": "2010 - {}".format(upper_copy_year), + "python_version": build_python_version, # menu_links and menu_links_name are used in _templates/layout.html # to include some nice icons. See http://fontawesome.io for a list of # icons (used in the sphinx_rtd_theme) diff --git a/docs/src/developers_guide/contributing_documentation.rst b/docs/src/developers_guide/contributing_documentation.rst index 75e9dfe29c..1262a97dcf 100644 --- a/docs/src/developers_guide/contributing_documentation.rst +++ b/docs/src/developers_guide/contributing_documentation.rst @@ -24,6 +24,9 @@ The documentation uses specific packages that need to be present. Please see Building ~~~~~~~~ +This documentation is built using the latest Python version that Iris +supports. For more information see :ref:`installing_iris`. + The build can be run from the documentation directory ``docs/src``. The build output for the html is found in the ``_build/html`` sub directory. diff --git a/docs/src/installing.rst b/docs/src/installing.rst index 8b3ae8d3e7..949cd6e9a8 100644 --- a/docs/src/installing.rst +++ b/docs/src/installing.rst @@ -17,7 +17,8 @@ any WSL_ distributions. .. _WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10 .. note:: Iris currently supports and is tested against **Python 3.6** and - **Python 3.7**. + **Python 3.7**. This documentation is built using a single + version of Python, version |python_version|. .. _installing_using_conda: From 8ca9655faf339f72090d2266b45482ada0bd68ff Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Mon, 8 Feb 2021 12:19:07 +0000 Subject: [PATCH 2/5] Added footer template that includes the Python version used to build. --- docs/src/_templates/footer.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/src/_templates/footer.html diff --git a/docs/src/_templates/footer.html b/docs/src/_templates/footer.html new file mode 100644 index 0000000000..6e97731f85 --- /dev/null +++ b/docs/src/_templates/footer.html @@ -0,0 +1,5 @@ +{% extends "!footer.html" %} +{% block extrafooter %} + Built using Python {{ python_version }}. + {{ super() }} +{% endblock %} \ No newline at end of file From f8b69a83b5a911d8a03ab7f5254aa27171ade4a7 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Mon, 8 Feb 2021 12:23:26 +0000 Subject: [PATCH 3/5] added new line --- docs/src/_templates/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/_templates/footer.html b/docs/src/_templates/footer.html index 6e97731f85..1d5fb08b78 100644 --- a/docs/src/_templates/footer.html +++ b/docs/src/_templates/footer.html @@ -2,4 +2,4 @@ {% block extrafooter %} Built using Python {{ python_version }}. {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} From 793a219c0259b9f5ab9e2e7dd34feda615275fd7 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Tue, 9 Feb 2021 10:33:01 +0000 Subject: [PATCH 4/5] Review actions --- docs/src/conf.py | 8 ++++---- docs/src/developers_guide/contributing_documentation.rst | 2 +- docs/src/installing.rst | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index 2b673ad44d..843af17944 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -69,8 +69,8 @@ def autolog(message): # define the copyright information for latex builds. Note, for html builds, # the copyright exists directly inside "_templates/layout.html" -upper_copy_year = datetime.datetime.now().year -copyright = "Iris Contributors" +copyright_years = f"2010 - {datetime.datetime.now().year}" +copyright = f"{copyright_years}, Iris Contributors" author = "Iris Developers" # The version info for the project you're documenting, acts as replacement for @@ -99,7 +99,7 @@ def autolog(message): build_python_version = ".".join([str(i) for i in sys.version_info[:3]]) rst_epilog = f""" -.. |copyright_years| replace:: 2010 - {upper_copy_year} +.. |copyright_years| replace:: {copyright_years} .. |python_version| replace:: {build_python_version} .. |iris_version| replace:: v{version} .. |build_date| replace:: ({datetime.datetime.now().strftime('%d %b %Y')}) @@ -228,7 +228,7 @@ def autolog(message): } html_context = { - "copyright_years": "2010 - {}".format(upper_copy_year), + "copyright_years": copyright_years, "python_version": build_python_version, # menu_links and menu_links_name are used in _templates/layout.html # to include some nice icons. See http://fontawesome.io for a list of diff --git a/docs/src/developers_guide/contributing_documentation.rst b/docs/src/developers_guide/contributing_documentation.rst index 1262a97dcf..167e8937b9 100644 --- a/docs/src/developers_guide/contributing_documentation.rst +++ b/docs/src/developers_guide/contributing_documentation.rst @@ -24,7 +24,7 @@ The documentation uses specific packages that need to be present. Please see Building ~~~~~~~~ -This documentation is built using the latest Python version that Iris +This documentation was built using the latest Python version that Iris supports. For more information see :ref:`installing_iris`. The build can be run from the documentation directory ``docs/src``. diff --git a/docs/src/installing.rst b/docs/src/installing.rst index 949cd6e9a8..31fc497b85 100644 --- a/docs/src/installing.rst +++ b/docs/src/installing.rst @@ -17,8 +17,9 @@ any WSL_ distributions. .. _WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10 .. note:: Iris currently supports and is tested against **Python 3.6** and - **Python 3.7**. This documentation is built using a single - version of Python, version |python_version|. + **Python 3.7**. + +.. note:: This documentation was built using Python |python_version|. .. _installing_using_conda: From 7534fc1b3a28821faf5180915de1d415a27e2978 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Tue, 9 Feb 2021 12:02:00 +0000 Subject: [PATCH 5/5] added whatsnew --- docs/src/whatsnew/latest.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index fbb98cb1e3..0e30a723dc 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -83,6 +83,10 @@ This document explains the changes made to Iris for this release #. `@bjlittle`_ added automated Iris version discovery for the ``latest.rst`` in the ``whatsnew`` documentation. (:pull:`3981`) +#. `@tkknight`_ stated the Python version used to build the documentation + on :ref:`installing_iris` and to the footer of all pages. Also added the + copyright years to the footer. (:pull:`3989`) + 💼 Internal ===========