[chore] Add sanity checks for docstring, license and DCO#10
[chore] Add sanity checks for docstring, license and DCO#100oshowero0 merged 6 commits intoAscend:mainfrom
Conversation
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
There was a problem hiding this comment.
Pull request overview
This PR adds infrastructure for code quality checks including DCO (Developer Certificate of Origin) validation, license header verification, and docstring validation. It also adds Apache 2.0 license headers to multiple Python files that previously lacked them.
Changes:
- Added DCO check workflow to validate signed-off-by lines in commits
- Added sanity check workflow for license headers and docstrings
- Added Python scripts to check license headers and docstrings
- Added Apache 2.0 license headers to 7 existing Python files
- Updated workflow branch configurations to include v0.* branches
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/dco-check.yml | New workflow to check DCO sign-offs on commits |
| .github/workflows/sanity.yml | New workflow to run license and docstring checks |
| .github/workflows/python-package.yml | Updated branch triggers to include v0.* branches |
| .github/workflows/pre-commit.yml | Updated branch triggers to include v0.* branches |
| tests/sanity/check_license.py | New script to verify Apache 2.0 license headers in Python files |
| tests/sanity/check_docstrings.py | New script to check for missing docstrings in functions and classes |
| transfer_queue/storage/managers/mooncake_manager.py | Added Apache 2.0 license header |
| transfer_queue/storage/clients/ray_storage_client.py | Added Apache 2.0 license header |
| transfer_queue/storage/clients/mooncake_client.py | Added Apache 2.0 license header |
| tests/test_ray_p2p.py | Added Apache 2.0 license header |
| scripts/put_benchmark.py | Added Apache 2.0 license header |
| scripts/performance_test.py | Added Apache 2.0 license header |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
There was a problem hiding this comment.
The workflow is missing a permissions section. Following security best practices, GitHub Actions workflows should explicitly define permissions. Consider adding a permissions section that specifies only the minimum required permissions. For this DCO check workflow, you likely need "pull-requests: read" and "contents: read".
| permissions: | |
| pull-requests: read | |
| contents: read |
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/dco-check.yml): Added a GitHub Action workflow to ensure all commits contain a Signed-off-by line, complying with the Developer Certificate of Origin.check_docstrings.py): Added a script that checks for missing docstrings in modules/classes/functions exported via all. It supports an allow-list for exceptions.check_license.py): Added a script to scan source files and verify the presence of the required license header.