From 0e5ccfe7f9a0da10895d0046ddd374a0a037a816 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 20 Jan 2023 00:06:07 +0100 Subject: [PATCH 01/20] Generate the release cycle chart directly as SVG Instead of Mermaid, use jinja2. Sphinx uses jinja for templating as well, so it might be possible to integrate this more tightly, but an include file works nicely for now. (It's actually easy to generate this chart just with f-strings, but I don't want to set a bad example for people who shouldn't fully trust their input. Jinja has autoescaping to prevent SVG injections.) Styling is done from the main stylesheet, and is bit more straightforward. I've adjusted the colours to be a bit friendlier to colour-blind people. There are vertical lines for all years now -- Mermaid's skipping of every other year was pretty confusing. Year labels have been shortened. This should work for another 10 years. The caption is removed; it was redundant in our case. Precise sizing is hard to do with SVG, but the font family, size and line height should nearly match the main text on big screens. At least in the current theme. In the code, `sorted_versions` is now a list, and the dicts in it have some extra generated info. --- .gitattributes | 11 + Makefile | 4 +- _static/devguide_overrides.css | 98 +-- _tools/generate_release_cycle.py | 124 ++-- _tools/release_cycle_template.svg | 89 +++ conf.py | 1 - include/release-cycle.mmd | 49 -- include/release-cycle.svg | 1040 +++++++++++++++++++++++++++++ requirements.txt | 2 +- versions.rst | 17 +- 10 files changed, 1274 insertions(+), 161 deletions(-) create mode 100644 .gitattributes create mode 100644 _tools/release_cycle_template.svg delete mode 100644 include/release-cycle.mmd create mode 100644 include/release-cycle.svg diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..a0759e59e0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Generated files +# https://github.com/github/linguist/blob/master/docs/overrides.md +# +# To always hide generated files in local diffs, mark them as binary: +# $ git config diff.generated.binary true +# +[attr]generated linguist-generated=true diff=generated + +include/release-cycle.svg generated +include/branches.csv generated +include/end-of-life.csv generated diff --git a/Makefile b/Makefile index 6e5ee16931..995d0c87c2 100644 --- a/Makefile +++ b/Makefile @@ -194,9 +194,9 @@ include/branches.csv: include/release-cycle.json include/end-of-life.csv: include/release-cycle.json $(PYTHON) _tools/generate_release_cycle.py -include/release-cycle.mmd: include/release-cycle.json +include/release-cycle.svg: include/release-cycle.json $(PYTHON) _tools/generate_release_cycle.py .PHONY: versions -versions: include/branches.csv include/end-of-life.csv include/release-cycle.mmd +versions: include/branches.csv include/end-of-life.csv include/release-cycle.svg @echo Release cycle data generated. diff --git a/_static/devguide_overrides.css b/_static/devguide_overrides.css index c34f471332..27929e36f0 100644 --- a/_static/devguide_overrides.css +++ b/_static/devguide_overrides.css @@ -7,66 +7,70 @@ } /* Release cycle chart */ -#python-release-cycle .mermaid .active0, -#python-release-cycle .mermaid .active1, -#python-release-cycle .mermaid .active2, -#python-release-cycle .mermaid .active3 { - fill: #00dd00; - stroke: darkgreen; + +.release-cycle-chart { + width: 100%; + /* filter: grayscale(100%); */ +} + +.release-cycle-chart .release-cycle-year-line { + stroke: var(--color-foreground-primary); + stroke-width: 0.8px; + opacity: 75%; +} + +.release-cycle-chart .release-cycle-year-text { + fill: var(--color-foreground-primary); +} + +.release-cycle-chart .release-cycle-today-line { + stroke: var(--color-brand-primary); + stroke-width: 1.6px; } -#python-release-cycle .mermaid .done0, -#python-release-cycle .mermaid .done1, -#python-release-cycle .mermaid .done2, -#python-release-cycle .mermaid .done3 { - fill: orange; - stroke: darkorange; +.release-cycle-chart .release-cycle-row-shade { + fill: var(--color-background-item); + opacity: 50%; } -#python-release-cycle .mermaid .task0, -#python-release-cycle .mermaid .task1, -#python-release-cycle .mermaid .task2, -#python-release-cycle .mermaid .task3 { - fill: #007acc; - stroke: #004455; +.release-cycle-chart .release-cycle-version-label { + fill: var(--color-foreground-primary); } -#python-release-cycle .mermaid .section0, -#python-release-cycle .mermaid .section2 { - fill: darkgrey; +.release-cycle-chart .release-cycle-blob { + stroke-width: 1.6px; + /* default colours, overriden below for individual statuses */ + fill: var(--color-background-primary); + stroke: var(--color-foreground-primary); } -/* Set master colours */ -:root { - --mermaid-section1-3: white; - --mermaid-text-color: black; +.release-cycle-chart .release-cycle-blob-label { + /* white looks good on both light & dark */ + fill: white; + filter: + drop-shadow(1px 1px 0.5px rgba(0, 0, 0, 0.5)) + drop-shadow(-1px 1px 0.5px rgba(0, 0, 0, 0.5)) + drop-shadow(1px -1px 0.5px rgba(0, 0, 0, 0.5)) + drop-shadow(-1px -1px 0.5px rgba(0, 0, 0, 0.5)) + ; } -@media (prefers-color-scheme: dark) { - body[data-theme=auto] { - --mermaid-section1-3: black; - --mermaid-text-color: #ffffffcc; - } +.release-cycle-chart .release-cycle-blob-end-of-life { + fill: #DD2200; + stroke: #FF8888; } -body[data-theme=dark] { - --mermaid-section1-3: black; - --mermaid-text-color: #ffffffcc; + +.release-cycle-chart .release-cycle-blob-security { + fill: #FFDD44; + stroke: #FF8800; } -#python-release-cycle .mermaid .section1, -#python-release-cycle .mermaid .section3 { - fill: var(--mermaid-section1-3); +.release-cycle-chart .release-cycle-blob-bugfix { + fill: #00DD22; + stroke: #008844; } -#python-release-cycle .mermaid .grid .tick text, -#python-release-cycle .mermaid .sectionTitle0, -#python-release-cycle .mermaid .sectionTitle1, -#python-release-cycle .mermaid .sectionTitle2, -#python-release-cycle .mermaid .sectionTitle3, -#python-release-cycle .mermaid .taskTextOutside0, -#python-release-cycle .mermaid .taskTextOutside1, -#python-release-cycle .mermaid .taskTextOutside2, -#python-release-cycle .mermaid .taskTextOutside3, -#python-release-cycle .mermaid .titleText { - fill: var(--mermaid-text-color); +.release-cycle-chart .release-cycle-blob-feature { + fill: #2222EE; + stroke: #008888; } diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index 7e9e69ad83..b7b57d6c76 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -1,28 +1,11 @@ -"""Read in a JSON and generate two CSVs and a Mermaid file.""" +"""Read in a JSON and generate two CSVs and a SVG file.""" from __future__ import annotations import csv import datetime as dt import json -MERMAID_HEADER = """ -gantt - dateFormat YYYY-MM-DD - title Python release cycle - axisFormat %Y -""".lstrip() - -MERMAID_SECTION = """ - section Python {version} - {release_status} :{mermaid_status} python{version}, {first_release},{eol} -""" # noqa: E501 - -MERMAID_STATUS_MAPPING = { - "feature": "", - "bugfix": "active,", - "security": "done,", - "end-of-life": "crit,", -} +import jinja2 def csv_date(date_str: str, now_str: str) -> str: @@ -32,24 +15,27 @@ def csv_date(date_str: str, now_str: str) -> str: return f"*{date_str}*" return date_str - -def mermaid_date(date_str: str) -> str: - """Format a date for Mermaid.""" +def parse_date(date_str: str) -> dt.date: if len(date_str) == len("yyyy-mm"): - # Mermaid needs a full yyyy-mm-dd, so let's approximate - date_str = f"{date_str}-01" - return date_str - + # We need a full yyyy-mm-dd, so let's approximate + return dt.date.fromisoformat(date_str + '-01') + return dt.date.fromisoformat(date_str) class Versions: - """For converting JSON to CSV and Mermaid.""" + """For converting JSON to CSV and SVG.""" def __init__(self) -> None: with open("include/release-cycle.json", encoding="UTF-8") as in_file: self.versions = json.load(in_file) + + # Generate a few additional fields + for key, version in self.versions.items(): + version['key'] = key + version['first_release_date'] = parse_date(version['first_release']) + version['end_of_life_date'] = parse_date(version['end_of_life']) self.sorted_versions = sorted( - self.versions.items(), - key=lambda k: [int(i) for i in k[0].split(".")], + self.versions.values(), + key=lambda v: [int(i) for i in v['key'].split(".")], reverse=True, ) @@ -59,7 +45,7 @@ def write_csv(self) -> None: versions_by_category = {"branches": {}, "end-of-life": {}} headers = None - for version, details in self.sorted_versions: + for details in self.sorted_versions: row = { "Branch": details["branch"], "Schedule": f":pep:`{details['pep']}`", @@ -70,7 +56,7 @@ def write_csv(self) -> None: } headers = row.keys() cat = "end-of-life" if details["status"] == "end-of-life" else "branches" - versions_by_category[cat][version] = row + versions_by_category[cat][details['key']] = row for cat, versions in versions_by_category.items(): with open(f"include/{cat}.csv", "w", encoding="UTF-8", newline="") as file: @@ -78,30 +64,76 @@ def write_csv(self) -> None: csv_file.writeheader() csv_file.writerows(versions.values()) - def write_mermaid(self) -> None: - """Output Mermaid file.""" - out = [MERMAID_HEADER] + def write_svg(self) -> None: + """Output SVG file.""" + env = jinja2.Environment( + loader=jinja2.FileSystemLoader('_tools/'), + autoescape=True, + undefined=jinja2.StrictUndefined, + ) + template = env.get_template("release_cycle_template.svg") + + # Scale. Should be roughly the pixel size of the font. + # All later sizes are miltiplied by this, so you can think of all other + # numbers being multiples of the font size, like using `em` units in + # CSS. + # (Ideally we'd actually use `em` units, but SVG viewBox doesn't take + # those.) + SCALE = 18 + + # Width of the drawing and main parts + DIAGRAM_WIDTH = 46 + LEGEND_WIDTH = 7 + RIGHT_MARGIN = 0.5 + + # Height of one line. If you change this you'll need to tweak + # some positioning nombers in the template as well. + LINE_HEIGHT = 1.5 + + first_date = min( + ver['first_release_date'] for ver in self.sorted_versions + ) + last_date = max( + ver['end_of_life_date'] for ver in self.sorted_versions + ) + + def date_to_x(date): + """Convert datetime.date to a SVG X coordinate""" + num_days = (date - first_date).days + total_days = (last_date - first_date).days + ratio = num_days / total_days + x = ratio * (DIAGRAM_WIDTH - LEGEND_WIDTH - RIGHT_MARGIN) + return x + LEGEND_WIDTH + + def year_to_x(year): + """Convert year number to a SVG X coordinate of 1st January""" + return date_to_x(dt.date(year, 1, 1)) - for version, details in reversed(self.versions.items()): - v = MERMAID_SECTION.format( - version=version, - first_release=details["first_release"], - eol=mermaid_date(details["end_of_life"]), - release_status=details["status"], - mermaid_status=MERMAID_STATUS_MAPPING[details["status"]], - ) - out.append(v) + def format_year(year): + """Format year number for display""" + return f"'{year % 100:02}" with open( - "include/release-cycle.mmd", "w", encoding="UTF-8", newline="\n" + "include/release-cycle.svg", "w", encoding="UTF-8", ) as f: - f.writelines(out) + template.stream( + SCALE=SCALE, + diagram_width=DIAGRAM_WIDTH, + diagram_height=(len(self.sorted_versions) + 2) * LINE_HEIGHT, + years=range(first_date.year, last_date.year), + LINE_HEIGHT=LINE_HEIGHT, + versions=list(reversed(self.sorted_versions)), + today=dt.date.today(), + year_to_x=year_to_x, + date_to_x=date_to_x, + format_year=format_year, + ).dump(f) def main() -> None: versions = Versions() versions.write_csv() - versions.write_mermaid() + versions.write_svg() if __name__ == "__main__": diff --git a/_tools/release_cycle_template.svg b/_tools/release_cycle_template.svg new file mode 100644 index 0000000000..803fc4623d --- /dev/null +++ b/_tools/release_cycle_template.svg @@ -0,0 +1,89 @@ + + + + {% for version in versions %} + {% set y = loop.index * LINE_HEIGHT %} + + {% if loop.index % 2 %} + + + {% endif %} + {% endfor %} + + {% for year in years %} + + {{ format_year(year) }} + + + {% endfor %} + + + + + {% for version in versions %} + {% set y = loop.index * LINE_HEIGHT %} + + + + Python {{version.key}} + + + + {% set start_x = date_to_x(version.first_release_date) %} + {% set end_x = date_to_x(version.end_of_life_date) %} + {% set mid_x = (start_x + end_x) / 2 %} + + + {{version.status}} + + {% endfor %} + diff --git a/conf.py b/conf.py index 29563db509..849538be72 100644 --- a/conf.py +++ b/conf.py @@ -10,7 +10,6 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx_copybutton', - 'sphinxcontrib.mermaid', 'sphinxext.opengraph', 'sphinxext.rediraffe', ] diff --git a/include/release-cycle.mmd b/include/release-cycle.mmd deleted file mode 100644 index fc437ab590..0000000000 --- a/include/release-cycle.mmd +++ /dev/null @@ -1,49 +0,0 @@ -gantt - dateFormat YYYY-MM-DD - title Python release cycle - axisFormat %Y - - section Python 2.6 - end-of-life :crit, python2.6, 2008-10-01,2013-10-29 - - section Python 3.0 - end-of-life :crit, python3.0, 2008-12-03,2009-06-27 - - section Python 3.1 - end-of-life :crit, python3.1, 2009-06-27,2012-04-09 - - section Python 2.7 - end-of-life :crit, python2.7, 2010-07-03,2020-01-01 - - section Python 3.2 - end-of-life :crit, python3.2, 2011-02-20,2016-02-20 - - section Python 3.3 - end-of-life :crit, python3.3, 2012-09-29,2017-09-29 - - section Python 3.4 - end-of-life :crit, python3.4, 2014-03-16,2019-03-18 - - section Python 3.5 - end-of-life :crit, python3.5, 2015-09-13,2020-09-30 - - section Python 3.6 - end-of-life :crit, python3.6, 2016-12-23,2021-12-23 - - section Python 3.7 - security :done, python3.7, 2018-06-27,2023-06-27 - - section Python 3.8 - security :done, python3.8, 2019-10-14,2024-10-01 - - section Python 3.9 - security :done, python3.9, 2020-10-05,2025-10-01 - - section Python 3.10 - bugfix :active, python3.10, 2021-10-04,2026-10-01 - - section Python 3.11 - bugfix :active, python3.11, 2022-10-24,2027-10-01 - - section Python 3.12 - feature : python3.12, 2023-10-02,2028-10-01 diff --git a/include/release-cycle.svg b/include/release-cycle.svg new file mode 100644 index 0000000000..53714a1651 --- /dev/null +++ b/include/release-cycle.svg @@ -0,0 +1,1040 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '08 + + + + + '09 + + + + + '10 + + + + + '11 + + + + + '12 + + + + + '13 + + + + + '14 + + + + + '15 + + + + + '16 + + + + + '17 + + + + + '18 + + + + + '19 + + + + + '20 + + + + + '21 + + + + + '22 + + + + + '23 + + + + + '24 + + + + + '25 + + + + + '26 + + + + + '27 + + + + + + + + + + + + + Python 2.6 + + + + + + + + + end-of-life + + + + + + + Python 2.7 + + + + + + + + + end-of-life + + + + + + + Python 3.0 + + + + + + + + + end-of-life + + + + + + + Python 3.1 + + + + + + + + + end-of-life + + + + + + + Python 3.2 + + + + + + + + + end-of-life + + + + + + + Python 3.3 + + + + + + + + + end-of-life + + + + + + + Python 3.4 + + + + + + + + + end-of-life + + + + + + + Python 3.5 + + + + + + + + + end-of-life + + + + + + + Python 3.6 + + + + + + + + + end-of-life + + + + + + + Python 3.7 + + + + + + + + + security + + + + + + + Python 3.8 + + + + + + + + + security + + + + + + + Python 3.9 + + + + + + + + + security + + + + + + + Python 3.10 + + + + + + + + + bugfix + + + + + + + Python 3.11 + + + + + + + + + bugfix + + + + + + + Python 3.12 + + + + + + + + + feature + + + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 3370b57dab..8c3008cf17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ Sphinx==6.0.0 furo>=2022.6.4 sphinx-lint==0.6.7 sphinx_copybutton>=0.3.3 -sphinxcontrib-mermaid sphinxext-opengraph>=0.7.1 sphinxext-rediraffe +jinja2 diff --git a/versions.rst b/versions.rst index c36f7e6725..fd28b3f85d 100644 --- a/versions.rst +++ b/versions.rst @@ -13,8 +13,8 @@ version can be found on the `download page `_ Python Release Cycle ==================== -.. mermaid:: include/release-cycle.mmd - +.. raw:: html + :file: include/release-cycle.svg Supported Versions ================== @@ -55,16 +55,3 @@ See also the :ref:`devcycle` page for more information about branches. By default, the end-of-life is scheduled 5 years after the first release, but can be adjusted by the release manager of each branch. All Python 2 versions have reached end-of-life. - -.. raw:: html - - From dfc51edcf0d40ba35cc1d01c2759af3256a3c802 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 20 Jan 2023 00:24:44 +0100 Subject: [PATCH 02/20] Install jinja on GH Actions --- .github/workflows/release-cycle.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 8b676d78a4..42d9bd274f 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -19,6 +19,10 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3" + cache: pip + + - name: Install Jinja + run: python -m pip install jinja2 - name: Generate release cycle output run: python -I -bb -X dev -X warn_default_encoding -W error _tools/generate_release_cycle.py From 9211356adc083624b93ceaaebc75e8063500da5e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 20 Jan 2023 00:27:05 +0100 Subject: [PATCH 03/20] GHA: Ignore release-cycle.svg, which encodes the current date --- .github/workflows/release-cycle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 42d9bd274f..f213ece65e 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -27,6 +27,9 @@ jobs: - name: Generate release cycle output run: python -I -bb -X dev -X warn_default_encoding -W error _tools/generate_release_cycle.py + - name: Ignore release-cycle.svg, which encodes the current date + run: git restore include/release-cycle.svg + - name: Check for differences run: | git add . From ae1184ee88855b79adb735fea005949891ca52cb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:11:42 +0200 Subject: [PATCH 04/20] Apply suggestions from code review Co-authored-by: C.A.M. Gerlach --- .github/workflows/release-cycle.yml | 1 + _tools/generate_release_cycle.py | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index f213ece65e..8458593b3b 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -20,6 +20,7 @@ jobs: with: python-version: "3" cache: pip + cache-dependency-path: .github/workflows/release-cycle.yml - name: Install Jinja run: python -m pip install jinja2 diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index b7b57d6c76..afef85fc5b 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -1,4 +1,4 @@ -"""Read in a JSON and generate two CSVs and a SVG file.""" +"""Read in a JSON and generate two CSVs and an SVG file.""" from __future__ import annotations import csv @@ -69,6 +69,8 @@ def write_svg(self) -> None: env = jinja2.Environment( loader=jinja2.FileSystemLoader('_tools/'), autoescape=True, + lstrip_blocks=True, + trim_blocks=True, undefined=jinja2.StrictUndefined, ) template = env.get_template("release_cycle_template.svg") @@ -87,7 +89,7 @@ def write_svg(self) -> None: RIGHT_MARGIN = 0.5 # Height of one line. If you change this you'll need to tweak - # some positioning nombers in the template as well. + # some positioning numbers in the template as well. LINE_HEIGHT = 1.5 first_date = min( @@ -98,23 +100,24 @@ def write_svg(self) -> None: ) def date_to_x(date): - """Convert datetime.date to a SVG X coordinate""" + def date_to_x(date: dt.date) -> float: + """Convert datetime.date to an SVG X coordinate""" num_days = (date - first_date).days total_days = (last_date - first_date).days ratio = num_days / total_days x = ratio * (DIAGRAM_WIDTH - LEGEND_WIDTH - RIGHT_MARGIN) return x + LEGEND_WIDTH - def year_to_x(year): - """Convert year number to a SVG X coordinate of 1st January""" + def year_to_x(year: int) -> float: + """Convert year number to an SVG X coordinate of 1st January""" return date_to_x(dt.date(year, 1, 1)) - def format_year(year): + def format_year(year: int) -> str: """Format year number for display""" return f"'{year % 100:02}" with open( - "include/release-cycle.svg", "w", encoding="UTF-8", + "include/release-cycle.svg", "w", encoding="UTF-8", newline="\n" ) as f: template.stream( SCALE=SCALE, From cfbaa83eecd3c1b8fd16c1248327a6bc9e2edfb9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:14:10 +0200 Subject: [PATCH 05/20] Remove .gitattributes for transparency of CSV/SVG changes --- .gitattributes | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index a0759e59e0..0000000000 --- a/.gitattributes +++ /dev/null @@ -1,11 +0,0 @@ -# Generated files -# https://github.com/github/linguist/blob/master/docs/overrides.md -# -# To always hide generated files in local diffs, mark them as binary: -# $ git config diff.generated.binary true -# -[attr]generated linguist-generated=true diff=generated - -include/release-cycle.svg generated -include/branches.csv generated -include/end-of-life.csv generated From 36fb09f79bedb28cd3d79275c3a8e3c7232c327b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:23:02 +0200 Subject: [PATCH 06/20] Sort --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8c3008cf17..d9e6a324a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ Sphinx==6.0.0 furo>=2022.6.4 +jinja2 sphinx-lint==0.6.7 sphinx_copybutton>=0.3.3 sphinxext-opengraph>=0.7.1 sphinxext-rediraffe -jinja2 From 46d1181a0eed27b8ecfdcfb82988ebf6560cc20f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:23:29 +0200 Subject: [PATCH 07/20] Fix code suggestion application --- _tools/generate_release_cycle.py | 1 - 1 file changed, 1 deletion(-) diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index afef85fc5b..6e9b5ec7c2 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -99,7 +99,6 @@ def write_svg(self) -> None: ver['end_of_life_date'] for ver in self.sorted_versions ) - def date_to_x(date): def date_to_x(date: dt.date) -> float: """Convert datetime.date to an SVG X coordinate""" num_days = (date - first_date).days From 3fc6c6907957e916e19daea3a6e2a038e19e8df3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:23:42 +0200 Subject: [PATCH 08/20] Re-format with Black --- _tools/generate_release_cycle.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index 6e9b5ec7c2..b7ca3940b3 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -15,12 +15,14 @@ def csv_date(date_str: str, now_str: str) -> str: return f"*{date_str}*" return date_str + def parse_date(date_str: str) -> dt.date: if len(date_str) == len("yyyy-mm"): # We need a full yyyy-mm-dd, so let's approximate - return dt.date.fromisoformat(date_str + '-01') + return dt.date.fromisoformat(date_str + "-01") return dt.date.fromisoformat(date_str) + class Versions: """For converting JSON to CSV and SVG.""" @@ -30,12 +32,12 @@ def __init__(self) -> None: # Generate a few additional fields for key, version in self.versions.items(): - version['key'] = key - version['first_release_date'] = parse_date(version['first_release']) - version['end_of_life_date'] = parse_date(version['end_of_life']) + version["key"] = key + version["first_release_date"] = parse_date(version["first_release"]) + version["end_of_life_date"] = parse_date(version["end_of_life"]) self.sorted_versions = sorted( self.versions.values(), - key=lambda v: [int(i) for i in v['key'].split(".")], + key=lambda v: [int(i) for i in v["key"].split(".")], reverse=True, ) @@ -56,7 +58,7 @@ def write_csv(self) -> None: } headers = row.keys() cat = "end-of-life" if details["status"] == "end-of-life" else "branches" - versions_by_category[cat][details['key']] = row + versions_by_category[cat][details["key"]] = row for cat, versions in versions_by_category.items(): with open(f"include/{cat}.csv", "w", encoding="UTF-8", newline="") as file: @@ -67,7 +69,7 @@ def write_csv(self) -> None: def write_svg(self) -> None: """Output SVG file.""" env = jinja2.Environment( - loader=jinja2.FileSystemLoader('_tools/'), + loader=jinja2.FileSystemLoader("_tools/"), autoescape=True, lstrip_blocks=True, trim_blocks=True, @@ -92,12 +94,8 @@ def write_svg(self) -> None: # some positioning numbers in the template as well. LINE_HEIGHT = 1.5 - first_date = min( - ver['first_release_date'] for ver in self.sorted_versions - ) - last_date = max( - ver['end_of_life_date'] for ver in self.sorted_versions - ) + first_date = min(ver["first_release_date"] for ver in self.sorted_versions) + last_date = max(ver["end_of_life_date"] for ver in self.sorted_versions) def date_to_x(date: dt.date) -> float: """Convert datetime.date to an SVG X coordinate""" From d5401afe40d57dcd56e322fd230eee46ed2bcebe Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:30:08 +0200 Subject: [PATCH 09/20] Newlines --- include/release-cycle.svg | 155 +------------------------------------- 1 file changed, 2 insertions(+), 153 deletions(-) diff --git a/include/release-cycle.svg b/include/release-cycle.svg index 53714a1651..1839d1cf63 100644 --- a/include/release-cycle.svg +++ b/include/release-cycle.svg @@ -5,10 +5,7 @@ viewBox="0 0 828 459.0" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - end-of-life - - - - - security - - - - - security - - - - - security - - - - - bugfix - - - - - bugfix - - - - - feature - \ No newline at end of file From 0621b28bedfe80d83e1311b20dd874edd947131f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:31:32 +0200 Subject: [PATCH 10/20] Move 'today' line to front --- _tools/release_cycle_template.svg | 20 ++++++++++---------- include/release-cycle.svg | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/_tools/release_cycle_template.svg b/_tools/release_cycle_template.svg index 803fc4623d..f5025b6978 100644 --- a/_tools/release_cycle_template.svg +++ b/_tools/release_cycle_template.svg @@ -40,16 +40,6 @@ /> {% endfor %} - - - {% for version in versions %} {% set y = loop.index * LINE_HEIGHT %} @@ -86,4 +76,14 @@ {{version.status}} {% endfor %} + + + diff --git a/include/release-cycle.svg b/include/release-cycle.svg index 1839d1cf63..1454a439a0 100644 --- a/include/release-cycle.svg +++ b/include/release-cycle.svg @@ -426,16 +426,6 @@ font-size="18" /> - - - feature + + + \ No newline at end of file From ceb4034e30ba6b9f9ef4358da54d31f8df1f4e65 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 12:46:42 +0200 Subject: [PATCH 11/20] Rename template to .svg.jinja --- _tools/generate_release_cycle.py | 4 ++-- ...se_cycle_template.svg => release_cycle_template.svg.jinja} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename _tools/{release_cycle_template.svg => release_cycle_template.svg.jinja} (100%) diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index b7ca3940b3..f0131dc087 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -75,10 +75,10 @@ def write_svg(self) -> None: trim_blocks=True, undefined=jinja2.StrictUndefined, ) - template = env.get_template("release_cycle_template.svg") + template = env.get_template("release_cycle_template.svg.jinja") # Scale. Should be roughly the pixel size of the font. - # All later sizes are miltiplied by this, so you can think of all other + # All later sizes are multiplied by this, so you can think of all other # numbers being multiples of the font size, like using `em` units in # CSS. # (Ideally we'd actually use `em` units, but SVG viewBox doesn't take diff --git a/_tools/release_cycle_template.svg b/_tools/release_cycle_template.svg.jinja similarity index 100% rename from _tools/release_cycle_template.svg rename to _tools/release_cycle_template.svg.jinja From b163ac4faf73422a6e8b7ff20d7eaf45e4d63d04 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 14:01:35 +0200 Subject: [PATCH 12/20] Override today for testing with reproducible output --- .github/workflows/release-cycle.yml | 5 +---- _tools/generate_release_cycle.py | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 8458593b3b..0b71ed368b 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -26,10 +26,7 @@ jobs: run: python -m pip install jinja2 - name: Generate release cycle output - run: python -I -bb -X dev -X warn_default_encoding -W error _tools/generate_release_cycle.py - - - name: Ignore release-cycle.svg, which encodes the current date - run: git restore include/release-cycle.svg + run: python -I -bb -X dev -X warn_default_encoding -W error _tools/generate_release_cycle.py --today 2023-01-21 - name: Check for differences run: | diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index f0131dc087..69d9f8f4b0 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -1,6 +1,7 @@ """Read in a JSON and generate two CSVs and an SVG file.""" from __future__ import annotations +import argparse import csv import datetime as dt import json @@ -66,7 +67,7 @@ def write_csv(self) -> None: csv_file.writeheader() csv_file.writerows(versions.values()) - def write_svg(self) -> None: + def write_svg(self, today: str) -> None: """Output SVG file.""" env = jinja2.Environment( loader=jinja2.FileSystemLoader("_tools/"), @@ -123,7 +124,7 @@ def format_year(year: int) -> str: years=range(first_date.year, last_date.year), LINE_HEIGHT=LINE_HEIGHT, versions=list(reversed(self.sorted_versions)), - today=dt.date.today(), + today=dt.datetime.strptime(today, "%Y-%m-%d").date(), year_to_x=year_to_x, date_to_x=date_to_x, format_year=format_year, @@ -131,9 +132,20 @@ def format_year(year: int) -> str: def main() -> None: + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + parser.add_argument( + "--today", + default=str(dt.date.today()), + metavar=" YYYY-MM-DD", + help="Override today for testing", + ) + args = parser.parse_args() + versions = Versions() versions.write_csv() - versions.write_svg() + versions.write_svg(args.today) if __name__ == "__main__": From cee0046d155b390abdb57ba2d83fb97430a774d4 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 14:27:00 +0200 Subject: [PATCH 13/20] Use black for labels on lighter backgrounds --- _static/devguide_overrides.css | 20 ++++++++--------- _tools/release_cycle_template.svg.jinja | 2 +- include/release-cycle.svg | 30 ++++++++++++------------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/_static/devguide_overrides.css b/_static/devguide_overrides.css index 27929e36f0..c93edba1f6 100644 --- a/_static/devguide_overrides.css +++ b/_static/devguide_overrides.css @@ -47,30 +47,30 @@ .release-cycle-chart .release-cycle-blob-label { /* white looks good on both light & dark */ fill: white; - filter: - drop-shadow(1px 1px 0.5px rgba(0, 0, 0, 0.5)) - drop-shadow(-1px 1px 0.5px rgba(0, 0, 0, 0.5)) - drop-shadow(1px -1px 0.5px rgba(0, 0, 0, 0.5)) - drop-shadow(-1px -1px 0.5px rgba(0, 0, 0, 0.5)) - ; } -.release-cycle-chart .release-cycle-blob-end-of-life { +.release-cycle-chart .release-cycle-blob-label.release-cycle-blob-security, +.release-cycle-chart .release-cycle-blob-label.release-cycle-blob-bugfix { + /* but use black to improve contrast for lighter backgrounds */ + fill: black; +} + +.release-cycle-chart .release-cycle-blob.release-cycle-blob-end-of-life { fill: #DD2200; stroke: #FF8888; } -.release-cycle-chart .release-cycle-blob-security { +.release-cycle-chart .release-cycle-blob.release-cycle-blob-security { fill: #FFDD44; stroke: #FF8800; } -.release-cycle-chart .release-cycle-blob-bugfix { +.release-cycle-chart .release-cycle-blob.release-cycle-blob-bugfix { fill: #00DD22; stroke: #008844; } -.release-cycle-chart .release-cycle-blob-feature { +.release-cycle-chart .release-cycle-blob.release-cycle-blob-feature { fill: #2222EE; stroke: #008888; } diff --git a/_tools/release_cycle_template.svg.jinja b/_tools/release_cycle_template.svg.jinja index f5025b6978..a109de9634 100644 --- a/_tools/release_cycle_template.svg.jinja +++ b/_tools/release_cycle_template.svg.jinja @@ -67,7 +67,7 @@ ry="0.25em" /> Date: Sun, 22 Jan 2023 18:51:36 +0200 Subject: [PATCH 14/20] Remove commented CSS --- _static/devguide_overrides.css | 1 - 1 file changed, 1 deletion(-) diff --git a/_static/devguide_overrides.css b/_static/devguide_overrides.css index c93edba1f6..a93acbbff6 100644 --- a/_static/devguide_overrides.css +++ b/_static/devguide_overrides.css @@ -10,7 +10,6 @@ .release-cycle-chart { width: 100%; - /* filter: grayscale(100%); */ } .release-cycle-chart .release-cycle-year-line { From c747042385dd3747ee57d8d501131d6f12f0b4e3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 19:03:31 +0200 Subject: [PATCH 15/20] Extra whitespace inside template expressions --- _tools/release_cycle_template.svg.jinja | 58 ++++++++++++------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/_tools/release_cycle_template.svg.jinja b/_tools/release_cycle_template.svg.jinja index a109de9634..86082f88c7 100644 --- a/_tools/release_cycle_template.svg.jinja +++ b/_tools/release_cycle_template.svg.jinja @@ -2,7 +2,7 @@ {% for version in versions %} @@ -13,9 +13,9 @@ {% endif %} {% endfor %} @@ -23,20 +23,20 @@ {% for year in years %} {{ format_year(year) }} {% endfor %} @@ -46,11 +46,11 @@ - Python {{version.key}} + Python {{ version.key }} @@ -58,32 +58,32 @@ {% set end_x = date_to_x(version.end_of_life_date) %} {% set mid_x = (start_x + end_x) / 2 %} - {{version.status}} + {{ version.status }} {% endfor %} From ceb57918d0c87db89b976fb20ebbb1db356e8285 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 19:11:00 +0200 Subject: [PATCH 16/20] Include final year on x axis but no extra vertical line --- _tools/generate_release_cycle.py | 2 +- _tools/release_cycle_template.svg.jinja | 2 ++ include/release-cycle.svg | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index 69d9f8f4b0..59e9fcbbec 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -121,7 +121,7 @@ def format_year(year: int) -> str: SCALE=SCALE, diagram_width=DIAGRAM_WIDTH, diagram_height=(len(self.sorted_versions) + 2) * LINE_HEIGHT, - years=range(first_date.year, last_date.year), + years=range(first_date.year, last_date.year + 1), LINE_HEIGHT=LINE_HEIGHT, versions=list(reversed(self.sorted_versions)), today=dt.datetime.strptime(today, "%Y-%m-%d").date(), diff --git a/_tools/release_cycle_template.svg.jinja b/_tools/release_cycle_template.svg.jinja index 86082f88c7..5d39d307a5 100644 --- a/_tools/release_cycle_template.svg.jinja +++ b/_tools/release_cycle_template.svg.jinja @@ -30,6 +30,7 @@ > {{ format_year(year) }} + {% if not loop.last %} + {% endif %} {% endfor %} {% for version in versions %} diff --git a/include/release-cycle.svg b/include/release-cycle.svg index 6afa9ff97a..9253a93143 100644 --- a/include/release-cycle.svg +++ b/include/release-cycle.svg @@ -425,6 +425,15 @@ y2="432.0" font-size="18" /> + + '28 + From 9830ad70b134ebee6500d1faf6ff0be940799b7d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 21:51:57 +0200 Subject: [PATCH 17/20] Silence Windows warnings --- .github/workflows/release-cycle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml index 0b71ed368b..8aaa7bfaf4 100644 --- a/.github/workflows/release-cycle.yml +++ b/.github/workflows/release-cycle.yml @@ -14,6 +14,9 @@ jobs: os: [windows-latest, ubuntu-latest] steps: + - name: Silence Windows warnings + run: git config --global core.autocrlf input + - uses: actions/checkout@v3 - uses: actions/setup-python@v4 From 59c2bbcb716ab22389951f8bbf875bfa89c97f82 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 22 Jan 2023 23:38:40 +0200 Subject: [PATCH 18/20] Generate release cycle SVG during deploy --- .gitignore | 9 +- Makefile | 10 +- include/release-cycle.svg | 898 -------------------------------------- 3 files changed, 9 insertions(+), 908 deletions(-) delete mode 100644 include/release-cycle.svg diff --git a/.gitignore b/.gitignore index c74e78d0fa..c07e6286d0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ __pycache__/ # Distribution / packaging .Python env/ +ENV/ venv/ build/ develop-eggs/ @@ -80,13 +81,11 @@ celerybeat-schedule # dotenv .env -# virtualenv -venv/ -ENV/ -venv/ - # Spyder project settings .spyderproject # Rope project settings .ropeproject + +# Generated SVG file +include/release-cycle.svg diff --git a/Makefile b/Makefile index 995d0c87c2..d86ebf5336 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ html: ensure-venv versions @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml -dirhtml: ensure-venv +dirhtml: ensure-venv versions $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." @@ -189,14 +189,14 @@ serve: "(see https://github.com/python/cpython/issues/80510)" include/branches.csv: include/release-cycle.json - $(PYTHON) _tools/generate_release_cycle.py + $(VENVDIR)/bin/python3 _tools/generate_release_cycle.py include/end-of-life.csv: include/release-cycle.json - $(PYTHON) _tools/generate_release_cycle.py + $(VENVDIR)/bin/python3 _tools/generate_release_cycle.py include/release-cycle.svg: include/release-cycle.json - $(PYTHON) _tools/generate_release_cycle.py + $(VENVDIR)/bin/python3 _tools/generate_release_cycle.py .PHONY: versions -versions: include/branches.csv include/end-of-life.csv include/release-cycle.svg +versions: venv include/branches.csv include/end-of-life.csv include/release-cycle.svg @echo Release cycle data generated. diff --git a/include/release-cycle.svg b/include/release-cycle.svg deleted file mode 100644 index 9253a93143..0000000000 --- a/include/release-cycle.svg +++ /dev/null @@ -1,898 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '08 - - - - '09 - - - - '10 - - - - '11 - - - - '12 - - - - '13 - - - - '14 - - - - '15 - - - - '16 - - - - '17 - - - - '18 - - - - '19 - - - - '20 - - - - '21 - - - - '22 - - - - '23 - - - - '24 - - - - '25 - - - - '26 - - - - '27 - - - - '28 - - - - - - Python 2.6 - - - - - - end-of-life - - - - - Python 2.7 - - - - - - end-of-life - - - - - Python 3.0 - - - - - - end-of-life - - - - - Python 3.1 - - - - - - end-of-life - - - - - Python 3.2 - - - - - - end-of-life - - - - - Python 3.3 - - - - - - end-of-life - - - - - Python 3.4 - - - - - - end-of-life - - - - - Python 3.5 - - - - - - end-of-life - - - - - Python 3.6 - - - - - - end-of-life - - - - - Python 3.7 - - - - - - security - - - - - Python 3.8 - - - - - - security - - - - - Python 3.9 - - - - - - security - - - - - Python 3.10 - - - - - - bugfix - - - - - Python 3.11 - - - - - - bugfix - - - - - Python 3.12 - - - - - - feature - - - - - \ No newline at end of file From 67099adf68b94e651f4627cd98d952f1113d84b8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 30 Jan 2023 17:29:01 +0200 Subject: [PATCH 19/20] Generate release cycle CSVs during deploy --- .gitignore | 4 +++- include/branches.csv | 7 ------- include/end-of-life.csv | 10 ---------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 include/branches.csv delete mode 100644 include/end-of-life.csv diff --git a/.gitignore b/.gitignore index c07e6286d0..df4dc9415a 100644 --- a/.gitignore +++ b/.gitignore @@ -87,5 +87,7 @@ celerybeat-schedule # Rope project settings .ropeproject -# Generated SVG file +# Generated CSV and SVG files +include/branches.csv +include/end-of-life.csv include/release-cycle.svg diff --git a/include/branches.csv b/include/branches.csv deleted file mode 100644 index bfec9da84b..0000000000 --- a/include/branches.csv +++ /dev/null @@ -1,7 +0,0 @@ -Branch,Schedule,Status,First release,End of life,Release manager -main,:pep:`693`,feature,*2023-10-02*,*2028-10*,Thomas Wouters -3.11,:pep:`664`,bugfix,2022-10-24,*2027-10*,Pablo Galindo Salgado -3.10,:pep:`619`,bugfix,2021-10-04,*2026-10*,Pablo Galindo Salgado -3.9,:pep:`596`,security,2020-10-05,*2025-10*,Łukasz Langa -3.8,:pep:`569`,security,2019-10-14,*2024-10*,Łukasz Langa -3.7,:pep:`537`,security,2018-06-27,*2023-06-27*,Ned Deily diff --git a/include/end-of-life.csv b/include/end-of-life.csv deleted file mode 100644 index be9fe1b728..0000000000 --- a/include/end-of-life.csv +++ /dev/null @@ -1,10 +0,0 @@ -Branch,Schedule,Status,First release,End of life,Release manager -3.6,:pep:`494`,end-of-life,2016-12-23,2021-12-23,Ned Deily -3.5,:pep:`478`,end-of-life,2015-09-13,2020-09-30,Larry Hastings -3.4,:pep:`429`,end-of-life,2014-03-16,2019-03-18,Larry Hastings -3.3,:pep:`398`,end-of-life,2012-09-29,2017-09-29,"Georg Brandl, Ned Deily (3.3.7+)" -3.2,:pep:`392`,end-of-life,2011-02-20,2016-02-20,Georg Brandl -3.1,:pep:`375`,end-of-life,2009-06-27,2012-04-09,Benjamin Peterson -3.0,:pep:`361`,end-of-life,2008-12-03,2009-06-27,Barry Warsaw -2.7,:pep:`373`,end-of-life,2010-07-03,2020-01-01,Benjamin Peterson -2.6,:pep:`361`,end-of-life,2008-10-01,2013-10-29,Barry Warsaw From 8413255ccfc419670f188242a65a6e0960996f69 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 31 Jan 2023 15:14:28 +0200 Subject: [PATCH 20/20] Remove redundant workflow --- .github/workflows/release-cycle.yml | 39 ----------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/release-cycle.yml diff --git a/.github/workflows/release-cycle.yml b/.github/workflows/release-cycle.yml deleted file mode 100644 index 8aaa7bfaf4..0000000000 --- a/.github/workflows/release-cycle.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test release cycle - -on: [pull_request, push, workflow_dispatch] - -env: - FORCE_COLOR: 1 - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest, ubuntu-latest] - - steps: - - name: Silence Windows warnings - run: git config --global core.autocrlf input - - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: "3" - cache: pip - cache-dependency-path: .github/workflows/release-cycle.yml - - - name: Install Jinja - run: python -m pip install jinja2 - - - name: Generate release cycle output - run: python -I -bb -X dev -X warn_default_encoding -W error _tools/generate_release_cycle.py --today 2023-01-21 - - - name: Check for differences - run: | - git add . - git status - git diff --staged - test $(git status --porcelain | wc -l) = 0