Skip to content

Commit 693ef59

Browse files
Copilotnjzjz
andauthored
docs: clean up redundant Copilot instructions (#540)
The `.github/copilot-instructions.md` file contained setup instructions that duplicated the automated setup already provided by `copilot-setup-steps.yml`. This created confusion and unnecessary maintenance overhead. ## Changes Made **Removed redundant setup sections:** - Eliminated manual environment setup instructions (Python, uv, pre-commit, pyright installation) - Removed the entire "Copilot Agent Environment Setup" section that duplicated automated setup - Simplified the "Bootstrap, Build, and Test" section to focus on usage rather than setup **Updated documentation to reflect automated setup:** - Modified environment setup instructions to simply reference activating the pre-configured virtual environment - Updated troubleshooting section to reflect that tools are pre-installed - Revised development notes to mention the pre-configured environment **Preserved essential information:** - Kept all usage instructions for running tests, linting, type checking, and building documentation - Maintained CLI usage examples and validation steps - Preserved timing information and troubleshooting guidance ## Impact The instructions now accurately reflect that the Copilot environment automatically sets up all necessary tools, eliminating redundancy while maintaining all essential information for developers. This reduces confusion and ensures the documentation stays in sync with the automated setup process. Fixes #539. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `docs.deepmodeling.com` > - Triggering command: `/home/REDACTED/work/dpdispatcher/dpdispatcher/.venv/bin/python3 /home/REDACTED/work/dpdispatcher/dpdispatcher/.venv/bin/sphinx-build -M html . _build` (dns block) > - `docs.python.org` > - Triggering command: `/home/REDACTED/work/dpdispatcher/dpdispatcher/.venv/bin/python3 /home/REDACTED/work/dpdispatcher/dpdispatcher/.venv/bin/sphinx-build -M html . _build` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/deepmodeling/dpdispatcher/settings/copilot/coding_agent) (admins only) > > </details> <!-- 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] <[email protected]> Co-authored-by: njzjz <[email protected]>
1 parent 41872d2 commit 693ef59

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

.github/copilot-instructions.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ Always reference these instructions first and fallback to search or bash command
88

99
### Bootstrap, Build, and Test
1010

11-
- **Create virtual environment and install:**
11+
- **Environment setup:** The Python environment, `uv`, `pre-commit`, and `pyright` are automatically set up by the Copilot environment. Simply activate the virtual environment:
1212

1313
```bash
14-
uv venv .venv
1514
source .venv/bin/activate
16-
uv pip install .[test] coverage
17-
uv tool install pre-commit
18-
uv tool install pyright
1915
```
2016

2117
- **Run the test suite:**
@@ -55,24 +51,6 @@ Always reference these instructions first and fallback to search or bash command
5551

5652
- **TIMING: Documentation build takes ~14 seconds.**
5753

58-
### Copilot Agent Environment Setup
59-
60-
Following GitHub's Copilot agent environment guidelines, this project uses:
61-
62-
- **`uv`** for Python environment and dependency management
63-
- **`uv tool install`** for development tools (`pre-commit`, `pyright`)
64-
- **`pre-commit`** for automated code quality checks (preferred over direct tool usage)
65-
66-
```bash
67-
# Initial setup
68-
uv venv .venv
69-
source .venv/bin/activate
70-
uv pip install .[test] coverage
71-
uv tool install pre-commit
72-
uv tool install pyright
73-
pre-commit install --install-hooks
74-
```
75-
7654
### CLI Usage
7755

7856
- **Test basic CLI functionality:**
@@ -177,18 +155,18 @@ dpdisp run examples/dpdisp_run.py
177155

178156
## Development Notes
179157

180-
- **Always use virtual environments** - The system Python is externally managed
158+
- **Virtual environment is pre-configured** - The environment is automatically set up; simply activate with `source .venv/bin/activate`
181159
- **Always add type hints** - Include proper type annotations in all Python code for better maintainability
182160
- **Always use conventional commit format** - All commit messages and PR titles must follow the conventional commit specification (e.g., `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`)
183161
- **Test artifacts are gitignored** - Job execution creates temporary files that are automatically excluded
184-
- **Pre-commit hooks available** - Use `pre-commit install --install-hooks` to enable automated code quality checks
162+
- **Pre-commit hooks are ready** - Pre-commit is pre-installed and hooks are configured
185163
- **Multiple execution contexts** - Code supports local execution, SSH remote execution, and various HPC schedulers
186164
- **Extensive examples** - Use `examples/` directory as reference for proper configuration formats
187165

188166
## Troubleshooting
189167

190-
- **Virtual environment issues:** Always use `uv venv .venv` and `source .venv/bin/activate`
191-
- **Tool installation:** Use `uv tool install pre-commit` and `uv tool install pyright` for dev tools
168+
- **Virtual environment issues:** The virtual environment is pre-created; simply activate with `source .venv/bin/activate`
169+
- **Development tools:** `pre-commit` and `pyright` are pre-installed and ready to use
192170
- **Test failures:** Most tests run locally; some require specific HPC environments and will be skipped
193171
- **Documentation build warnings:** Some warnings about external inventory URLs are expected in sandboxed environments
194172
- **Pre-commit network issues:** If pre-commit fails with network timeouts, run `ruff check` and `ruff format` directly

0 commit comments

Comments
 (0)