-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Create python-package-conda.yml #2889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds a new GitHub Actions workflow for testing the Python package using Conda. However, the workflow has several issues that prevent it from functioning properly and make it inconsistent with the project's existing testing infrastructure.
Key observations:
- Introduces a Conda-based CI workflow that references a non-existent environment.yml file
- Uses different tooling (flake8) than the existing workflow (ruff)
- Uses outdated GitHub Actions versions compared to existing workflows
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo $CONDA/bin >> $GITHUB_PATH | ||
| - name: Install dependencies | ||
| run: | | ||
| conda env update --file environment.yml --name base |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow references an environment.yml file that does not exist in the repository. The workflow will fail when trying to execute this step. Either create an environment.yml file with the necessary conda dependencies, or use the existing requirements-dev.txt file with pip instead.
| conda env update --file environment.yml --name base | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt |
| - name: Lint with flake8 | ||
| run: | | ||
| conda install flake8 | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow uses flake8 for linting, but the project uses ruff as its linter (as seen in .pre-commit-config.yaml and .github/workflows/python-test.yaml). This creates inconsistency in code quality checks. Consider using ruff instead to match the existing project standards.
| - name: Lint with flake8 | |
| run: | | |
| conda install flake8 | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Lint with ruff | |
| run: | | |
| conda install -c conda-forge ruff | |
| # stop the build if there are Python syntax errors or undefined names | |
| ruff check . | |
| # run ruff again but do not fail the build, treating all issues as warnings | |
| ruff check . || true |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v3 |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions/setup-python action is using version v3, which is outdated. The existing python-test.yaml workflow uses actions/setup-uv@v7 with uv for faster dependency management. Consider updating to use a similar approach or at least upgrade to the latest version of setup-python for better performance and security patches.
| uses: actions/setup-python@v3 | |
| uses: actions/setup-python@v5 |
| max-parallel: 5 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions/checkout action is using version v4, while the existing python-test.yaml workflow uses v6. Consider updating to v6 for the latest features and security improvements.
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v6 |
| @@ -0,0 +1,34 @@ | |||
| name: Python Package using Conda | |||
|
|
|||
| on: [push] | |||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow triggers on every push to any branch. The existing python-test.yaml workflow has more refined triggers with paths-ignore filters to avoid running on documentation-only changes. Consider adding similar filters to avoid unnecessary CI runs and reduce resource usage.
| on: [push] | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**/*.md' |
|
Since this PR has no description, I will assume its an accidentally public PR (intended for your private fork) and close the PR. |
Purpose
Does this introduce a breaking change?
When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.
Does this require changes to learn.microsoft.com docs?
This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.
Type of change
Code quality checklist
See CONTRIBUTING.md for more details.
python -m pytest).python -m pytest --covto verify 100% coverage of added linespython -m mypyto check for type errorsruffandblackmanually on my code.