Annotations added

This commit is contained in:
2026-05-30 12:23:51 +08:00
parent 5a3a80700f
commit b3f29398f0
92 changed files with 556 additions and 1 deletions
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: PDK component metadata describing photonic/electronic cell assets, pins, geometry, layers, and library classification.
# Inside functions: N/A - declarative YAML metadata/configuration.
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
name: EC_SiN400_1310_1p0dB_L635_A0_QY_202604
foundry: Silterra
process: EMO1_2ML_Cu_RDL
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: SQLite database initialization and persistence helpers for users, projects, cells, and project metadata.
# Inside functions: connect_db, init_db, get_user, get_user_profile, get_user_auth_by_id, update_user_occupation, update_user_password, add_user_log, list_user_logs
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
# backend/database.py
import sqlite3
import os
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Directory configuration metadata used to locate PDK and project resources.
# Inside functions: N/A - declarative YAML metadata/configuration.
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
level : 4
root :
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Backend integration wrapper for project GDS generation and build result handling.
# Inside functions: build_project_gds, _build_with_mxpic_router, _load_project_cells, _ordered_cell_names, _cells_have_links, _build_with_gdstk, _import_public_gds, _build_with_nazca, _safe_cell_name, _library_cell_by_name, _number
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import math
import os
import sys
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Layout preview helpers for generating SVG previews from saved layout YAML.
# Inside functions: create_layout_svg_from_gds, _create_with_gdstk, _build_gdstk_cell, _resolve_child_cell, _import_gds_cell, _create_with_nazca, _load_local_layout, _safe_cell_name, _library_cell_by_name, _number
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
from typing import Dict, Optional
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Role-aware PDK access control utilities for resolving which PDK roots a user or project may use.
# Inside functions: normalize_user_group, pdk_root_for_group, pdk_root_for_session, prefer_full_gds_for_session, create_export_path, cleanup_expired_exports
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
import time
import shutil
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: PDK registry scanning helpers for finding component YAML/GDS assets and building library trees.
# Inside functions: __init__, resolve, _find_yaml, _find_gds, _load_yaml, _inside_root
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
from dataclasses import dataclass
from typing import Optional
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Routed layout preview helpers that invoke the routing/build flow and return preview artifacts.
# Inside functions: create_routed_layout_svg, layout_has_links
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
import sys
import tempfile
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Flask backend API server for authentication, project management, PDK library access, layout preview, and GDS build endpoints.
# Inside functions: no_cache_response, login_required_json, wrapper, request_ip, record_action, safe_name, user_layout_root, project_root, cell_file_path, cell_svg_path, cell_routes_path, write_route_points_sidecar, project_gds_path, technology_manifest_path_for_project, current_pdk_root, current_pdk_registry, scoped_pdk_root_for_project, pdk_root_for_request_project, project_meta_path, read_project_meta
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
import re
+6
View File
@@ -1,3 +1,9 @@
# -----------------------------------------------------------------------------
# Description: Technology manifest loading and fallback helpers for routing layers and cross-section defaults.
# Inside functions: technology_manifest_path, read_technology_manifest
# Developer : Qin Yue @ 2026
# Organization : OptiHK Limited
# -----------------------------------------------------------------------------
import os
import yaml