-
Notifications
You must be signed in to change notification settings - Fork 815
Improve developer effectiveness: unify quality gates, add Ruff linting, and fast smoke tests #5262
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
base: develop
Are you sure you want to change the base?
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,21 @@ | ||||
| repos: | ||||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||||
| rev: v5.0.0 | ||||
| hooks: | ||||
| - id: check-ast | ||||
| - id: check-yaml | ||||
| - id: end-of-file-fixer | ||||
| - id: trailing-whitespace | ||||
|
|
||||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||||
| rev: v0.9.10 | ||||
| hooks: | ||||
| - id: ruff | ||||
| files: ^(package|testsuite)/ | ||||
|
|
||||
| - repo: https://github.com/psf/black | ||||
| rev: 24.10.0 | ||||
| hooks: | ||||
| - id: black | ||||
| files: ^(package|testsuite)/ | ||||
| args: [--line-length=88] | ||||
|
||||
| args: [--line-length=88] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| line-length = 88 | ||||||
|
||||||
| line-length = 88 | |
| line-length = 79 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,7 +15,84 @@ pr: | |||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| - job: Precommit_Lint | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Pre-commit checks' | ||||||||||||||||||||||||||||||||||||||
| pool: | ||||||||||||||||||||||||||||||||||||||
| vmImage: 'ubuntu-latest' | ||||||||||||||||||||||||||||||||||||||
| variables: | ||||||||||||||||||||||||||||||||||||||
| PRE_COMMIT_HOME: '$(Pipeline.Workspace)/.pre-commit-cache' | ||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - task: UsePythonVersion@0 | ||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||
| versionSpec: '3.11' | ||||||||||||||||||||||||||||||||||||||
| addToPath: true | ||||||||||||||||||||||||||||||||||||||
| architecture: 'x64' | ||||||||||||||||||||||||||||||||||||||
| - task: Cache@2 | ||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||
| key: 'pre-commit | "$(Agent.OS)" | .pre-commit-config.yaml' | ||||||||||||||||||||||||||||||||||||||
| path: '$(PRE_COMMIT_HOME)' | ||||||||||||||||||||||||||||||||||||||
| restoreKeys: | | ||||||||||||||||||||||||||||||||||||||
| pre-commit | "$(Agent.OS)" | ||||||||||||||||||||||||||||||||||||||
| - script: python -m pip install --upgrade pip pre-commit | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Install pre-commit' | ||||||||||||||||||||||||||||||||||||||
| - script: PRE_COMMIT_HOME=$(PRE_COMMIT_HOME) pre-commit run --all-files | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Run pre-commit hooks' | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - job: Ruff_Lint | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Ruff lint checks' | ||||||||||||||||||||||||||||||||||||||
| pool: | ||||||||||||||||||||||||||||||||||||||
| vmImage: 'ubuntu-latest' | ||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - task: UsePythonVersion@0 | ||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||
| versionSpec: '3.11' | ||||||||||||||||||||||||||||||||||||||
| addToPath: true | ||||||||||||||||||||||||||||||||||||||
| architecture: 'x64' | ||||||||||||||||||||||||||||||||||||||
| - script: python -m pip install --upgrade pip ruff | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Install ruff' | ||||||||||||||||||||||||||||||||||||||
| - script: ruff check package testsuite | ||||||||||||||||||||||||||||||||||||||
| displayName: 'Run ruff checks' | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+41
to
+55
|
||||||||||||||||||||||||||||||||||||||
| - job: Ruff_Lint | |
| displayName: 'Ruff lint checks' | |
| pool: | |
| vmImage: 'ubuntu-latest' | |
| steps: | |
| - task: UsePythonVersion@0 | |
| inputs: | |
| versionSpec: '3.11' | |
| addToPath: true | |
| architecture: 'x64' | |
| - script: python -m pip install --upgrade pip ruff | |
| displayName: 'Install ruff' | |
| - script: ruff check package testsuite | |
| displayName: 'Run ruff checks' |
Copilot
AI
Feb 28, 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 smoke job installs a large set of unpinned runtime/test dependencies (e.g., numpy/matplotlib/pytest) directly from PyPI. Because this job is now a required quality gate for the full matrix, upstream releases can introduce flaky CI failures unrelated to the PR. Consider pinning these to a known-good constraints file (or to the same minimum/compatible versions used elsewhere in CI) to keep the smoke gate stable.
| cython | |
| h5py>=2.10 | |
| matplotlib | |
| numpy | |
| packaging | |
| pytest | |
| tqdm | |
| threadpoolctl | |
| filelock | |
| cython==3.0.8 | |
| h5py==3.10.0 | |
| matplotlib==3.8.2 | |
| numpy==1.26.4 | |
| packaging==23.2 | |
| pytest==7.4.4 | |
| tqdm==4.66.1 | |
| threadpoolctl==3.2.0 | |
| filelock==3.13.1 |
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 new
precommitjob runs the Ruff and Black hooks (per.pre-commit-config.yaml), but this workflow also runs Ruff again (ruff_check) and still has a dedicatedblackjob. This triples the same checks and increases CI time; consider either (1) using pre-commit as the single quality gate and dropping the redundant Ruff/Black jobs, or (2) configuring pre-commit here to run only the non-duplicated hooks.