Skip to content

Commit 507ddf2

Browse files
authored
Change default region for uris (#5616)
* rename accouncements Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com> * change default region to us-west-2 Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com> * readd current releasenotes Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com> * readd current releasenotes Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com> --------- Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
1 parent ee7b33f commit 507ddf2

File tree

10 files changed

+18
-16
lines changed

10 files changed

+18
-16
lines changed

docs/DEVELOPMENT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ______________________________________________________________________
9494
Add these fields to an image config:
9595

9696
```yaml
97-
announcement:
97+
announcements:
9898
- "Introduced containers for PyTorch 2.9"
9999
- "Added Python 3.12 support"
100100
@@ -109,7 +109,7 @@ optional:
109109
- "Description of known issue"
110110
```
111111

112-
Release notes are generated automatically for images with `announcement` and `packages` fields.
112+
Release notes are generated automatically for images with `announcements` and `packages` fields.
113113

114114
### Adding New Optional Sections
115115

@@ -228,4 +228,4 @@ ______________________________________________________________________
228228
| "Display name not found" | Add repository to `display_names` in `global.yml` |
229229
| "Inconsistent dates" | Ensure all images in same framework group/version have identical GA/EOP |
230230
| Images not appearing | Check repository is in `table_order` |
231-
| Release notes not generating | Ensure `announcement` and `packages` fields are present |
231+
| Release notes not generating | Ensure `announcements` and `packages` fields are present |

docs/src/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
TUTORIALS_DIR = DOCS_DIR / "tutorials"
2929

3030
# Release notes configuration
31-
RELEASE_NOTES_REQUIRED_FIELDS = ["announcement", "packages"]
31+
RELEASE_NOTES_REQUIRED_FIELDS = ["announcements", "packages"]
3232
GLOBAL_CONFIG_PATH = SRC_DIR / "global.yml"
3333

3434
AVAILABLE_IMAGES_TABLE_HEADER = "##"

docs/src/data/template/image-template.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ eop: "2026-10-15"
6767
# -----------------------------------------------------------------------------
6868
# Release Notes Fields
6969
# -----------------------------------------------------------------------------
70-
# Required for release notes generation: announcement and packages
70+
# Required for release notes generation: announcements and packages
7171

72-
# Announcement bullet points for the release note
73-
announcement:
72+
# Announcements bullet points for the release note
73+
announcements:
7474
- "Introduced containers for PyTorch 2.9 for Training"
7575
- "Added Python 3.12 support"
7676

docs/src/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _generate_individual_release_note(
5656
framework=img.get("framework"),
5757
version=img.get("version"),
5858
platform_display=img.display_platform,
59-
announcement=img.get("announcement", []),
59+
announcements=img.get("announcements", []),
6060
packages=img.get("packages", {}),
6161
image_uris=img.get_image_uris(),
6262
optional=img.get("optional", {}),

docs/src/global.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ accelerators:
3838

3939
# ECR configuration
4040
example_ecr_account: "763104351884"
41+
example_region: "us-west-2"
4142

4243
# =============================================================================
4344
# Display Names

docs/src/image_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,14 @@ def display_release_note_link(self) -> str:
9696
def get_image_uris(self) -> list[str]:
9797
"""Get list of image URIs (private ECR + public ECR if available)."""
9898
account = self.get("example_ecr_account", GLOBAL_CONFIG["example_ecr_account"])
99+
region = self.get("example_region", GLOBAL_CONFIG["example_region"])
99100
tags = self.get("tags", [])
100101
if not isinstance(tags, list):
101102
raise ValueError(f"'tags' field must be a list in {self._repository}")
102103

103104
uris = []
104105
for tag in tags:
105-
uris.append(build_ecr_uri(account, self._repository, tag))
106+
uris.append(build_ecr_uri(account, self._repository, tag, region))
106107

107108
if self.get("public_registry"):
108109
for tag in tags:

docs/src/templates/releasenotes/release_note.template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
{{ dlc_long }} for {{ platform_display }} are now available with {{ framework }} {{ version }}.
44

5-
## Announcement
6-
{% for item in announcement %}
5+
## Announcements
6+
{% for item in announcements %}
77
- {{ item }}
88
{% endfor %}
99

test/docs/mock_data/data/mock-repo/0.5-cpu-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public_registry: false
1111
tags:
1212
- "0.5.0-cpu-py39-ubuntu20.04-ec2"
1313

14-
announcement:
14+
announcements:
1515
- "Initial MockFramework 0.5 release"
1616

1717
packages:

test/docs/mock_data/data/mock-repo/3.0-gpu-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public_registry: true
1212
tags:
1313
- "3.0.0-gpu-py312-cu130-ubuntu22.04-ec2"
1414

15-
announcement:
15+
announcements:
1616
- "Introduced MockFramework 3.0 containers"
1717
- "Added CUDA 13.0 support"
1818

test/docs/test_generate_release_notes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def supported_image():
6060
python="py312",
6161
eop="2500-01-01",
6262
tags=["3.0.0-gpu-py312-ec2"],
63-
announcement=["Introduced MockFramework 3.0", "Added GPU support"],
63+
announcements=["Introduced MockFramework 3.0", "Added GPU support"],
6464
packages={"python": "3.12", "mockframework": "3.0.0"},
6565
)
6666

@@ -77,7 +77,7 @@ def deprecated_image():
7777
python="py39",
7878
eop="2025-01-01",
7979
tags=["0.5.0-cpu-py39-ec2"],
80-
announcement=["Initial release"],
80+
announcements=["Initial release"],
8181
packages={"python": "3.9", "mockframework": "0.5.0"},
8282
)
8383

@@ -95,7 +95,7 @@ def test_individual_release_note_content(
9595
assert "3.0" in content
9696
assert "EC2" in content
9797

98-
# Announcement section
98+
# Announcements section
9999
assert "Introduced MockFramework 3.0" in content
100100
assert "Added GPU support" in content
101101

0 commit comments

Comments
 (0)