port/archor box update, ruler function update

This commit is contained in:
xsxx03-art
2026-06-22 20:10:07 +08:00
parent 944bc26fb9
commit bc2e46f648
3 changed files with 484 additions and 73 deletions
+7 -1
View File
@@ -468,18 +468,23 @@ def list_technologies():
"""List technology choices from the active role-scoped PDK root."""
technologies = []
pdks_root = current_pdk_root()
print(f"[TECH] pdks_root={pdks_root} exists={os.path.isdir(pdks_root)}")
# Technology choices are built from foundry/technology directories under the
# role PDK root, and only folders with technology.yml are exposed.
if os.path.isdir(pdks_root):
for foundry in sorted(os.listdir(pdks_root)):
foundry_path = os.path.join(pdks_root, foundry)
if not os.path.isdir(foundry_path):
print(f"[TECH] skip non-dir foundry={foundry}")
continue
for technology in sorted(os.listdir(foundry_path)):
technology_path = os.path.join(foundry_path, technology)
if not os.path.isdir(technology_path):
print(f"[TECH] skip non-dir tech={technology}")
continue
if not os.path.exists(os.path.join(technology_path, "technology.yml")):
has_manifest = os.path.exists(os.path.join(technology_path, "technology.yml"))
print(f"[TECH] foundry={foundry} tech={technology} has_manifest={has_manifest}")
if not has_manifest:
continue
technologies.append({
"foundry": foundry,
@@ -487,6 +492,7 @@ def list_technologies():
"id": f"{foundry}/{technology}",
"label": f"{foundry} / {technology}"
})
print(f"[TECH] returning {len(technologies)} technologies: {[t['id'] for t in technologies]}")
return jsonify({"technologies": technologies})