Skip to content

Commit

Permalink
fix(ci): Fix "poetry could not find a pyproject.toml" in import lint …
Browse files Browse the repository at this point in the history
…workflow (#3935)

# Description

This pull request fixes an issue with the import lint PR workflow, which
errors out with message:

```
Poetry could not find a pyproject.toml file in /home/runner/work/promptflow/promptflow or its parents
```

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution
guidelines](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md).**
- [ ] **I confirm that all new dependencies are compatible with the MIT
license.**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
kdestin authored Jan 23, 2025
1 parent 8e2a856 commit 7d4287b
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/promptflow-import-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,28 @@ jobs:
- name: Install all packages
run: |
touch src/promptflow-tracing/promptflow/__init__.py
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing
poetry install -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing --with dev
touch src/promptflow-core/promptflow/__init__.py
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-core
poetry install -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-core --with dev
touch src/promptflow-devkit/promptflow/__init__.py
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit
poetry install -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit --with dev
touch src/promptflow-azure/promptflow/__init__.py
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure
poetry install -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure --with dev
touch src/promptflow-evals/promptflow/__init__.py
poetry install --with dev -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals
poetry install -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals --with dev
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
poetry -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing run lint-imports
echo "=== Running import lint in promptflow-core ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core
poetry run lint-imports
poetry -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-core run lint-imports
echo "=== Running import lint in promptflow-devkit ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit
poetry run lint-imports
poetry -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit run lint-imports
echo "=== Running import lint in promptflow-azure ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure
poetry run lint-imports
poetry -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure run lint-imports
echo "=== Running import lint in promptflow-evals ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals
poetry run lint-imports
poetry -C ${{ env.WORKING_DIRECTORY }}/src/promptflow-evals run lint-imports
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: import lint testing private imports from global
working-directory: ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure
Expand Down

0 comments on commit 7d4287b

Please sign in to comment.