Skip to content

Implement type hint stubs for cfa-cloudops - #293

Merged
uhc7 merged 2 commits into
mainfrom
feature/287-type-hint-stubs
Sep 22, 2026
Merged

uhc7 merged 2 commits into
mainfrom
feature/287-type-hint-stubs

Conversation

@uhc7

@uhc7 uhc7 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements type hint stub support for cfa-cloudops as requested in #287.

This follows the relevant typing/package approach used in cfa-dataops, while keeping the implementation specific to CloudOps. CloudOps does not require the dynamic catalog stub-generation logic used by DataOps.

Changes

  • Added cfa/cloudops/py.typed to mark the package as typed.
  • Added cfa/cloudops/__init__.pyi for the public lazy-loaded API:
    • CloudClient
    • ContainerAppClient
    • FunctionAppClient
    • run_experiment
    • run_tasks
    • Task
  • Updated Hatch build configuration to include the typing resources in package artifacts.
  • Added tests verifying typing resources and public API exports.

Validation

  • Focused type-stub tests: 2 passed.
  • Ruff check and format: passed.
  • Targeted pre-commit checks: passed.
  • Built the wheel successfully and verified that it contains:
    • cfa/cloudops/py.typed
    • cfa/cloudops/__init__.pyi
  • Installed the built wheel into an isolated environment and confirmed the typing resources are available from the installed cfa.cloudops package.
  • Full test suite: 272 passed, 1 failed.
    • The remaining failure is the existing Windows-specific tests/test_batch_helpers.py::test_download_job_stats failure caused by the /tmp/job-stats.json.csv path and is unrelated to these changes.

Fixes #287

@uhc7 uhc7 self-assigned this Sep 21, 2026
@uhc7 uhc7 mentioned this pull request Sep 21, 2026
@ryanraaschCDC
ryanraaschCDC self-requested a review September 22, 2026 14:15

@ryanraaschCDC ryanraaschCDC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! remember to bump the version in pyproject and update the changelog

@uhc7
uhc7 merged commit 47f199d into main Sep 22, 2026
3 checks passed
@uhc7
uhc7 deleted the feature/287-type-hint-stubs branch September 22, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement type hint stubs

2 participants