Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 24, 2025

This PR adds comprehensive development support for GitHub Copilot agents working in the DeePMD-kit codebase.

What's included

Comprehensive Copilot Instructions (.github/copilot-instructions.md)

  • Complete build workflow with exact timing expectations (67s Python build, 164s C++ build)
  • Virtual environment setup and dependency installation for all backends (TensorFlow, PyTorch, JAX, Paddle)
  • Optimized testing guidance: Emphasizes single test execution (~8-13 seconds) over full test suite (60+ minutes) for faster development feedback
  • Linting and formatting with ruff (1 second execution)
  • Multiple validation scenarios for CLI, Python interface, and training workflows
  • Directory structure reference and key file locations
  • Critical warnings with specific timeout recommendations to prevent premature cancellation
  • Conventional commit specification: Guidelines for commit messages and PR titles following type(scope): description format

Automated Environment Setup (.github/workflows/copilot-setup-steps.yml)

  • Pre-configures Python environment using uv for fast dependency management
  • Installs TensorFlow CPU and PyTorch automatically
  • Builds the DeePMD-kit package with all dependencies
  • Sets up pre-commit hooks for code quality
  • Validates installation to ensure environment readiness

Development Efficiency Features

  • All commands tested and validated with accurate timing measurements
  • Imperative tone throughout for clear action items
  • Copy-paste ready validation scenarios
  • Gitignore rules to prevent temporary test files from being committed

Key improvements for Copilot agents

  • Faster iteration: Single test recommendations instead of 60+ minute full test suites
  • Automated setup: No manual environment configuration needed
  • Precise expectations: Exact timing guidance prevents timeout issues during builds
  • Multi-backend support: Complete coverage of TensorFlow, PyTorch, JAX, and Paddle workflows
  • Consistent commit standards: Enforces conventional commit specification for all changes

The instructions enable any GitHub Copilot agent to work effectively in this codebase from a fresh clone with precise expectations for build times, test execution, and validation workflows.

Fixes #4910.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 24, 2025 14:19
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Copilot AI changed the title [WIP] [Feature Request] Set up Copilot environments and instructions Add comprehensive GitHub Copilot instructions for DeePMD-kit development Aug 24, 2025
Copilot AI requested a review from njzjz August 24, 2025 14:26
…emp files

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Copilot AI changed the title Add comprehensive GitHub Copilot instructions for DeePMD-kit development Add comprehensive GitHub Copilot instructions and environment setup for DeePMD-kit Aug 24, 2025
Copilot AI requested a review from njzjz August 24, 2025 14:38
@njzjz
Copy link
Member

njzjz commented Aug 24, 2025

pre-commit.ci autofix

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Copilot AI changed the title Add comprehensive GitHub Copilot instructions and environment setup for DeePMD-kit docs: add comprehensive GitHub Copilot instructions and environment setup Aug 24, 2025
Copilot AI requested a review from njzjz August 24, 2025 14:48
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
@njzjz
Copy link
Member

njzjz commented Aug 24, 2025

pre-commit.ci autofix

@njzjz njzjz marked this pull request as ready for review August 24, 2025 15:13
Copilot AI review requested due to automatic review settings August 24, 2025 15:13
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 comprehensive GitHub Copilot development support for the DeePMD-kit codebase, including detailed instructions and automated environment setup to help Copilot agents work effectively.

  • Complete development workflow documentation with precise timing expectations and build instructions
  • Automated GitHub Actions workflow for environment setup with dependency management
  • Testing guidance emphasizing single test execution over full test suites for faster iteration

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
.github/copilot-instructions.md Comprehensive documentation covering build processes, testing strategies, validation scenarios, and development workflows with specific timing expectations
.github/workflows/copilot-setup-steps.yml Automated environment setup workflow that pre-configures Python environment, installs dependencies, builds the package, and validates installation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.29%. Comparing base (191759b) to head (64c2a41).
⚠️ Report is 69 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #4911      +/-   ##
==========================================
- Coverage   84.29%   84.29%   -0.01%     
==========================================
  Files         702      702              
  Lines       68664    68665       +1     
  Branches     3573     3573              
==========================================
  Hits        57882    57882              
- Misses       9642     9643       +1     
  Partials     1140     1140              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@njzjz njzjz left a comment

Choose a reason for hiding this comment

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

LGTM

@njzjz njzjz added this pull request to the merge queue Aug 25, 2025
Merged via the queue into devel with commit 727ec3c Aug 25, 2025
106 checks passed
@njzjz njzjz deleted the copilot/fix-4910 branch August 25, 2025 12:20
ChiahsinChu pushed a commit to ChiahsinChu/deepmd-kit that referenced this pull request Dec 17, 2025
…etup (deepmodeling#4911)

This PR adds comprehensive development support for GitHub Copilot agents
working in the DeePMD-kit codebase.

## What's included

**Comprehensive Copilot Instructions
(`.github/copilot-instructions.md`)**
- Complete build workflow with exact timing expectations (67s Python
build, 164s C++ build)
- Virtual environment setup and dependency installation for all backends
(TensorFlow, PyTorch, JAX, Paddle)
- **Optimized testing guidance**: Emphasizes single test execution
(~8-13 seconds) over full test suite (60+ minutes) for faster
development feedback
- Linting and formatting with ruff (1 second execution)
- Multiple validation scenarios for CLI, Python interface, and training
workflows
- Directory structure reference and key file locations
- Critical warnings with specific timeout recommendations to prevent
premature cancellation
- **Conventional commit specification**: Guidelines for commit messages
and PR titles following `type(scope): description` format

**Automated Environment Setup
(`.github/workflows/copilot-setup-steps.yml`)**
- Pre-configures Python environment using uv for fast dependency
management
- Installs TensorFlow CPU and PyTorch automatically
- Builds the DeePMD-kit package with all dependencies
- Sets up pre-commit hooks for code quality
- Validates installation to ensure environment readiness

**Development Efficiency Features**
- All commands tested and validated with accurate timing measurements
- Imperative tone throughout for clear action items
- Copy-paste ready validation scenarios
- Gitignore rules to prevent temporary test files from being committed

## Key improvements for Copilot agents

- **Faster iteration**: Single test recommendations instead of 60+
minute full test suites
- **Automated setup**: No manual environment configuration needed
- **Precise expectations**: Exact timing guidance prevents timeout
issues during builds
- **Multi-backend support**: Complete coverage of TensorFlow, PyTorch,
JAX, and Paddle workflows
- **Consistent commit standards**: Enforces conventional commit
specification for all changes

The instructions enable any GitHub Copilot agent to work effectively in
this codebase from a fresh clone with precise expectations for build
times, test execution, and validation workflows.

Fixes deepmodeling#4910.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

[Feature Request] Set up Copilot environments and instructions

3 participants