@@ -61,7 +61,8 @@ Copy generated files from the staging dir to the SDK, **excluding** these files
6161
6262| File | Reason |
6363| ------| --------|
64- | ` __init__.py ` | Hand-written init with ` __all__ ` |
64+ | ` __init__.py ` | Generated post-sync by ` _generate_pkg_init.py ` |
65+ | ` __init__.pyi ` | Generated post-sync by ` _generate_pkg_init.py ` |
6566| ` entity.py ` | Patched: ` _metadata_proxies ` , ` type_name: Any ` , ` SaveSemantic ` |
6667| ` referenceable.py ` | Patched: ` InternalKeywordField ` , field descriptors, helper exports |
6768| ` atlas_glossary.py ` | Patched: GTC anchor-in-attributes handling |
@@ -75,6 +76,7 @@ Copy generated files from the staging dir to the SDK, **excluding** these files
7576``` bash
7677rsync -av \
7778 --exclude=' __init__.py' \
79+ --exclude=' __init__.pyi' \
7880 --exclude=' entity.py' \
7981 --exclude=' referenceable.py' \
8082 --exclude=' atlas_glossary.py' \
@@ -102,7 +104,20 @@ rm -rf "$STAGING_DIR"
102104 """ Attributes of the relationship itself (e.g., description, status, etc.)."""
103105```
104106
105- ### 5. Run ruff auto-fix and format
107+ ### 5. Regenerate ` __init__.py ` and ` __init__.pyi `
108+
109+ After syncing, regenerate the package init files from the ` _init_*.py ` modules:
110+
111+ ``` bash
112+ cd " ${SDK_DIR} "
113+ uv run python pyatlan_v9/model/assets/_generate_pkg_init.py
114+ ```
115+
116+ This scans all ` _init_*.py ` files and generates:
117+ - ` __init__.py ` with ` lazy_loader.attach() ` for lazy imports
118+ - ` __init__.pyi ` with explicit imports for IDE type hints
119+
120+ ### 6. Run ruff auto-fix and format
106121
107122After syncing and patching, run ruff to fix unused imports and format the generated files:
108123
@@ -112,13 +127,13 @@ uv run ruff check --fix --select F401,F811 pyatlan_v9/
112127uv run ruff format pyatlan_v9/
113128```
114129
115- ### 6 . Run tests (if args contain "test")
130+ ### 7 . Run tests (if args contain "test")
116131
117132``` bash
118133cd " ${SDK_DIR} " && python -m pytest tests_v9/unit/ -x -q
119134```
120135
121- ### 7 . Report summary
136+ ### 8 . Report summary
122137
123138Report: how many files were generated, how many synced, how many excluded, and test results if applicable.
124139
0 commit comments