From 1d8b522b6b0e358db092b7890fbbdb6aeaee2e2b Mon Sep 17 00:00:00 2001 From: Jayaraj Tale Date: Mon, 21 Sep 2026 18:23:32 -0400 Subject: [PATCH 1/2] Add CloudOps type hint stubs --- cfa/cloudops/__init__.pyi | 8 ++++++++ cfa/cloudops/py.typed | 0 pyproject.toml | 4 ++++ tests/test_type_stubs.py | 30 ++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 cfa/cloudops/__init__.pyi create mode 100644 cfa/cloudops/py.typed create mode 100644 tests/test_type_stubs.py diff --git a/cfa/cloudops/__init__.pyi b/cfa/cloudops/__init__.pyi new file mode 100644 index 00000000..96c0f997 --- /dev/null +++ b/cfa/cloudops/__init__.pyi @@ -0,0 +1,8 @@ +from ._cloudclient import CloudClient as CloudClient +from ._containerappclient import ContainerAppClient as ContainerAppClient +from ._function_app_client import FunctionAppClient as FunctionAppClient +from .automation import run_experiment as run_experiment +from .automation import run_tasks as run_tasks +from .batch_helpers import Task as Task + +__all__: list[str] diff --git a/cfa/cloudops/py.typed b/cfa/cloudops/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/pyproject.toml b/pyproject.toml index 6cd29164..cfd155d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,10 @@ build-backend = "hatchling.build" [tool.hatch.build] packages = ["cfa"] +include = [ + "cfa/cloudops/py.typed", + "cfa/cloudops/__init__.pyi", +] [tool.hatch.metadata] allow-direct-references = true diff --git a/tests/test_type_stubs.py b/tests/test_type_stubs.py new file mode 100644 index 00000000..c7976b89 --- /dev/null +++ b/tests/test_type_stubs.py @@ -0,0 +1,30 @@ +"""Tests for CloudOps typing package resources.""" + +from importlib.resources import files + +import cfa.cloudops as cloudops + + +def test_typing_resources_are_available() -> None: + """Typing resources should be available from the CloudOps package.""" + package_files = files("cfa.cloudops") + + assert package_files.joinpath("py.typed").is_file() + assert package_files.joinpath("__init__.pyi").is_file() + + +def test_public_api_matches_type_stub_exports() -> None: + """Public CloudOps API exposed by __init__ should remain available.""" + expected_exports = { + "CloudClient", + "ContainerAppClient", + "FunctionAppClient", + "run_experiment", + "run_tasks", + "Task", + } + + assert set(cloudops.__all__) == expected_exports + + for name in expected_exports: + assert getattr(cloudops, name) is not None From e3d981226b02c75952ab74682866a9aff60d71c2 Mon Sep 17 00:00:00 2001 From: Jayaraj Tale Date: Tue, 22 Sep 2026 14:11:59 -0400 Subject: [PATCH 2/2] Bump version and update changelog --- changelog.md | 5 +++++ pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index d65b413f..c8dbbc61 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/). The versioning pattern is `major.minor.patch`. --- +## 1.1.0 + +- add type hint support for the public `cfa.cloudops` API +- include `py.typed` and `__init__.pyi` typing resources in package builds + ## 1.0.0 - replace `DefaultAzureCredential` with a custom `ChainedTokenCredential` builder (`_build_default_credential`) that exposes `exclude_*` flags for granular control over which credential types are attempted diff --git a/pyproject.toml b/pyproject.toml index cfd155d0..b8b5828c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cfa.cloudops" -version = "1.0.0" +version = "1.1.0" description = "Cloud storage, batch, functions, MLOps assistance" authors = [ {name = "Ryan Raasch", email = "xng3@cdc.gov"} diff --git a/uv.lock b/uv.lock index 5b1a8619..5de54f7b 100644 --- a/uv.lock +++ b/uv.lock @@ -435,7 +435,7 @@ wheels = [ [[package]] name = "cfa-cloudops" -version = "1.0.0" +version = "1.1.0" source = { editable = "." } dependencies = [ { name = "anyio" },