Skip to content

[chore] Add sanity checks for docstring, license and DCO#10

Merged
0oshowero0 merged 6 commits intoAscend:mainfrom
0oshowero0:sanity
Jan 25, 2026
Merged

[chore] Add sanity checks for docstring, license and DCO#10
0oshowero0 merged 6 commits intoAscend:mainfrom
0oshowero0:sanity

Conversation

@0oshowero0
Copy link
Collaborator

@0oshowero0 0oshowero0 commented Jan 25, 2026

  1. DCO Check (.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.
  2. Docstring Validation (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.
  3. License Header Check (check_license.py): Added a script to scan source files and verify the presence of the required license header.

Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Copilot AI review requested due to automatic review settings January 25, 2026 06:19
Copy link
Contributor

Copilot AI left a 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 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]

Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
permissions:
pull-requests: read
contents: read

Copilot uses AI. Check for mistakes.
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
@0oshowero0 0oshowero0 merged commit 214a4d6 into Ascend:main Jan 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant