Skip to content

fix: extract Architecture-Group-Icons from AWS icon ZIP#151

Merged
ShotaroKataoka merged 3 commits into
aws-samples:mainfrom
mskt4440:fix/aws-icons-group-extraction
May 20, 2026
Merged

fix: extract Architecture-Group-Icons from AWS icon ZIP#151
ShotaroKataoka merged 3 commits into
aws-samples:mainfrom
mskt4440:fix/aws-icons-group-extraction

Conversation

@mskt4440
Copy link
Copy Markdown
Contributor

Summary

The download_aws_icons.py ZIP filter only extracted 48px SVGs, missing the Architecture-Group-Icons_*/ directory which uses 32px. As a result, icons referenced by ARCH_GROUP_DEFS (AWS-Cloud-logo, Region, VPC, public/private-subnet, Auto-Scaling-group, Account, etc.) were absent from assets/aws/ after a fresh install, causing arch-group elements to fail with:

Error: Asset not found: AWS-Cloud-logo_32

Changes

  • Extract _should_extract() helper that allows 32px in Architecture-Group-Icons paths and 48px elsewhere
  • Add unit tests for _should_extract and _classify_type covering service / resource / category / group classifications

Test plan

  • uv run pytest tests/ (188 passed, 1 skipped — 12 new tests)
  • uv run ruff check (clean)
  • Re-ran download_aws_icons.py: manifest entries 843 → 858 (+15 group icons, including all icons referenced by ARCH_GROUP_DEFS)
  • Visual verification: rendered a slide with arch-group: aws-cloud / vpc / region and confirmed group icons display correctly via pptx_builder generate + LibreOffice PNG export

Masa Kato added 2 commits May 18, 2026 21:13
The download_aws_icons.py ZIP filter only extracted 48px SVGs, missing
the Architecture-Group-Icons directory which uses 32px. As a result,
icons referenced by ARCH_GROUP_DEFS (AWS-Cloud-logo, Region, VPC,
public/private-subnet, Auto-Scaling-group, Account, etc.) were absent
from assets/aws/ on a fresh install, causing arch-group elements to
fail with `Asset not found: AWS-Cloud-logo_32`.

- Extract _should_extract() helper that allows 32px in
  Architecture-Group-Icons paths and 48px elsewhere
- Add unit tests for _should_extract and _classify_type covering
  service / resource / category / group classifications
…_entry

The neighboring helpers in this module (`_classify_type`,
`_extract_category`, `_name_from_filename`, `_generate_tags`) all use a
verb+object form. A boolean predicate fits better as `is_*` per PEP 8,
and `_is_target_entry` reads naturally next to `_classify_type` since
both classify a ZIP entry. Also reword the docstring as a predicate.
@mskt4440 mskt4440 marked this pull request as ready for review May 19, 2026 01:01
@ShotaroKataoka ShotaroKataoka added the blog:skip ブログ対象外 label May 20, 2026
@ShotaroKataoka ShotaroKataoka merged commit 462b2c9 into aws-samples:main May 20, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blog:skip ブログ対象外

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants