Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added text to state the Python version used to build the docs. #3989

Merged
merged 5 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/src/_templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "!footer.html" %}
{% block extrafooter %}
Built using Python {{ python_version }}.
{{ super() }}
{% endblock %}
14 changes: 9 additions & 5 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]])}
.. |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')})
"""
Expand Down Expand Up @@ -225,7 +228,8 @@ 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
# icons (used in the sphinx_rtd_theme)
Expand Down
3 changes: 3 additions & 0 deletions docs/src/developers_guide/contributing_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ The documentation uses specific packages that need to be present. Please see
Building
~~~~~~~~

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``.

The build output for the html is found in the ``_build/html`` sub directory.
Expand Down
4 changes: 3 additions & 1 deletion docs/src/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +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**.
**Python 3.7**.

.. note:: This documentation was built using Python |python_version|.


.. _installing_using_conda:
Expand Down
4 changes: 4 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
===========
Expand Down