Skip to content

Updating repository with python extension sample code.#190

Merged
leetimj merged 10 commits intomainfrom
samples/python-workflow
Mar 19, 2026
Merged

Updating repository with python extension sample code.#190
leetimj merged 10 commits intomainfrom
samples/python-workflow

Conversation

@leetimj
Copy link
Contributor

@leetimj leetimj commented Mar 17, 2026

Add Python FastAPI sample extension mirroring the C# workflow sample. Implements /v1/process with keyword-based
clinical entity extraction (vitals, ICD-10 codes, medication concepts), Adaptive Card visualization output, health
endpoints, structured logging, and DSP-compatible Pydantic models.

yingding and others added 3 commits November 11, 2025 08:59
* added a python sample

* updated copilot review

---------

Co-authored-by: yingding <yingdingwang@yahoo.de>
* added a python sample

* deps(deps): bump @inquirer/prompts in /tools/dragon-extension-cli (#117)

Bumps [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) from 7.9.0 to 7.10.0.
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/@inquirer/prompts@7.9.0...@inquirer/prompts@7.10.0)

---
updated-dependencies:
- dependency-name: "@inquirer/prompts"
  dependency-version: 7.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* updated copilot review

* Adaptive card sample updates (#121)

* Updates to the adaptive card that's generated.

* Update AdaptiveCardPayload.cs

* added audio recordings to samples (#88)

* added audio recordings to samples

* added reference to sample audio-recordings

* added reference to sample audio-recordings

* deps(deps-dev): bump @types/archiver in /tools/dragon-extension-cli (#113)

Bumps [@types/archiver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/archiver) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/archiver)

---
updated-dependencies:
- dependency-name: "@types/archiver"
  dependency-version: 7.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps(deps): bump glob in /tools/dragon-extension-cli (#122)

Bumps  and [glob](https://github.com/isaacs/node-glob). These dependencies needed to be updated together.

Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v10.4.5...v10.5.0)

Updates `glob` from 11.0.3 to 11.1.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v10.4.5...v10.5.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 2473160 document update to QuickStart.md  (#134)

* 2473160 - Refreshed documentation based on creating an initial extension.

* Fix link to QUICKSTART.md in README

* Refine QUICKSTART.md for improved clarity

Updated instructions for clarity and corrected numbering.

* Adding missing images for Quickstart.md

* Adding a link and description to the quickstart guide.

* Update README.md

Updated based on copilot suggestion.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Moved quickstart link to Quickstart section.

Added a link to the QUICKSTART guide in the README.

* Added images that were missing.

* Revise Quick Start Guide for Dragon Extension Developer

Updated the Quick Start Guide to improve structure and clarity, including a new Table of Contents and revised sections for running locally and testing the extension.

* Reorganize Quick Start Guide for clarity

* Enhance Table of Contents with section descriptions

Updated the Table of Contents with additional descriptions for sections.

* Revise Quick Start Guide for Dragon Extension Developer

Updated the title and added links to Microsoft Learn documentation for better guidance.

* Revise sample script and add audio recordings reference

Updated sample script and added reference to audio recordings.

* Clarify Process API and packaging instructions

Updated links and clarified instructions for Process API and packaging.

* Moved quickstart link to Quickstart section.

Moved quick start guide reference in README.

* registering service principal images

Add files for registering service principal section to better display how to register the Microsoft.HealthPlatform SP.

* Add subscription image

Adding subscription image to use in service principal section.

* Update QUICKSTART.md with Azure registration steps

Added instructions for registering the Microsoft.HealthPlatform resource provider and creating an application in Azure.

* Clarify Service Principal registration process

Clarify the registration of the Microsoft.HealthPlatform resource provider and note that it only needs to be done once.

* Update QUICKSTART.md to utilize a block quote

Using a block quote for better emphasis for the reader to notice the comments.

Co-authored-by: Brandon Pollett <brandon.pollett@gmail.com>

---------

Co-authored-by: Timothy Lee <timothy_lee@nuance.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Brandon Pollett <brandon.pollett@gmail.com>

* deps(deps): bump actions/checkout from 5 to 6 (#124)

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps: Bump Microsoft.AspNetCore.Authentication.JwtBearer from 9.0.10 to 9.0.11 (#125)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-version: 9.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps: Bump Microsoft.AspNetCore.OpenApi from 9.0.10 to 9.0.11 (#126)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.OpenApi
  dependency-version: 9.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps(deps-dev): bump rimraf in /tools/dragon-extension-cli (#130)

Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.0 to 6.1.2.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v6.1.0...v6.1.2)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps: Bump Microsoft.Identity.Web from 4.0.1 to 4.3.0 (#138)

---
updated-dependencies:
- dependency-name: Microsoft.Identity.Web
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps(deps): bump js-yaml in /tools/dragon-extension-cli (#139)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) to 4.1.1 and updates ancestor dependency . These dependencies need to be updated together.


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

Updates `js-yaml` from 3.14.1 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* rewrite the README.md for the python workflow extension

* clean up md files

* updated README.md with cmds to create .venv and start python samlple server

* clean up files

* Added content table to README.md, updated output structure to accommondate the new adaptive card output version 1.6

* update the adaptive card output

* update the reason for choose python 3.12 to avoid integration issues with AIML libs

* make format consistent

* Updated code based on code review comments.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: yingding <yingdingwang@yahoo.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandon Pollett <brpoll@microsoft.com>
Co-authored-by: Jim McDole <2876054+mcdolejt@users.noreply.github.com>
Co-authored-by: leetimj <250227887+leetimj@users.noreply.github.com>
Co-authored-by: Timothy Lee <timothy_lee@nuance.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Brandon Pollett <brandon.pollett@gmail.com>
@leetimj leetimj requested a review from brandonpollett as a code owner March 17, 2026 14:09
Copilot AI review requested due to automatic review settings March 17, 2026 14:09
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

Adds a new Python/FastAPI “workflow sample extension” alongside the existing C# sample to demonstrate Dragon Copilot /v1/process handling, DSP-shaped responses, and basic heuristic clinical-entity extraction with pytest coverage.

Changes:

  • Introduces a Python sample extension (FastAPI app, DSP-ish models, processing service, and pytest suite).
  • Adds a Python extension manifest plus local run/test instructions in a new README.
  • Updates repo docs/ignores (QUICKSTART link addition; .gitignore ignores .venv and macOS .DS_Store).

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
samples/DragonCopilot/Workflow/pythonSampleExtension/requirements.txt Pins Python dependencies for the FastAPI sample + pytest.
samples/DragonCopilot/Workflow/pythonSampleExtension/README.md Local run + curl/PowerShell examples + response shape documentation.
samples/DragonCopilot/Workflow/pythonSampleExtension/extension.yaml Declares the Python tool/inputs/outputs for the extension manifest.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/main.py FastAPI endpoints (/health, /v1/health, /v1/process) + middleware/logging.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/service.py Heuristic extraction + DSP response assembly + Adaptive Card generation.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/models.py Pydantic models for payload/resources and DSP response wrappers.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/config.py Settings via pydantic-settings with DGEXT_ env prefix.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/.env Placeholder env values for future AI Foundry integration.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/tests/* Adds pytest coverage for health/process and adaptive card outputs.
samples/DragonCopilot/Workflow/pythonSampleExtension/app/init.py Package marker/docstring.
QUICKSTART.md Adds Microsoft Learn link but currently duplicates the “Running Locally” heading.
.gitignore Normalizes .idea/ entry and adds .DS_Store + **/.venv/ ignores.

leetimj and others added 7 commits March 17, 2026 10:20
Remove incorrect sample example.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Remove duplication of text.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated documentation with appropriate formatting a suggestions.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update urls with valid ports.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated output for python extensions.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated with python dependency install command changes.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@leetimj leetimj merged commit 758f342 into main Mar 19, 2026
6 checks passed
@leetimj leetimj deleted the samples/python-workflow branch March 19, 2026 16:28
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.

4 participants