-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||||||||||||||||||||||||||
| name: Python Package using Conda | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| on: [push] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| build-linux: | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||
| max-parallel: 5 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v6 |
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 |
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 |
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 |
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.