Skip to content

Conversation

Copy link

Copilot AI commented Oct 18, 2025

Overview

This PR configures GitHub Copilot instructions for the EasyReflectometryLib repository by adding a comprehensive .github/copilot-instructions.md file. These instructions will help GitHub Copilot provide better, more contextually appropriate code suggestions that align with the project's standards and practices.

What's Included

The instructions file provides Copilot with detailed guidance on:

Development Standards

  • Python versions: 3.11, 3.12 across Linux, macOS, and Windows
  • Code style: Ruff configuration with 127-character line length, single quotes, and force single-line imports
  • Linting rules: pycodestyle (E), Pyflakes (F), isort (I), and flake8-bandit security checks (S)

Documentation Style

  • Docstring format: Sphinx/reStructuredText style with :param, :type, :return, and :rtype annotations
  • Documentation build: Sphinx 8.1.3 with myst_parser for Markdown support

Testing Requirements

  • Framework: pytest with pytest-cov for coverage tracking
  • Guidelines: Write tests for new functionality, follow existing patterns, use descriptive test names

Project Structure

  • Clear overview of the package layout including calculators (refnx, refl1d), models, samples, and special calculations
  • Note that BornAgain calculator exists but is not yet functional

Development Workflow

  • Git commit message style and branch naming conventions
  • Pull request requirements (tests, documentation, CI checks)
  • CI/CD pipeline description (code consistency, testing, package validation)

Best Practices

  • Make minimal changes to accomplish tasks
  • Maintain backward compatibility
  • Run tests and linting before committing
  • Follow existing code patterns in the repository

Benefits

With these instructions, GitHub Copilot will:

  • Generate code that follows the project's style guidelines automatically
  • Suggest appropriate test patterns consistent with the existing test suite
  • Use the correct docstring format for documentation
  • Be aware of security considerations and CI/CD requirements
  • Understand the project structure and dependencies

References

This implementation follows the best practices documented in GitHub's Copilot coding agent documentation.

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)

Fixes #276


💡 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 self-assigned this Oct 18, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['chore', 'fix', 'bugfix', 'bug', 'enhancement', 'feature', 'dependencies', 'documentation']

@rozyczko rozyczko changed the base branch from master to develop October 18, 2025 10:10
@rozyczko rozyczko added chore Chore changes to the code [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) [priority] highest Urgent. Needs attention ASAP labels Oct 18, 2025
Co-authored-by: rozyczko <8266281+rozyczko@users.noreply.github.com>
Copilot AI and others added 2 commits October 18, 2025 10:15
Co-authored-by: rozyczko <8266281+rozyczko@users.noreply.github.com>
Co-authored-by: rozyczko <8266281+rozyczko@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure Copilot instructions for repository ✨ Set up Copilot instructions for EasyReflectometryLib Oct 18, 2025
Copilot AI requested a review from rozyczko October 18, 2025 10:17
Copilot finished work on behalf of rozyczko October 18, 2025 10:17
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.61%. Comparing base (d5ec71a) to head (ca314ec).
⚠️ Report is 333 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (d5ec71a) and HEAD (ca314ec). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d5ec71a) HEAD (ca314ec)
1 0
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #277      +/-   ##
===========================================
- Coverage    97.90%   89.61%   -8.30%     
===========================================
  Files           43       44       +1     
  Lines         3248     2349     -899     
  Branches         0      271     +271     
===========================================
- Hits          3180     2105    -1075     
- Misses          68      195     +127     
- Partials         0       49      +49     
Flag Coverage Δ
unittests 89.61% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozyczko rozyczko marked this pull request as ready for review October 18, 2025 12:36
@rozyczko rozyczko merged commit 2800d4e into develop Oct 18, 2025
32 of 33 checks passed
@rozyczko rozyczko deleted the copilot/set-up-copilot-instructions branch October 18, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore changes to the code [priority] highest Urgent. Needs attention ASAP [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants