Skip to content

Commit

Permalink
Publish 2412-1 and add Gantt chart (#28)
Browse files Browse the repository at this point in the history
- **Add 'just cutoff' and 'just publish' commands**
- **Update and add badges**
- **Publish 2412-1**
- **gantt ftw**

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez authored Feb 3, 2025
1 parent 14b05f6 commit ab8da57
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 10 deletions.
Binary file added .assets/timeline-gantt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion CALENDAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Full untruncated version index.
| &nbsp;&nbsp;stable2409-12 | 2025-09-08 | 2025-09-11 | | Planned |
| &nbsp;&nbsp;stable2409-13 | 2025-10-13 | 2025-10-16 | | Planned |
| **stable2412** | 2024-11-06 | 2024-12-17 | 2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) |
| &nbsp;&nbsp;stable2412-1 | 2025-01-30 | 2025-01-30 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412-1) |
| &nbsp;&nbsp;stable2412-1 | 2025-01-29 | 2025-01-31 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412-1) |
| &nbsp;&nbsp;stable2412-2 | 2025-02-17 | 2025-02-20 | | Planned |
| &nbsp;&nbsp;stable2412-3 | 2025-03-17 | 2025-03-20 | | Planned |
| &nbsp;&nbsp;stable2412-4 | 2025-04-21 | 2025-04-24 | | Planned |
Expand Down
17 changes: 15 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
set quiet

default: venv readme
venv/bin/python3 scripts/update-calendar.py
default: venv readme calendar badges gantt

badges: venv
venv/bin/python3 scripts/update-badges.py

calendar: venv
venv/bin/python3 scripts/update-calendar.py

readme:
venv/bin/python3 scripts/update-readme.py && venv/bin/python3 scripts/update-readme.py --max-patches 99 --output CALENDAR.md

gantt: venv
venv/bin/python3 scripts/update-gantt.py releases-v1.json -o .assets/timeline-gantt.png

venv:
#!/bin/bash

Expand All @@ -16,3 +23,9 @@ venv:
python3 -m venv venv
venv/bin/pip install -r scripts/requirements.txt
fi

publish release date:
python3 scripts/manage.py release publish {{release}} {{date}}

cutoff release date:
python3 scripts/manage.py release cutoff {{release}} {{date}}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Release Registry

[![Current Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-latest.svg)](#)&nbsp;&nbsp;[![Next Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-next.svg)](#)

Single source of truth regarding past and future releases of the Polkadot SDK.

This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all SDK releases and a [JSON schema](./releases-v1.schema.json) to ensure that it is in canonical format.

This Gantt chart shows the released (pink) and planned (grey) releases. The longer bars are the stable releases and the small ones are the patches on top of it.

![](.assets/timeline-gantt.png)

## Calendar

Planned and historic release dates:

<!-- DO NOT EDIT. Run `python3 update-readme.py` instead. -->

<!-- TEMPLATE BEGIN -->
Expand All @@ -25,7 +33,7 @@ This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all
| &nbsp;&nbsp;stable2409-6 | 2025-03-10 | 2025-03-13 | | Planned |
| &nbsp;&nbsp;([2 more past, 7 more planned](CALENDAR.md)) | | | | |
| **stable2412** | 2024-11-06 | 2024-12-17 | 2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) |
| &nbsp;&nbsp;stable2412-1 | 2025-01-30 | 2025-01-30 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412-1) |
| &nbsp;&nbsp;stable2412-1 | 2025-01-29 | 2025-01-31 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412-1) |
| &nbsp;&nbsp;stable2412-2 | 2025-02-17 | 2025-02-20 | | Planned |
| &nbsp;&nbsp;stable2412-3 | 2025-03-17 | 2025-03-20 | | Planned |
| &nbsp;&nbsp;([9 more planned](CALENDAR.md)) | | | | |
Expand Down
8 changes: 4 additions & 4 deletions releases-v1.ics
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ DESCRIPTION:End of Life for stable2412\n\nFull Calendar: https://github.co
END:VEVENT
BEGIN:VEVENT
SUMMARY:stable2412-1 Cutoff
DTSTART;VALUE=DATE:20250130
DTEND;VALUE=DATE:20250131
DTSTART;VALUE=DATE:20250129
DTEND;VALUE=DATE:20250130
DESCRIPTION:Cutoff for stable2412-1 (released)\n\nFull Calendar: https://g
ithub.com/paritytech/release-registry/blob/main/CALENDAR.md#calendar
END:VEVENT
BEGIN:VEVENT
SUMMARY:stable2412-1 Release
DTSTART;VALUE=DATE:20250130
DTEND;VALUE=DATE:20250131
DTSTART;VALUE=DATE:20250131
DTEND;VALUE=DATE:20250201
DESCRIPTION:Release of stable2412-1 (released)\n\nFull Calendar: https://g
ithub.com/paritytech/release-registry/blob/main/CALENDAR.md#calendar
END:VEVENT
Expand Down
4 changes: 2 additions & 2 deletions releases-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@
"patches": [
{
"name": "stable2412-1",
"cutoff": "2025-01-30",
"cutoff": "2025-01-29",
"publish": {
"when": "2025-01-30",
"when": "2025-01-31",
"tag": "polkadot-stable2412-1"
},
"state": "released"
Expand Down
29 changes: 29 additions & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
beautifulsoup4==4.12.3
Brotli==1.1.0
bs4==0.0.2
certifi==2024.8.30
cffi==1.17.0
charset-normalizer==3.3.2
contourpy==1.3.0
cssselect2==0.7.0
cycler==0.12.1
fonttools==4.53.1
html5lib==1.1
icalendar==5.0.13
idna==3.8
kiwisolver==1.4.7
Markdown==3.7
matplotlib==3.9.2
narwhals==1.25.0
numpy==2.1.1
packaging==24.1
pandas==2.2.3
pdf2image==1.17.0
pillow==10.4.0
plotly==6.0.0
pycparser==2.22
pydyf==0.11.0
pyparsing==3.1.4
pyphen==0.16.0
python-dateutil==2.9.0.post0
pytz==2024.1
requests==2.32.3
six==1.16.0
soupsieve==2.6
tinycss2==1.3.0
tzdata==2025.1
urllib3==2.2.2
weasyprint==62.3
webencodings==0.5.1
zopfli==0.2.3
115 changes: 115 additions & 0 deletions scripts/update-gantt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import json
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import datetime, timedelta
import argparse
import sys
from typing import List, Dict, Any

def parse_date(date_info: Any) -> datetime:
if isinstance(date_info, str):
return datetime.fromisoformat(date_info)
elif isinstance(date_info, dict):
date_str = date_info.get('when') or date_info.get('estimated')
return datetime.fromisoformat(date_str) if date_str else None
return None

COLOR_RELEASED_BAR = '#E6007A' # released version
COLOR_RELEASED_PATCH = '#E6007A' # released patch
COLOR_PLANNED_BAR = '#a3a3a3' # planned version
COLOR_PLANNED_PATCH = '#a3a3a3' # planned patch

def process_releases(data: Dict) -> tuple[List[Dict], datetime, datetime]:
tasks = []
min_date = datetime.max
max_date = datetime.min

sdk_data = data.get("Polkadot SDK", {})
releases = sdk_data.get("releases", [])

for release in releases:
name = release['name']
start_date = parse_date(release['publish'])
end_date = parse_date(release['endOfLife'])

if not (start_date and end_date):
continue

min_date = min(min_date, start_date)
max_date = max(max_date, end_date)

tasks.append({
'name': name,
'start': start_date,
'end': end_date,
'color': COLOR_RELEASED_BAR if release['state'] == 'released' else COLOR_PLANNED_BAR
})

for patch in release.get('patches', []):
patch_date = parse_date(patch['publish'])
if not patch_date:
continue

patch_end = patch_date + timedelta(days=7)
max_date = max(max_date, patch_end)

is_planned = isinstance(patch['publish'], dict) and 'estimated' in patch['publish']

tasks.append({
'name': patch['name'].split('-')[1],
'start': patch_date,
'end': patch_end,
'color': COLOR_PLANNED_PATCH if is_planned else COLOR_RELEASED_PATCH
})

return tasks, min_date, max_date

def create_gantt_chart(tasks: List[Dict], min_date: datetime, max_date: datetime, output: str):
fig, ax = plt.subplots(figsize=(15, 8))

# Plot bars
for idx, task in enumerate(tasks):
ax.barh(idx,
(task['end'] - task['start']).days,
left=task['start'],
color=task['color'],
alpha=0.8)

# Customize axis
ax.set_ylim(-0.5, len(tasks) - 0.5)
ax.set_yticks(range(len(tasks)))
ax.set_yticklabels([t['name'] for t in tasks])

# Format dates
ax.xaxis.set_major_locator(mdates.MonthLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m'))
plt.xticks(rotation=45)

# Add grid and title
ax.grid(True, axis='x', alpha=0.3)
ax.set_title('Polkadot SDK Release Timeline', pad=20)

# Adjust layout and save
plt.tight_layout()
plt.savefig(output, dpi=300, bbox_inches='tight')
plt.close()

def main():
parser = argparse.ArgumentParser(description='Generate release timeline Gantt chart')
parser.add_argument('input', help='Input JSON file path')
parser.add_argument('-o', '--output', help='Output PNG file path', default='gantt.png')

args = parser.parse_args()

try:
with open(args.input, 'r') as f:
data = json.load(f)
except Exception as e:
print(f"Error reading input file: {e}", file=sys.stderr)
sys.exit(1)

tasks, min_date, max_date = process_releases(data)
create_gantt_chart(tasks, min_date, max_date, args.output)

if __name__ == '__main__':
main()

0 comments on commit ab8da57

Please sign in to comment.