@@ -53,6 +53,21 @@ Update this list for the local project:
5353- ` tests/ ` : local test suite.
5454- ` data/ ` or ` samples/ ` : example payloads.
5555
56+ ## settings.py Import Rules
57+
58+ - Treat the directory containing ` settings.py ` as the project import root for
59+ migration.
60+ - Import production graph, message, and component modules from paths reachable
61+ relative to ` settings.py ` .
62+ - If ` production.py ` is next to ` settings.py ` , use
63+ ` from production import prod ` .
64+ - If the application is packaged under a directory next to ` settings.py ` , use
65+ package imports such as ` from myapp.production import prod ` .
66+ - Do not ask users to set ` PYTHONPATH ` to make migration imports work.
67+ - Do not patch ` os.environ["PYTHONPATH"] ` or global ` sys.path ` in application
68+ code to hide import problems.
69+ - Fix import errors by changing the project layout or import statements.
70+
5671## IoP Rules
5772
5873- Prefer a Python ` Production ` object exported through ` PRODUCTIONS ` .
@@ -115,6 +130,10 @@ iop --migrate settings.py --dry-run
115130iop --migrate settings.py
116131```
117132
133+ Do not use ` iop --test ` as the normal way to test Business Services. Test
134+ services through the runtime director or production runtime API so the deployed
135+ production context, component settings, and configured targets are used.
136+
118137If this repository uses Docker or Compose, add the exact command here:
119138
120139``` bash
0 commit comments