From 7e1387ef5aae85e5429172dfa6bf943f062eb9a8 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 14:14:59 +0100 Subject: [PATCH 1/3] Use real version. Don't build PDF and EPUB on RTD. --- .readthedocs.yml | 3 +-- docs/conf.py | 22 +++++++++++++++++++++- src/towncrier/newsfragments/408.ignore | 0 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/towncrier/newsfragments/408.ignore diff --git a/.readthedocs.yml b/.readthedocs.yml index a666d9d0..5a9d1a29 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,9 +4,8 @@ sphinx: # We want to fail as this is also our CI check for the docs. fail_on_warning: True +# We don't need PDF and epub for the docs. formats: - - pdf - - epub python: version: "3.8" diff --git a/docs/conf.py b/docs/conf.py index 4617edcb..64268703 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,11 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. +from datetime import date + +from towncrier import __version__ as towncrier_version + + extensions = [] # Add any paths that contain templates here, relative to this directory. @@ -44,10 +49,25 @@ master_doc = "index" # General information about the project. +_today = date.today() project = "Towncrier" -copyright = "2017, Amber Brown" +copyright = "{}, Towncrier contibutors. Ver {}. Built on {}".format( + _today.year, + towncrier_version.public(), + _today.isoformat(), +) author = "Amber Brown" +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# The short X.Y version. +version = "{}.{}.{}".format( + towncrier_version.major, towncrier_version.minor, towncrier_version.micro +) +# The full version, including alpha/beta/rc tags. +release = towncrier_version.public() + # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path diff --git a/src/towncrier/newsfragments/408.ignore b/src/towncrier/newsfragments/408.ignore new file mode 100644 index 00000000..e69de29b From b961dc79e6f7e0c69231fe68c1996ac9bc1b0c0d Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 15:02:34 +0100 Subject: [PATCH 2/3] Fix newsfragment and RTD yaml. --- .readthedocs.yml | 2 +- src/towncrier/newsfragments/{408.ignore => 408.misc} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/towncrier/newsfragments/{408.ignore => 408.misc} (100%) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5a9d1a29..b6b92faf 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,7 +5,7 @@ sphinx: fail_on_warning: True # We don't need PDF and epub for the docs. -formats: +formats: [] python: version: "3.8" diff --git a/src/towncrier/newsfragments/408.ignore b/src/towncrier/newsfragments/408.misc similarity index 100% rename from src/towncrier/newsfragments/408.ignore rename to src/towncrier/newsfragments/408.misc From 679d843ce683948f9d572d1d9232805564eae769 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 17:14:25 +0100 Subject: [PATCH 3/3] Fix typo and remove build time. --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 64268703..62092d11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,10 +51,9 @@ # General information about the project. _today = date.today() project = "Towncrier" -copyright = "{}, Towncrier contibutors. Ver {}. Built on {}".format( +copyright = "{}, Towncrier contributors. Ver {}".format( _today.year, towncrier_version.public(), - _today.isoformat(), ) author = "Amber Brown"