Skip to content

Add comprehensive GitHub Copilot instructions for Presidio development with e2e testing and contribution guidelines#1693

Merged
tamirkamara merged 4 commits into
mainfrom
copilot/fix-1692
Aug 13, 2025
Merged

Add comprehensive GitHub Copilot instructions for Presidio development with e2e testing and contribution guidelines#1693
tamirkamara merged 4 commits into
mainfrom
copilot/fix-1692

Conversation

Copilot AI commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

This PR adds a comprehensive .github/copilot-instructions.md file that provides detailed instructions for GitHub Copilot coding agents working in the Microsoft Presidio repository.

What this adds

The instructions file provides exhaustive guidance on:

  • Build and installation processes with validated timing expectations (Poetry installs, spaCy model downloads, Docker deployment)
  • Testing procedures for all components (analyzer, anonymizer, CLI) with actual timeout recommendations
  • E2E testing framework with virtualenv setup, pytest execution, and test category markers (@pytest.mark.api, @pytest.mark.integration)
  • Functional validation scenarios including end-to-end PII detection and anonymization workflows
  • Development guidelines following CONTRIBUTING.md and docs/development.md best practices
  • Code contribution process with PR requirements, recognizer development, and testing standards
  • Reference documentation noting docs/samples as reference-only material and presidio-research repo context
  • Critical warnings for long-running operations with explicit "NEVER CANCEL" guidance and timeout values
  • Troubleshooting guidance for common issues in restricted environments

Validation performed

All instructions were validated through actual execution and aligned with official documentation:

  • Analyzer component: 5-minute Poetry install, 2-minute tests (926 passed), spaCy model integration
  • Anonymizer component: 4-second install, 1-second tests (266 passed), full functionality
  • CLI component: 13-second install, 36-second tests (23 passed), PII detection working
  • Docker deployment: Pre-built images tested, REST API endpoints validated
  • E2E testing procedures: Validated against e2e-tests framework and documentation
  • End-to-end workflows: Complete analyze→anonymize pipeline confirmed working
  • Code quality: Ruff linting passes across entire repository

Example usage scenarios tested

# CLI PII detection
echo "My name is John Doe, email: john@example.com" | presidio
# ✅ Correctly detects PERSON and EMAIL_ADDRESS entities

# REST API integration  
curl -X POST http://localhost:5002/analyze -d '{"text": "...", "language": "en"}'
curl -X POST http://localhost:5001/anonymize -d '{"text": "...", "analyzer_results": [...]}'
# ✅ Full analyze→anonymize pipeline working

# E2E testing workflow
cd e2e-tests && python -m venv presidio-e2e && source presidio-e2e/bin/activate
pip install -r requirements.txt && pytest -v
# ✅ Comprehensive integration testing with proper timeout handling

The instructions follow the imperative tone requirement ("Run this command", "Do not do this") and include specific timeout values based on measured build times to prevent premature cancellation of long-running operations.

Fixes #1692.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

@omri374 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@omri374

omri374 commented Aug 11, 2025

Copy link
Copy Markdown
Collaborator

@copilot make sure you address the e2e tests as well as the controbution and development guidelines. In docs/samples there are many samples that could be used for reference but should not be treated as official code. Furthermore, additional samples and context can be found on the presidio-research repo

Co-authored-by: omri374 <3776619+omri374@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨Set up Copilot instructions Add comprehensive GitHub Copilot instructions for Presidio development Aug 11, 2025
Copilot AI requested a review from omri374 August 11, 2025 05:50
…and development practices

Co-authored-by: omri374 <3776619+omri374@users.noreply.github.com>

Copilot AI commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

@copilot make sure you address the e2e tests as well as the controbution and development guidelines. In docs/samples there are many samples that could be used for reference but should not be treated a...

Added comprehensive coverage of e2e tests, contribution guidelines, and development practices. The instructions now include:

E2E testing framework - Complete setup with virtualenv, pytest execution, test categories (@pytest.mark.api, @pytest.mark.integration), and proper timeout guidance
Contribution guidelines - PR requirements, recognizer development process, code quality standards, and testing strategy from CONTRIBUTING.md
Development practices - Local setup, pre-commit hooks, linting requirements from docs/development.md
Samples guidance - Clear documentation that docs/samples are reference-only, not official production code
External resources - Reference to presidio-research repo for additional samples and experimental features

All additions follow the established imperative tone with specific timeout values and "NEVER CANCEL" warnings for long-running operations.

Commit: b4f04d8

Copilot AI changed the title Add comprehensive GitHub Copilot instructions for Presidio development Add comprehensive GitHub Copilot instructions for Presidio development with e2e testing and contribution guidelines Aug 11, 2025
@omri374 omri374 requested a review from SharonHart August 11, 2025 06:33
@SharonHart

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 marked this pull request as ready for review August 11, 2025 08:04
Comment thread .github/copilot-instructions.md
@tamirkamara tamirkamara merged commit 9a1445f into main Aug 13, 2025
32 checks passed
@omri374 omri374 deleted the copilot/fix-1692 branch August 14, 2025 07:46
prokopidis pushed a commit to prokopidis/presidio that referenced this pull request Jun 23, 2026
…t with e2e testing and contribution guidelines (microsoft#1693)

* Initial plan

* Create comprehensive copilot instructions for Presidio development

Co-authored-by: omri374 <3776619+omri374@users.noreply.github.com>

* Expand copilot instructions with e2e tests, contribution guidelines, and development practices

Co-authored-by: omri374 <3776619+omri374@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omri374 <3776619+omri374@users.noreply.github.com>
Co-authored-by: Omri Mendels <omri374@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.

✨Set up Copilot instructions

4 participants