Public Namespace Consolidation¶
Status: Accepted (implemented in 0.2.0)
Created: 2026-08-03
Author: OpsDev.nz Platform Engineering
Problem¶
The op-opsdevnz distribution ships two top-level packages:
src/opsdevnz/, the implementation, including the console script entry pointopsdevnz.__main__:main.src/op_opsdevnz/, a compatibility shim that re-exports the implementation with wildcard imports.
Consumers cannot tell which import path is stable, and the docs disagree:
| Surface | Namespace |
|---|---|
| Distribution name | op-opsdevnz |
| Console script | opsdevnz.__main__:main |
| README and index examples | from opsdevnz.onepassword import ... |
| Metaname resolver adapter | octodns_metaname.op_opsdevnz_hooks:resolve |
| oc-opsdevnz imports | from op_opsdevnz.onepassword import ... |
Evidence¶
Sibling modules follow the convention package = distribution name with dashes replaced by underscores:
oc-opsdevnzshipsoc_opsdevnz.worklog-opsdevnzshipsworklog_opsdevnz.
External consumers already import op_opsdevnz:
oc-opsdevnzinsrc/oc_opsdevnz/secrets.pyand four example scripts.octodns-metanamevia its provider-ownedOCTODNS_METANAME_SECRET_RESOLVERadapter.
Options Considered¶
-
Canonicalize
op_opsdevnz. Move the implementation fromsrc/opsdevnz/tosrc/op_opsdevnz/, delete the shim, update the console script entry toop_opsdevnz.__main__:main, and update README, index, and test monkeypatch targets. Matches the distro name, sibling convention, and every external consumer. -
Canonicalize
opsdevnz. Rename the distribution toopsdevnz, updateoc-opsdevnzandoctodns-metanamereferences, and change the documented resolver string. Breaks the sibling naming pattern and existing consumers. -
Keep both and document a canonical choice. Preserves the ambiguity and the duplicated surface; both packages must be maintained and shipped.
Proposed Decision¶
Adopt option 1. Single package op_opsdevnz. Release as 0.2.0, since the
import path for opsdevnz users is a breaking change; acceptable at 0.x per
the versioning policy in AGENTS.md.
Notes:
- Keeping
opsdevnzas a generic top-level name also risks colliding with a future shared utilities namespace. Module-scoped naming avoids squatting a generic name. - Coordinate the change with
octodns-metanameandoc-opsdevnzdocs that reference the module. - No deprecation shim: remove
opsdevnzin the same 0.2.0 release and note the import path change in the changelog. External consumers already importop_opsdevnz, and the 0.x versioning policy permits the breaking change. - If the package gains a
py.typedmarker or type stubs before the move, they must move with the package; one left behind insrc/opsdevnz/would claim typing support for a package that no longer exists.
More Information¶
- Issue #8: Repair SDK integration and consolidate the public package namespace.