Repository navigation
Implement type hint stubs #287
Description
Activity
- addedquestionFurther information is requestedFurther information is requested
on Sep 10, 2026 - removedquestionFurther information is requestedFurther information is requested
on Sep 17, 2026 Initial analysis / implementation plan
Reviewed the existing type-stub implementation in cfa-dataops and compared it with the current cfa-cloudops package structure.
Findings:
- cfa-dataops uses a py.typed marker and explicitly includes the typing resources in its package build.
- DataOps also generates .pyi files for its catalog because the catalog API is dynamically constructed at runtime.
- cfa-cloudops currently does not contain a py.typed marker or package-specific type stub configuration.
- CloudOps already has inline type annotations across much of the implementation.
- The top-level cfa.cloudops API exposes CloudClient, ContainerAppClient, FunctionAppClient, run_experiment, run_tasks, and Task lazily through getattr, so the top-level public API needs particular attention for static type discovery.
Proposed implementation:
- Add and package a py.typed marker for cfa.cloudops.
- Add the minimal stub support needed for the lazy top-level public API.
- Add tests to verify typing resources are included and accessible from the installed package.
- Validate the built/installed package to confirm the Definition of Done: type hints are available to consumers after installation.
The DataOps catalog-specific stub generation/template logic does not appear necessary for CloudOps, so the implementation will remain minimal unless validation identifies a need for additional generated stubs.
Implementation is complete and PR #293 is open for review.
Added py.typed and a top-level init.pyi for the CloudOps public API, updated the Hatch build configuration to package the typing resources, and added focused tests.
Validation completed:
Type-stub tests: 2 passed
Ruff and targeted pre-commit checks passed
Built and inspected the wheel successfully
Installed the wheel in an isolated environment and confirmed py.typed, init.pyi, and the public CloudOps exports are available from the installed package
Full test suite: 272 passed; 1 existing Windows-specific /tmp path failure unrelated to this changePR: #293
Summary
We want to add type hinting stubs to the package like we did for data ops.
Blockers/Related work
Note blockers here and in the relationship panel
Definition of Done
Can access type hints for cfa-cloudops when the package is installed.
Expected amount of work (days)
2
Remove question label once details are complete, change task to bug if bug.