Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cfa/cloudops/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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]
Empty file added cfa/cloudops/py.typed
Empty file.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}
Expand Down Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions tests/test_type_stubs.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading