Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils): add utility function for configuring Event Bus with GTC #1651

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Feb 5, 2025

Describe your changes

Added

  • griptape.utils.griptape_cloud_utils.configure_events for automatically configuring the EventBus for use with Griptape Cloud Managed Structures.

Issue ticket number and link

Closes #1650

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
griptape/utils/griptape_cloud.py 96.42% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@collindutter collindutter force-pushed the feature/cloud-utils branch 11 times, most recently from 42128a5 to 6ab59e4 Compare February 7, 2025 16:21
@collindutter collindutter marked this pull request as ready for review February 7, 2025 16:21
@collindutter
Copy link
Member Author

Will apply to managed structure template after merge

@@ -26,7 +26,7 @@ class GriptapeCloudEventListenerDriver(BaseEventListenerDriver):
default=Factory(lambda: os.getenv("GT_CLOUD_BASE_URL", "https://cloud.griptape.ai")),
kw_only=True,
)
api_key: str = field(default=Factory(lambda: os.environ["GT_CLOUD_API_KEY"]), kw_only=True)
api_key: Optional[str] = field(default=Factory(lambda: os.getenv("GT_CLOUD_API_KEY")), kw_only=True)
Copy link
Member

Choose a reason for hiding this comment

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

does the validator require this to be typed Optional even though it never will be None?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Pyright doesn't know about the validator.

griptape/utils/griptape_cloud.py Outdated Show resolved Hide resolved
Copy link
Member

@vachillo vachillo left a comment

Choose a reason for hiding this comment

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

approving tho

@collindutter collindutter force-pushed the feature/cloud-utils branch 2 times, most recently from c5a1e8a to fd2c9b6 Compare February 7, 2025 19:19
@collindutter collindutter force-pushed the feature/cloud-utils branch 2 times, most recently from 685d12b to 6d7b2b7 Compare February 7, 2025 20:27
@collindutter collindutter added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit 1e39d26 Feb 7, 2025
16 checks passed
@collindutter collindutter deleted the feature/cloud-utils branch February 7, 2025 20:38
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.

Add Griptape Utility for determining whether or not a structure is in a Managed environment
2 participants