Skip to content

Commit

Permalink
merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
junanchen committed Apr 25, 2024
2 parents a042220 + 600c09e commit 3727106
Show file tree
Hide file tree
Showing 1,235 changed files with 85,017 additions and 146,172 deletions.
25 changes: 23 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,31 @@
"**/*.xml",
"**/*.txt",
".gitignore",
"examples/README.md",
"examples/flex-flows/README.md",
"examples/prompty/README.md",
"scripts/docs/_build/**",
"src/promptflow-azure/promptflow/azure/_restclient/flow/**",
"src/promptflow-azure/promptflow/azure/_restclient/swagger.json",
"src/promptflow-azure/promptflow/azure/_models/**",
"src/promptflow-azure/tests/**",
"src/promptflow-core/promptflow/core/_connection_provider/_models/**",
"src/promptflow/tests/**",
"src/promptflow-devkit/tests/**",
"src/promptflow-azure/tests/**",
"src/promptflow-recording/**",
"src/promptflow-tools/tests/**",
"src/promptflow-devkit/promptflow/_sdk/_service/static/index.html",
"src/promptflow-devkit/promptflow/_sdk/_service/static/trace/index.html",
"src/promptflow-devkit/promptflow/_sdk/_service/static/chat-window/index.html",
"**/flow.dag.yaml",
"**/pyproject.toml",
"**/setup.py",
"scripts/installer/curl_install_pypi/**",
"scripts/installer/windows/**",
".github/workflows/**",
".github/actions/**",
".github/pipelines/**"
".github/pipelines/**",
".github/CODEOWNERS"
],
"words": [
"aoai",
Expand Down Expand Up @@ -184,6 +191,8 @@
"otel",
"OTLP",
"spawnv",
"arxiv",
"autogen",
"spawnve",
"addrs",
"pywin",
Expand All @@ -197,6 +206,18 @@
"wscript",
"raisvc",
"evals",
"redoc",
"starlette",
"mlindex",
"redef",
"rcts",
"Chunker",
"mpnet",
"wargs",
"dcid",
"piezo",
"Piezo",
"cmpop",
"finalizer",
"finalizers"
],
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN apt-get update \
&& apt-get -y install build-essential \
&& apt-get -y install docker.io

# Install notebook depenency
RUN pip install ipython ipykernel
RUN ipython kernel install --user --name promptflow

Expand Down
47 changes: 27 additions & 20 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
{
"name": "Promptflow-Python39",
// "context" is the path that the Codespaces docker build command should be run from, relative to devcontainer.json
"context": ".",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-toolsai.vscode-ai",
"ms-toolsai.jupyter",
"redhat.vscode-yaml",
"prompt-flow.prompt-flow"
],

"runArgs": ["-v", "/var/run/docker.sock:/var/run/docker.sock"]
"name": "Promptflow-Python39",
// "context" is the path that the Codespaces docker build command should be run from, relative to devcontainer.json
"context": ".",
"dockerFile": "Dockerfile",
"runArgs": ["-v", "/var/run/docker.sock:/var/run/docker.sock"],
"customizations": {
"codespaces": {
"openFiles": ["README.md", "examples/README.md"]
},
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-toolsai.vscode-ai",
"ms-toolsai.jupyter",
"redhat.vscode-yaml",
"prompt-flow.prompt-flow"
]
}
},
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {}
}
}
3 changes: 1 addition & 2 deletions .devcontainer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
azure-cli
promptflow[azure]
promptflow[azure]>=1.9.0
promptflow-tools
49 changes: 31 additions & 18 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
# CAUTION: Order is important; the LAST matching pattern takes the most precedence.
# So put outside folders first, and then inside folders.
# Don't change the sequence of the regions.

* @microsoft/prompt-flow-approvers

/src/promptflow-tracing/promptflow/tracing/_start_trace.py @microsoft/promptflow-sdk
# 1. Folders
/src/promptflow/ @microsoft/promptflow-sdk
/src/promptflow-tracing/ @microsoft/promptflow-execution
/src/promptflow-core/ @microsoft/promptflow-sdk
/src/promptflow-devkit/ @microsoft/promptflow-sdk
/src/promptflow-azure/ @microsoft/promptflow-sdk
/src/promptflow-recording/ @microsoft/promptflow-sdk
/src/promptflow-evals/ @microsoft/pf-eval-team-contributor
/src/promptflow-rag/ @microsoft/promptflow-rag

/scripts/docs/ @microsoft/promptflow-sdk
/scripts/installer/ @microsoft/promptflow-sdk
/scripts/json_schema/ @microsoft/promptflow-sdk
/scripts/readme/ @microsoft/promptflow-sdk

/src/promptflow-tools/ @microsoft/promptflow-tools
/scripts/tool/ @microsoft/promptflow-tools
/examples/tools/ @microsoft/promptflow-tools

# 2. Subfolders
/src/promptflow-tracing/promptflow/tracing/ @microsoft/promptflow-execution
/src/promptflow-core/promptflow/_core/ @microsoft/promptflow-execution
/src/promptflow-devkit/promptflow/_internal/ @microsoft/promptflow-execution
/src/promptflow-devkit/promptflow/batch/ @microsoft/promptflow-execution
/src/promptflow-devkit/promptflow/_proxy/ @microsoft/promptflow-execution
/src/promptflow-core/promptflow/executor/ @microsoft/promptflow-execution
/src/promptflow-core/promptflow/integrations/ @microsoft/promptflow-execution
/src/promptflow-core/promptflow/storage/ @microsoft/promptflow-execution
/src/promptflow-devkit/promptflow/_sdk/_mlflow.py @brynn-code
/src/promptflow-devkit/promptflow/_internal/ @microsoft/promptflow-execution
/src/promptflow-devkit/promptflow/batch/ @microsoft/promptflow-execution
/src/promptflow/tests/executor/ @microsoft/promptflow-execution

/src/promptflow-core/promptflow/core/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/_cli/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/_sdk/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/_proxy/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/entities/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/operations/ @microsoft/promptflow-sdk
/src/promptflow-azure/promptflow/azure/ @microsoft/promptflow-sdk
/src/promptflow-devkit/promptflow/_proxy/ @microsoft/promptflow-execution @microsoft/promptflow-sdk

/src/promptflow/tests/sdk_cli_test/ @microsoft/promptflow-sdk
/src/promptflow/tests/sdk_cli_azure_test/ @microsoft/promptflow-sdk
/src/promptflow/tests/sdk_cli_global_config_test/ @microsoft/promptflow-sdk
/src/promptflow/tests/sdk_pfs_test/ @microsoft/promptflow-sdk
/scripts/docs/ @microsoft/promptflow-sdk
/scripts/installer/ @microsoft/promptflow-sdk
/scripts/json_schema/ @microsoft/promptflow-sdk
/scripts/readme/ @microsoft/promptflow-sdk
/src/promptflow/tests/executor/_prompty_executor.py @microsoft/promptflow-execution @microsoft/promptflow-sdk
/src/promptflow/tests/executor/_script_executor.py @microsoft/promptflow-execution @microsoft/promptflow-sdk
/src/promptflow-tracing/promptflow/tracing/_start_trace.py @microsoft/promptflow-sdk

/docs/how-to-guides/develop-a-tool/ @microsoft/promptflow-tools
/src/promptflow-tools/ @microsoft/promptflow-tools
/examples/tools/ @microsoft/promptflow-tools
/scripts/tool/ @microsoft/promptflow-tools
2 changes: 2 additions & 0 deletions .github/actions/step_generate_configs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ runs:
shell: pwsh
run: |
pip list
pip install azure-identity
pip install azure-keyvault
echo "Generating connection config file..."
python ./scripts/building/generate_connection_config.py `
--target_folder ${{ inputs.targetFolder }}
25 changes: 10 additions & 15 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@ examples:
- examples/**
documentation:
- docs/**
cli:
- src/promptflow-devkit/promptflow/_cli/**
sdk:
- src/promptflow-devkit/promptflow/_sdk/**
- src/promptflow-azure/promptflow/azure/**
promptflow:
- src/promptflow-core/**
promptflow-tracing:
- src/promptflow-tracing/**
promptflow-core:
- src/promptflow-core/**
promptflow-devkit:
- src/promptflow-devkit/**
promptflow-azure:
- src/promptflow-azure/**
promptflow-evals:
- src/promptflow-evals/**
promptflow:
- src/promptflow/**
promptflow-tools:
- src/promptflow-tools/**
executor:
- src/promptflow-devkit/promptflow/batch/**
- src/promptflow-core/promptflow/executor/**
- src/promptflow-core/promptflow/_core/**
- src/promptflow-devkit/promptflow/_internal/**
- src/promptflow-core/promptflow/integrations/**
- src/promptflow-core/promptflow/storage/**
- src/promptflow/tests/executor/**
fundamental:
- scripts/**
- .github/**
55 changes: 55 additions & 0 deletions .github/pipelines/promptflow-csharp-e2e-test-env-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
parameters:
- name: promptflowCsPat
displayName: "PAT to clone csharp repository"
type: string
- name: flowProjectRelativePath
displayName: "Flow Project Relative Path"
type: string

steps:
- task: UseDotNet@2
inputs:
version: '6.x'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9.x'
architecture: 'x64'

- task: PowerShell@2
displayName: 'Install promptflow cli'
inputs:
targetType: 'inline'
script: |
Set-PSDebug -Trace 1
pip install -r src/promptflow/dev_requirements.txt
pip install src/promptflow-tracing
pip install src/promptflow-core[executor-service]
pip install src/promptflow-devkit
pip install src/promptflow-azure
pip install src/promptflow-recording
pip freeze
- task: PowerShell@2
displayName: 'Clone csharp repository'
inputs:
targetType: 'inline'
script: |
git clone https://$(PROMPTFLOW_CS_PAT)@dev.azure.com/msdata/Vienna/_git/PromptflowCS csharp
- task: NuGetAuthenticate@1

- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '$(flowProjectRelativePath)/**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: '$(flowProjectRelativePath)/nuget.config'
displayName: 'dotnet restore'

- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '$(flowProjectRelativePath)/**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: '$(flowProjectRelativePath)/nuget.config'
displayName: 'dotnet build'
46 changes: 46 additions & 0 deletions .github/pipelines/promptflow-csharp-e2e-test-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
parameters:
- name: azureOpenAiApiKey
displayName: "Azure OpenAI API Key"
type: string
- name: azureOpenAiApiBase
displayName: "Azure OpenAI API Base"
type: string
- name: flowProjectRelativePath
displayName: "Flow Project Relative Path"
type: string

steps:
- task: PowerShell@2
displayName: 'Copy local connections for ci pipeline'
inputs:
targetType: 'inline'
script: |
Copy-Item dev-connections.json.example connections.json
workingDirectory: $(Build.SourcesDirectory)/src/promptflow

- task: PowerShell@2
displayName: 'Run sdk cli tests'
inputs:
targetType: 'inline'
script: |
pytest tests/ -m "csharp"
workingDirectory: $(Build.SourcesDirectory)/src/promptflow-devkit
env:
CSHARP_TEST_PROJECTS_ROOT: $(Build.SourcesDirectory)/$(flowProjectRelativePath)
AZURE_OPENAI_API_KEY: $(azureOpenAiApiKey)
AZURE_OPENAI_ENDPOINT: $(azureOpenAiApiBase)
IS_IN_CI_PIPELINE: true

- task: PowerShell@2
displayName: 'Run azure sdk cli tests'
inputs:
targetType: 'inline'
script: |
pytest tests/sdk_cli_azure_test/e2etests/test_csharp_sdk.py
workingDirectory: $(Build.SourcesDirectory)/src/promptflow-azure
env:
CSHARP_TEST_PROJECTS_ROOT: $(Build.SourcesDirectory)/$(flowProjectRelativePath)
AZURE_OPENAI_API_KEY: $(azureOpenAiApiKey)
AZURE_OPENAI_ENDPOINT: $(azureOpenAiApiBase)
PROMPT_FLOW_TEST_MODE: "replay"
IS_IN_CI_PIPELINE: true
Loading

0 comments on commit 3727106

Please sign in to comment.