Skip to content

Conversation

@heyitsaamir
Copy link
Collaborator

@heyitsaamir heyitsaamir commented Aug 20, 2025

Copilot AI review requested due to automatic review settings August 20, 2025 22:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new Cards package for the Microsoft Teams Python SDK, replacing a minimal AdaptiveCard placeholder with a full implementation. The changes update import statements and constructor calls throughout the codebase to align with the new Cards package structure.

  • Replaces the minimal AdaptiveCard class with a full Cards package implementation
  • Updates all AdaptiveCard constructor calls to use model_validate() instead of direct instantiation
  • Consolidates import statements and updates project configuration

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/cards/src/microsoft/teams/cards/adaptive_card.py Removes the minimal AdaptiveCard placeholder implementation
packages/app/src/microsoft/teams/app/app.py Updates import to use new Cards package structure
packages/app/src/microsoft/teams/app/app_process.py Updates import to use new Cards package structure
tests/message-extensions/src/cards.py Updates AdaptiveCard instantiation to use model_validate()
tests/dialogs/src/main.py Updates AdaptiveCard instantiation to use model_validate()
tests/graph/src/main.py Consolidates imports from microsoft.teams.app
packages/graph/src/microsoft/teams/graph/auth_provider.py Removes all export declaration
packages/graph/pyproject.toml Updates build system from setuptools to hatchling
pyproject.toml Updates pyright version and adds line length exception for cards package
pyrightconfig.json Adds test paths and cards package configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@lilyydu lilyydu left a comment

Choose a reason for hiding this comment

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

could we match TS/C# and place the generator code into core.py instead? I'm gonna be adding the missing classes/folders that will use this file

https://github.com/microsoft/teams.ts/tree/main/packages/cards/src

@heyitsaamir heyitsaamir merged commit 036db1d into main Aug 21, 2025
3 checks passed
@heyitsaamir heyitsaamir deleted the aamirj/cards branch August 21, 2025 20:23
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.

[py] adaptive cards package

4 participants