Skip to content

Add .github/copilot-instructions.md to configure Copilot coding agent#199

Merged
espenhgn merged 4 commits intomasterfrom
copilot/set-up-copilot-instructions
Apr 10, 2026
Merged

Add .github/copilot-instructions.md to configure Copilot coding agent#199
espenhgn merged 4 commits intomasterfrom
copilot/set-up-copilot-instructions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

Adds repository-specific instructions for the GitHub Copilot coding agent as recommended in the best practices guide. Also merges the current master branch and updates the instructions to reflect the latest project state.

Description

New file: .github/copilot-instructions.md covering:

  • Project overview — electrostatic forward modeling library; core get_transformation_matrix() pattern returning M such that Y = M @ I
  • Repository structure — annotated directory tree mapping source, tests, docs, examples, and workflows (updated to reference pyproject.toml instead of setup.py/setup.cfg)
  • Architecture patternsCellGeometry, LinearModel base class, subclassing contract, EEG/MEG dipole-moment pipeline
  • Physical units table — nA (currents), µm (space), mV (potentials), S/m (conductivity), nA·µm (dipole moment), nA/µm (B-field)
  • Coding conventions — PEP 8, 127-char line limit, NumPy docstrings, import ordering
  • Dev commands — Poetry install, flake8 lint invocations matching CI, py.test -v test runner
  • Dependencies — numpy >= 1.15.2, scipy >= 1.5.2, sympy (optional), MEAutility >= 1.5.1; Python >= 3.10 required
  • Contributing pointers — CONTRIBUTING.md, PR template, pre-PR checklist

Merged master bringing in: switch from setup.py/setup.cfg to Poetry (pyproject.toml), Python >= 3.10 requirement, updated CI workflows, and a fix to LaminarCurrentSourceDensity.

Related Issue

Motivation and Context

Without a copilot-instructions.md, Copilot has no project-specific context: it doesn't know the unit conventions, the mandatory get_transformation_matrix() contract, the flake8 line-length setting, or how to run tests. This file gives the agent enough domain knowledge to generate consistent, correct contributions. The instructions were also updated to stay accurate after merging the latest changes from master (notably the migration to Poetry and Python >= 3.10).

How Has This Been Tested

Documentation-only change; no executable code modified. The merge with master was verified to complete without conflicts.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Configure instructions for Copilot coding agent Add .github/copilot-instructions.md to configure Copilot coding agent Mar 30, 2026
Copilot AI requested a review from espenhgn March 30, 2026 10:55
@espenhgn espenhgn added the enhancement New feature or request label Apr 10, 2026
@espenhgn
Copy link
Copy Markdown
Contributor

@copilot merge with the current master branch

Copilot AI and others added 2 commits April 10, 2026 08:21
…lot-instructions

Co-authored-by: espenhgn <2492641+espenhgn@users.noreply.github.com>
…y/Python 3.10

Agent-Logs-Url: https://github.com/LFPy/LFPykit/sessions/ad8904ef-d187-4c7b-b940-9ea7ec89a953

Co-authored-by: espenhgn <2492641+espenhgn@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot merge with the current master branch

Done — merged master into this branch (commit d410217). Also updated copilot-instructions.md (commit a8d47c3) to reflect the build system change to Poetry and the Python >= 3.10 requirement that came in from master.

@espenhgn espenhgn marked this pull request as ready for review April 10, 2026 08:29
@espenhgn espenhgn merged commit d0785fc into master Apr 10, 2026
11 checks passed
@espenhgn espenhgn deleted the copilot/set-up-copilot-instructions branch April 10, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants