Skip to content

Add Copilot instructions for repository context - #4

Merged
fbischoff merged 2 commits into
mainfrom
copilot/set-up-copilot-instructions
Jan 21, 2026
Merged

Add Copilot instructions for repository context#4
fbischoff merged 2 commits into
mainfrom
copilot/set-up-copilot-instructions

Conversation

Copilot AI commented Jan 21, 2026

Copy link
Copy Markdown

Configures GitHub Copilot coding agent with repository-specific context and conventions.

Changes

  • Created .github/copilot-instructions.md with:
    • Python 3.9-3.11 compatibility requirements
    • pytest conventions (use tmp_path, pytest.approx(), mock subprocess.run for obabel)
    • Code style: PEP 8, type hints, custom exceptions (ObabelNotFoundError, ObabelError)
    • Project-specific constants (ANGSTROM_TO_BOHR = 1.889725988579)
    • CI matrix testing setup and dependency management
    • Z-matrix/XYZ consistency requirements and external tool integration patterns

Provides Copilot with context to generate code that follows existing patterns for molecular geometry utilities, unit conversions, and subprocess-based tool integration.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gh.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for the repository Add Copilot instructions for repository context Jan 21, 2026
Copilot AI requested a review from fbischoff January 21, 2026 21:21
@fbischoff
fbischoff marked this pull request as ready for review January 21, 2026 21:24
Copilot AI review requested due to automatic review settings January 21, 2026 21:24
@fbischoff
fbischoff merged commit fc34fa1 into main Jan 21, 2026
4 of 11 checks passed
@fbischoff
fbischoff deleted the copilot/set-up-copilot-instructions branch January 21, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Configures repository-specific guidance for GitHub Copilot coding agent so generated changes align with existing project patterns (molecule utilities, Z-matrix handling, testing/CI expectations).

Changes:

  • Adds .github/copilot-instructions.md describing project scope, coding conventions, and testing practices
  • Documents expected CI behavior and supported Python versions
  • Captures domain-specific conventions (unit conversion constant, obabel integration, z-matrix/XYZ consistency)

Comment on lines +13 to +15
- **Supported versions**: Python 3.9, 3.10, and 3.11
- Always ensure code is compatible with all supported versions
- CI runs tests against all three versions

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

The stated supported Python versions (3.9–3.11) don’t match the repo’s CI configuration: .github/workflows/pytest.yml currently runs against Python 3.8 as well. Update these instructions (or the CI matrix) so the documented support and actual test matrix are consistent.

Suggested change
- **Supported versions**: Python 3.9, 3.10, and 3.11
- Always ensure code is compatible with all supported versions
- CI runs tests against all three versions
- **Supported versions**: Python 3.8, 3.9, 3.10, and 3.11
- Always ensure code is compatible with all supported versions
- CI runs tests against all four versions

Copilot uses AI. Check for mistakes.
Comment on lines +134 to +135
- Pure Python implementation available as fallback

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

This claims a “pure Python implementation available as fallback” for Z-matrix/XYZ conversions, but Molecule.to_zmatrix() always calls obabel and raises ObabelNotFoundError when it’s missing (there’s no runtime fallback to _xyz_to_zmatrix_self). Consider rewording to clarify that only from_zmatrix() is pure-Python, or implement an actual fallback path in to_zmatrix().

Suggested change
- Pure Python implementation available as fallback
- Z-matrix parsing (`from_zmatrix()`) is implemented in pure Python
- Z-matrix generation (`to_zmatrix()`) currently requires `obabel` and raises `ObabelNotFoundError` if it is not available

Copilot uses AI. Check for mistakes.
Comment on lines +101 to +117
## CI/CD

### GitHub Actions
- **Workflow file**: `.github/workflows/python-pytest.yml`
- **Trigger**: Pushes and PRs to `main` or `master` branches
- **Matrix testing**: Runs on Python 3.9, 3.10, and 3.11
- **Steps**:
1. Checkout code
2. Set up Python
3. Cache pip dependencies
4. Install dependencies (pytest and numpy)
5. Run pytest with `-q -r a` flags

### CI Requirements
- All tests must pass on all supported Python versions
- No external dependencies (like Open Babel) required in CI

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

The CI section describes a single workflow (python-pytest.yml) and its steps, but the repo also has .github/workflows/pytest.yml with a different Python matrix and dependency install behavior. To avoid misleading Copilot, either document both workflows (and their differences) or remove/rename the unused one so there’s a single source of truth.

Copilot uses AI. Check for mistakes.
Comment on lines +86 to +99
## Project Structure

```
.
├── .github/
│ └── workflows/ # CI/CD workflows
├── tests/ # Test files
│ ├── conftest.py # Pytest fixtures
│ ├── test_molecule.py # Molecule class tests
│ └── test_kabsch.py # Kabsch algorithm tests
├── molecule.py # Main molecule utilities module
├── main.py # Sample script/entry point
└── README.md # Project documentation
```

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

The “Project Structure” tree omits the existing scripts/ directory and shows only one workflow file under .github/workflows/, which may give Copilot an inaccurate picture of the repo layout. Please update the tree to reflect the current directories/files.

Copilot uses AI. Check for mistakes.
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.

✨ Set up Copilot instructions

3 participants