Skip to content

Commit

Permalink
aestetics
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Jan 2, 2025
1 parent 73ae094 commit 338a020
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,38 @@ This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all

<!-- TEMPLATE BEGIN -->

| Version | Cutoff | Published | End of Life | State |
| Version | Cutoff | Publish | End of Life | State |
|---------|--------|-----------|-------------|-------|
| **stable2407** | &nbsp;&nbsp;2024-04-29 | &nbsp;&nbsp;2024-04-29 | &nbsp;&nbsp;2025-04-29 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407) |
| &nbsp;&nbsp;stable2407-1 | &nbsp;&nbsp;2024-08-14 | &nbsp;&nbsp;2024-08-15 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-1) |
| &nbsp;&nbsp;stable2407-2 | &nbsp;&nbsp;2024-08-28 | &nbsp;&nbsp;2024-09-02 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-2) |
| &nbsp;&nbsp;stable2407-3 | &nbsp;&nbsp;2024-10-10 | &nbsp;&nbsp;2024-10-10 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-3) |
| &nbsp;&nbsp;stable2407-4 | &nbsp;&nbsp;2024-11-11 | &nbsp;&nbsp;2024-11-11 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-4) |
| &nbsp;&nbsp;stable2407-5 | &nbsp;&nbsp;2024-12-02 | &nbsp;&nbsp;2024-12-09 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-5) |
| &nbsp;&nbsp;stable2407-6 | ~2025-01-06 | ~2025-01-09 | | Planned |
| &nbsp;&nbsp;stable2407-7 | ~2025-02-03 | ~2025-02-06 | | Planned |
| &nbsp;&nbsp;stable2407-8 | ~2025-03-03 | ~2025-03-06 | | Planned |
| &nbsp;&nbsp;stable2407-6 | 2025-01-06 | 2025-01-09 | | Planned |
| &nbsp;&nbsp;stable2407-7 | 2025-02-03 | 2025-02-06 | | Planned |
| &nbsp;&nbsp;stable2407-8 | 2025-03-03 | 2025-03-06 | | Planned |
| &nbsp;&nbsp;(2 more) | | | | |
| **stable2409** | &nbsp;&nbsp;2024-09-02 | &nbsp;&nbsp;2024-09-26 | ~2025-09-25 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409) |
| **stable2409** | &nbsp;&nbsp;2024-09-02 | &nbsp;&nbsp;2024-09-26 | 2025-09-25 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409) |
| &nbsp;&nbsp;stable2409-1 | &nbsp;&nbsp;2024-10-21 | &nbsp;&nbsp;2024-10-21 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409-1) |
| &nbsp;&nbsp;stable2409-2 | &nbsp;&nbsp;2024-11-14 | &nbsp;&nbsp;2024-11-14 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409-2) |
| &nbsp;&nbsp;stable2409-3 | ~2024-12-09 | ~2024-12-12 | | Planned |
| &nbsp;&nbsp;stable2409-4 | ~2025-01-13 | ~2025-01-16 | | Planned |
| &nbsp;&nbsp;stable2409-5 | ~2025-02-10 | ~2025-02-13 | | Planned |
| &nbsp;&nbsp;stable2409-3 | 2024-12-09 | 2024-12-12 | | Planned |
| &nbsp;&nbsp;stable2409-4 | 2025-01-13 | 2025-01-16 | | Planned |
| &nbsp;&nbsp;stable2409-5 | 2025-02-10 | 2025-02-13 | | Planned |
| &nbsp;&nbsp;(8 more) | | | | |
| **stable2412** | ~2024-11-06 | &nbsp;&nbsp;2024-12-17 | ~2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) |
| &nbsp;&nbsp;stable2412-1 | ~2025-01-20 | ~2025-01-23 | | Planned |
| &nbsp;&nbsp;stable2412-2 | ~2025-02-17 | ~2025-02-20 | | Planned |
| &nbsp;&nbsp;stable2412-3 | ~2025-03-17 | ~2025-03-20 | | Planned |
| **stable2412** | 2024-11-06 | &nbsp;&nbsp;2024-12-17 | 2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) |
| &nbsp;&nbsp;stable2412-1 | 2025-01-20 | 2025-01-23 | | Planned |
| &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) | | | | |
| **stable2503** | ~2025-02-17 | ~2025-03-31 | ~2026-03-31 | Planned |
| &nbsp;&nbsp;stable2503-1 | ~2025-04-28 | ~2025-05-01 | | Planned |
| &nbsp;&nbsp;stable2503-2 | ~2025-05-26 | ~2025-05-29 | | Planned |
| &nbsp;&nbsp;stable2503-3 | ~2025-06-23 | ~2025-06-26 | | Planned |
| **stable2503** | 2025-02-17 | 2025-03-31 | 2026-03-31 | Planned |
| &nbsp;&nbsp;stable2503-1 | 2025-04-28 | 2025-05-01 | | Planned |
| &nbsp;&nbsp;stable2503-2 | 2025-05-26 | 2025-05-29 | | Planned |
| &nbsp;&nbsp;stable2503-3 | 2025-06-23 | 2025-06-26 | | Planned |
| &nbsp;&nbsp;(10 more) | | | | |

<!-- TEMPLATE END -->

Dates with `~` are estimates.

### Subscribe

Subscribe to the calendar by adding this iCal link to your Google or Apple calendar:
Expand Down
10 changes: 5 additions & 5 deletions scripts/update-readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def format_date(date_info: Any) -> str:
if isinstance(date_info, str):
return '&nbsp;&nbsp;' + date_info
elif 'estimated' in date_info:
return '~' + date_info.get('estimated', 'N/A')
return date_info.get('estimated', 'N/A')
elif 'when' in date_info:
return '&nbsp;&nbsp;' + date_info['when']
return 'N/A'
Expand Down Expand Up @@ -54,12 +54,12 @@ def generate_row(item: Dict[str, Any], is_patch: bool = False, is_recommended: b
f"{cutoff} | { publish } | " \
f"{end_of_life if not is_patch else ''} | {state} |"

def generate_markdown_table(data: Dict[str, Any]) -> str:
def generate_markdown_table(data: Dict[str, Any], max_future_patches=3) -> str:
project_info = data["Polkadot SDK"]
recommended = project_info['recommended']
releases = project_info['releases']

table = "| Version | Cutoff | Published | End of Life | State |\n" \
table = "| Version | Cutoff | Publish | End of Life | State |\n" \
"|---------|--------|-----------|-------------|-------|\n"

for release in releases:
Expand All @@ -74,7 +74,7 @@ def generate_markdown_table(data: Dict[str, Any]) -> str:
is_patch_planned = isinstance(patch['state'], str) and patch['state'].lower() == 'planned'
if is_patch_planned:
future_patches += 1
if future_patches < 4:
if future_patches <= max_future_patches:
table += generate_row(patch, is_patch=True, is_recommended=is_recommended_patch, is_planned=is_patch_planned) + '\n'
else:
table += f"| &nbsp;&nbsp;({len(patches) - i} more) | | | | |\n"
Expand Down Expand Up @@ -103,7 +103,7 @@ def main() -> None:
try:
with open('releases-v1.json', 'r') as file:
json_data = json.load(file)
markdown_table = generate_markdown_table(json_data)
markdown_table = generate_markdown_table(json_data, max_future_patches=3)
update_readme(markdown_table)
except FileNotFoundError:
print("Error: 'releases-v1.json' file not found.")
Expand Down

0 comments on commit 338a020

Please sign in to comment.