Skip to content

Commit c51dab2

Browse files
authored
Added text to state the Python version used to build the docs. (#3989)
* Added text to state the Python version used to build the docs. * Added footer template that includes the Python version used to build. * added new line * Review actions * added whatsnew
1 parent 7d73cf2 commit c51dab2

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

docs/src/_templates/footer.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends "!footer.html" %}
2+
{% block extrafooter %}
3+
Built using Python {{ python_version }}.
4+
{{ super() }}
5+
{% endblock %}

docs/src/conf.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def autolog(message):
6969

7070
# define the copyright information for latex builds. Note, for html builds,
7171
# the copyright exists directly inside "_templates/layout.html"
72-
upper_copy_year = datetime.datetime.now().year
73-
copyright = "Iris Contributors"
72+
copyright_years = f"2010 - {datetime.datetime.now().year}"
73+
copyright = f"{copyright_years}, Iris Contributors"
7474
author = "Iris Developers"
7575

7676
# The version info for the project you're documenting, acts as replacement for
@@ -95,9 +95,12 @@ def autolog(message):
9595

9696
# Create a variable that can be inserted in the rst "|copyright_years|".
9797
# You can add more variables here if needed.
98+
99+
build_python_version = ".".join([str(i) for i in sys.version_info[:3]])
100+
98101
rst_epilog = f"""
99-
.. |copyright_years| replace:: 2010 - {upper_copy_year}
100-
.. |python_version| replace:: {'.'.join([str(i) for i in sys.version_info[:3]])}
102+
.. |copyright_years| replace:: {copyright_years}
103+
.. |python_version| replace:: {build_python_version}
101104
.. |iris_version| replace:: v{version}
102105
.. |build_date| replace:: ({datetime.datetime.now().strftime('%d %b %Y')})
103106
"""
@@ -225,7 +228,8 @@ def autolog(message):
225228
}
226229

227230
html_context = {
228-
"copyright_years": "2010 - {}".format(upper_copy_year),
231+
"copyright_years": copyright_years,
232+
"python_version": build_python_version,
229233
# menu_links and menu_links_name are used in _templates/layout.html
230234
# to include some nice icons. See http://fontawesome.io for a list of
231235
# icons (used in the sphinx_rtd_theme)

docs/src/developers_guide/contributing_documentation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ The documentation uses specific packages that need to be present. Please see
2424
Building
2525
~~~~~~~~
2626

27+
This documentation was built using the latest Python version that Iris
28+
supports. For more information see :ref:`installing_iris`.
29+
2730
The build can be run from the documentation directory ``docs/src``.
2831

2932
The build output for the html is found in the ``_build/html`` sub directory.

docs/src/installing.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ any WSL_ distributions.
1717
.. _WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10
1818

1919
.. note:: Iris currently supports and is tested against **Python 3.6** and
20-
**Python 3.7**.
20+
**Python 3.7**.
21+
22+
.. note:: This documentation was built using Python |python_version|.
2123

2224

2325
.. _installing_using_conda:

docs/src/whatsnew/latest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ This document explains the changes made to Iris for this release
8383
#. `@bjlittle`_ added automated Iris version discovery for the ``latest.rst``
8484
in the ``whatsnew`` documentation. (:pull:`3981`)
8585

86+
#. `@tkknight`_ stated the Python version used to build the documentation
87+
on :ref:`installing_iris` and to the footer of all pages. Also added the
88+
copyright years to the footer. (:pull:`3989`)
89+
8690

8791
💼 Internal
8892
===========

0 commit comments

Comments
 (0)