fix: address PR review feedback for agentcore icons

- Fix AgentCore class naming (was AGENTCORE due to UPPER_WORDS config)
- Add AIAgent alias for AiAgent class
- Add PEAG/OBS aliases for PolicyEngineAgenticGuardrails/Observability
- Remove orphaned amazon-codewhisperer.png resource
- Resize aws-app-studio.png and aws-neuron.png to 256x256
- Copy new icons to website/static/img/ for docs rendering
- Replace root-level manual test scripts with proper unittest tests
- Regenerate ml.py and docs via autogen script
pull/1157/head
Michael Walker 4 months ago
parent 7b4956fc90
commit 227c559657

@ -76,7 +76,7 @@ TMPL_APIDOC = "apidoc.tmpl"
TMPL_MODULE = "module.tmpl"
UPPER_WORDS = {
"aws": ("aws", "api", "ebs", "ec2", "efs", "emr", "rds", "ml", "mq", "nat", "vpc", "waf", "sdk", "aiagent", "agentcore"),
"aws": ("aws", "api", "ebs", "ec2", "efs", "emr", "rds", "ml", "mq", "nat", "vpc", "waf", "sdk"),
"azure": ("ad", "b2c", "ai", "api", "cdn", "ddos", "dns", "fxt", "hana", "hd", "id", "sap", "sql", "vm", "vpn", "vpc"),
"gcp": ("gcp", "ai", "api", "cdn", "dns", "gke", "gpu", "iap", "ids", "ml", "nat", "os", "sdk", "sql", "ssd", "tpu", "vpn"),
"firebase": ("ab", "fcm", "ml"),
@ -102,7 +102,8 @@ TITLE_WORDS = {
"alibabacloud": "AlibabaCloud"
},
"aws": {
"cloudfront": "CloudFront"
"agentcore": "AgentCore",
"cloudfront": "CloudFront",
},
"digitalocean": {
"digitalocean": "DigitalOcean"
@ -241,6 +242,7 @@ ALIASES = {
"ServerMigrationService": "SMS",
},
"ml": {
"AiAgent": "AIAgent",
"DeepLearningContainers": "DLC",
"PolicyEngineAgenticGuardrails": "PEAG",
"Observability": "OBS",

@ -8,7 +8,7 @@ class _ML(_AWS):
_icon_dir = "resources/aws/ml"
class AGENTCORE(_ML):
class AgentCore(_ML):
_icon = "agentcore.png"
@ -190,6 +190,7 @@ class Translate(_ML):
# Aliases
AIAgent = AiAgent
DLC = DeepLearningContainers
PEAG = PolicyEngineAgenticGuardrails
OBS = Observability

@ -1094,11 +1094,11 @@ Node classes list of the aws provider.
## aws.ml
<img width="30" src="/img/resources/aws/ml/agentcore.png" alt="AGENTCORE" style="float: left; padding-right: 5px;" >
**diagrams.aws.ml.AGENTCORE**
<img width="30" src="/img/resources/aws/ml/agentcore.png" alt="AgentCore" style="float: left; padding-right: 5px;" >
**diagrams.aws.ml.AgentCore**
<img width="30" src="/img/resources/aws/ml/ai-agent.png" alt="AiAgent" style="float: left; padding-right: 5px;" >
**diagrams.aws.ml.AiAgent**
**diagrams.aws.ml.AiAgent**, **AIAgent** (alias)
<img width="30" src="/img/resources/aws/ml/amazon-nova.png" alt="AmazonNova" style="float: left; padding-right: 5px;" >
**diagrams.aws.ml.AmazonNova**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 32 KiB

@ -1,60 +0,0 @@
#!/usr/bin/env python3
"""
Test script for AWS Agentcore Bedrock icons
Validates that all 11 new Agentcore icons can be imported and used correctly.
"""
from diagrams import Diagram
from diagrams.aws.ml import (
Agentcore,
AiAgent,
BrowserTool,
CodeInterpreter,
Evaluations,
Gateway,
Identity,
Memory,
Observability,
PolicyEngineAgenticGuardrails,
Runtime,
)
def test_agentcore_icons():
"""Test all Agentcore icons in a sample diagram"""
with Diagram("AWS Agentcore Bedrock Icons Test", show=False, filename="agentcore_test"):
# Core Agentcore components
agentcore = Agentcore("Agentcore")
ai_agent = AiAgent("AI Agent")
runtime = Runtime("Runtime")
gateway = Gateway("Gateway")
# Identity and security
identity = Identity("Identity")
policy_engine = PolicyEngineAgenticGuardrails("Policy Engine")
# Tools and capabilities
code_interpreter = CodeInterpreter("Code Interpreter")
browser_tool = BrowserTool("Browser Tool")
memory = Memory("Memory")
# Monitoring and evaluation
observability = Observability("Observability")
evaluations = Evaluations("Evaluations")
# Create a flow showing the relationships
agentcore >> ai_agent >> runtime
ai_agent >> [code_interpreter, browser_tool, memory]
gateway >> identity >> policy_engine
[runtime, code_interpreter, browser_tool] >> observability
observability >> evaluations
print("✅ Test diagram created successfully!")
print("📁 Generated file: agentcore_test.png")
print("🔍 Please verify the icons render correctly in the diagram")
if __name__ == "__main__":
test_agentcore_icons()

@ -1,30 +0,0 @@
#!/usr/bin/env python3
"""
Test script for new AWS AI/ML service icons
Tests Amazon Nova, AWS App Studio, Amazon CodeWhisperer, and AWS Neuron
"""
from diagrams import Diagram
from diagrams.aws.ml import AmazonNova, AWSAppStudio, AWSNeuron
def test_nova_icons():
"""Test the new Nova and AI service icons"""
with Diagram("New AWS AI/ML Services", show=False, filename="nova_test"):
# Create instances of the new services
nova = AmazonNova("Amazon Nova")
app_studio = AWSAppStudio("AWS App Studio")
neuron = AWSNeuron("AWS Neuron")
# Create a simple flow
nova >> app_studio >> neuron
print("✅ Test diagram created successfully!")
print("📁 Generated file: nova_test.png")
print("🔍 Please verify the icons render correctly in the diagram")
if __name__ == "__main__":
test_nova_icons()

@ -0,0 +1,93 @@
import os
import unittest
from diagrams import Diagram, setcluster, setdiagram
from diagrams.aws.ml import (
AgentCore,
AiAgent,
AmazonNova,
AWSAppStudio,
AWSNeuron,
BrowserTool,
CodeInterpreter,
Evaluations,
Gateway,
Identity,
Memory,
Observability,
PolicyEngineAgenticGuardrails,
Runtime,
AIAgent,
DLC,
OBS,
PEAG,
)
class AgentcoreIconsTest(unittest.TestCase):
def setUp(self):
self.name = "test_agentcore_icons"
def tearDown(self):
setdiagram(None)
setcluster(None)
try:
os.remove(self.name + ".png")
except FileNotFoundError:
pass
def test_agentcore_diagram(self):
with Diagram(name=self.name, show=False, filename=self.name):
agentcore = AgentCore("Agentcore")
ai_agent = AiAgent("AI Agent")
runtime = Runtime("Runtime")
gateway = Gateway("Gateway")
identity = Identity("Identity")
policy_engine = PolicyEngineAgenticGuardrails("Policy Engine")
code_interpreter = CodeInterpreter("Code Interpreter")
browser_tool = BrowserTool("Browser Tool")
memory = Memory("Memory")
observability = Observability("Observability")
evaluations = Evaluations("Evaluations")
agentcore >> ai_agent >> runtime
ai_agent >> [code_interpreter, browser_tool, memory]
gateway >> identity >> policy_engine
[runtime, code_interpreter, browser_tool] >> observability
observability >> evaluations
self.assertTrue(os.path.exists(self.name + ".png"))
class NovaIconsTest(unittest.TestCase):
def setUp(self):
self.name = "test_nova_icons"
def tearDown(self):
setdiagram(None)
setcluster(None)
try:
os.remove(self.name + ".png")
except FileNotFoundError:
pass
def test_nova_diagram(self):
with Diagram(name=self.name, show=False, filename=self.name):
nova = AmazonNova("Amazon Nova")
app_studio = AWSAppStudio("AWS App Studio")
neuron = AWSNeuron("AWS Neuron")
nova >> app_studio >> neuron
self.assertTrue(os.path.exists(self.name + ".png"))
class AliasesTest(unittest.TestCase):
def test_aliases_exist(self):
self.assertIs(AIAgent, AiAgent)
self.assertIs(PEAG, PolicyEngineAgenticGuardrails)
self.assertIs(OBS, Observability)
if __name__ == "__main__":
unittest.main()

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save