prompty: fix parsing of tool_calls when array in arguments #2820
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: promptflow-import-linter | |
on: | |
pull_request: | |
paths: | |
- src/promptflow-tracing/** | |
- src/promptflow-core/** | |
- src/promptflow-devkit/** | |
- src/promptflow-azure/** | |
- .github/workflows/promptflow-import-linter.yml | |
workflow_dispatch: | |
env: | |
WORKING_DIRECTORY: ${{ github.workspace }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: snok/install-poetry@v1 | |
- name: Install all packages | |
run: | | |
touch src/promptflow-tracing/promptflow/__init__.py | |
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing | |
touch src/promptflow-core/promptflow/__init__.py | |
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-core | |
touch src/promptflow-devkit/promptflow/__init__.py | |
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit | |
touch src/promptflow-azure/promptflow/__init__.py | |
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure | |
touch src/promptflow-evals/promptflow/__init__.py | |
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
- name: import lint | |
run: | | |
echo "=== Running import lint in promptflow-tracing ===" | |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing | |
poetry run lint-imports | |
echo "=== Running import lint in promptflow-core ===" | |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core | |
poetry run lint-imports | |
echo "=== Running import lint in promptflow-devkit ===" | |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit | |
poetry run lint-imports | |
echo "=== Running import lint in promptflow-azure ===" | |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure | |
poetry run lint-imports | |
echo "=== Running import lint in promptflow-evals ===" | |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals | |
poetry run lint-imports | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
- name: import lint testing private imports from global | |
working-directory: ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure | |
run: | | |
set -xe | |
rm ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing/promptflow/__init__.py | |
rm ${{ env.WORKING_DIRECTORY }}/src/promptflow-core/promptflow/__init__.py | |
rm ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit/promptflow/__init__.py | |
rm ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure/promptflow/__init__.py | |
rm ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals/promptflow/__init__.py | |
echo "=== Add more import linter when facing more import errors ===" | |
echo "=== promptflow-azure full lints ===" | |
poetry run pip install langchain | |
poetry run pip install "tenacity<8.4.0" | |
poetry run python ${{ github.workspace }}/scripts/import_linter/import_linter.py |