Loading...
Searching...
No Matches
Go to the documentation of this file.
8FS-539: the ``oct migrate`` subpackage, which moves a project onto the
9Option C ``.option_c/`` layout. This file is the package shell only; the
10command and every migration step live in
11:mod:`oct.migrate.oct_migrate`.
15- Expose ``migrate_group`` as this package's single public name.
16- Resolve it LAZILY through :func:`__getattr__`, so importing
17 ``oct.migrate`` alone does not import click or the migration engine.
18 ``oct.cli`` does resolve it at import, to register the command.
24 L1 - errors: none raised here; the engine owns failure reporting
25 L2 - (none) the lazy re-export resolves before diagnostics start
26 L3 - (none) the migrate command reports in its own module
31- Import-time side effects: none beyond the ``_dbg`` shim. No migration
32 submodule is imported until an attribute is requested.
33- Emits no ``_dbg`` record: ``__getattr__`` runs during ``import oct.cli``,
34 before ``oc_diagnostics.init()``, so a record here printed the "called
35 before init()" RuntimeWarning on every oct invocation (plan 263's rule
36 for lazy package roots; found again by the chart C runtime trace,
38- Any name other than ``migrate_group`` raises ``AttributeError``, so a
39 typo fails loudly instead of returning ``None``.
40- ``__all__`` and :func:`__getattr__` must agree; a name added to one
41 without the other is unreachable or undeclared.
45- oct.migrate.oct_migrate (lazy; the migrate command, resolved inside __getattr__)
46- oct.core.diagnostics (_dbg structured logger, imported but not called)
50from oct.core.diagnostics
import _dbg
52__all__ = [
"migrate_group"]
56 """Resolve ``migrate_group`` on first access; reject anything else."""
57 if name ==
"migrate_group":
60 raise AttributeError(f
"module 'oct.migrate' has no attribute {name!r}")