Important
For detailed coding standards, testing requirements, and contribution workflows, see the Contributing Guide. This file provides agent-specific behavioral instructions and quick reference only.
pyDeprecate is a lightweight Python library providing decorator-based deprecation for functions, methods, and classes with automatic call forwarding. Python 3.9+, zero runtime dependencies.
Important
Before starting any work, agents MUST anchor themselves with the repository context. Read these files in order:
Note
Anchor Links: GitHub generates anchors from section headers. Sections with emojis (e.g., ## 🚀 Quick Start) become #-quick-start (emoji → dash). Subsections without emojis (e.g., ### Test Organization) become #test-organization (no dash). All links follow this convention and are correct.
-
Configuration files (source of truth):
pyproject.toml— project config, tool settings (ruff, mypy, pytest).pre-commit-config.yaml— pre-commit hooks configurationsetup.py— package metadata and dependencies.github/workflows/*.yml— CI/CD pipeline configuration
-
Documentation and guidelines:
- CONTRIBUTING.md — contribution workflow, coding standards, testing requirements
README.md— project usage and APIsrc/deprecate/— core library code to understand existing patterns
-
Project structure: For codebase layout and file organization, explore the repository structure directly or see Test Organization for test file structure
Warning
If documentation contradicts actual configuration, the configuration files have higher authority. When you detect a mismatch:
- Trust the config file (e.g.,
pyproject.toml,.pre-commit-config.yaml) - Suggest updating the documentation to match reality
- Report the mismatch clearly to maintainers
When you find a mismatch:
Write a clear explanation linking to both sources, then let maintainers decide on the update action:
"I notice CONTRIBUTING.md:45 mentions using black for formatting, but pyproject.toml:23 actually configures ruff. The config file should be considered correct. Should the documentation be updated to reflect that ruff handles formatting?"
Scope: Core logic, CI/CD, and Python compatibility
Responsibilities:
- Review PRs modifying
src/code - Validate deprecation warnings and function/class deprecations
- Ensure Python patterns for backwards compatibility
- Monitor CI/CD pipeline health
Guidelines:
- Follow Coding Standards
- Follow Test Requirements
- Use Branch Naming Convention
Scope: Documentation and communication
Responsibilities:
- Maintain README and documentation
- Draft follow-ups after releases or PR merges
- Help onboard new contributors
- Ensure deprecation examples are documented
Guidelines:
- Follow Documentation Guidelines
- See Ways to Contribute
Scope: Security monitoring and vulnerability assessment
Responsibilities:
- Monitor dependencies for vulnerabilities
- Review PRs for security issues
- Follow Security Policy
- Use branch naming convention:
{type}/{issue-nb}-description - Types:
fix/,feat/,docs/,refactor/,test/,chore/
- Use Test-Driven Development (TDD): Write a failing test that reproduces the bug first, then implement the fix
- See Fixing Bugs for complete workflow
- Require approval first: See Building Features
- Mandatory test coverage: Happy path, failure path, and edge cases
- See Test Requirements
- Zero runtime dependencies — never add to
install_requires - Type hints required — all function signatures must have type hints
- No bare
except:— always catch specific exceptions - Fast imports — no expensive module-level code
- See Coding Standards for complete rules
- Three-layer separation: targets in
collection_targets.py, deprecated wrappers incollection_deprecate.py, test logic intest_*.py - Do not define targets or
@deprecatedwrappers directly in test files - See Test Organization for details
- Add runtime dependencies
- Commit sensitive information (
.env, API keys) - Use bare
except:clauses - Define deprecated wrappers inside test files
- Skip test coverage for new features or bug fixes
- Implement features without maintainer approval
- Start work without first reading config files and guidelines
- Anchor with repository context first — read config files (
pyproject.toml,.pre-commit-config.yaml) and guidelines before any work - Trust config files over documentation — when mismatches occur, config files are the source of truth
- Suggest documentation updates when you find mismatches between docs and actual configuration
- Update docs immediately after any structural change — adding, moving, renaming, or deleting files/folders/modules must be followed by updating
.github/CONTRIBUTING.md(project structure tree, Test Organisation table) and any other*.mdthat references affected paths or names. Do not wait to be asked. - Ensure pre-commit hooks are installed (they run automatically on commit)
- Provide
deprecated_inandremove_inversions - Include migration messages in deprecation warnings
- Write tests first when fixing bugs (TDD)
- Cover happy path, failure path, and edge cases in tests
This file provides quick reference for agents. For complete, authoritative guidelines:
- Contribution workflow → Contributing Guide
- Coding standards → Contributing: Coding Standards
- Testing requirements → Contributing: Tests and Quality
- PR process → Contributing: Pull Requests
- PR review guidelines → Contributing: Reviewing PRs
- Security reporting → Security Policy
- Community guidelines → Code of Conduct