docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023
docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023dashitongzhi wants to merge 1 commit into
Conversation
Provide new contributors with a single entry point covering development setup on Linux/macOS/Windows, build instructions for the MuPDF-backed extension, the scripts/test.py workflow used by CI, code style and commit conventions, and the pull-request process. Also link to the existing tests, docs, and release tooling so reviewers can find the relevant scripts without spelunking through the repo.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new contributing guide for PyMuPDF to help contributors set up a dev environment, build from source, run tests, and follow project conventions.
Changes:
- Introduces
CONTRIBUTING.mdwith contribution workflow, style, testing, and CI guidance - Documents platform prerequisites and common build/test commands
- Establishes commit message and PR process expectations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | Variable | Purpose | | ||
| |-------------------|--------------------------------------------------------| | ||
| | `PYMUPDF_USE_BSD` | Use the BSD-licensed MuPDF build instead of AGPL. | | ||
| | `PYMUPDF_MUPDF_REF` | Override the MuPDF git ref used during the build. | | ||
| | `PYMUPDF_SKIP_PYMUPDF_C` | Skip compiling `pymupdf_c` (useful for doc-only changes). | |
Summary
CONTRIBUTING.md(248 lines) at the repository root with a table of contents and 13 sections covering code of conduct, getting help, bug reports, feature requests, development setup on Linux/macOS/Windows, building from source (includingPYMUPDF_USE_BSDandPYMUPDF_MUPDF_REFenvironment variables), running tests viascripts/test.py, coding style, conventional-commit guidance, the pull-request process, documentation workflow, release process, and licensing.scripts/,docs/,changes.txt,.github/workflows/, and theCOPYINGfile so new contributors can navigate the repo without having to dig through it.Motivation
PyMuPDF is a 9.9k-star project with an active user base, but the repository did not have a top-level
CONTRIBUTING.md. New contributors (and even regular users trying to build from source) currently have to reverse-engineer the build process fromsetup.py, the CI matrix in.github/workflows/, and thescripts/test.pyrunner. A single, well-structured guide lowers the barrier to entry, reduces low-quality issue traffic, and gives reviewers a shared reference for the project's contribution conventions (PEP 8 + conventional commits, single-maintainer approval, squash-merge).This PR is a docs-only change; it does not touch any code, tests, or build configuration, so it is safe to fast-track and easy to amend.
Test Plan
git statusshows only the newCONTRIBUTING.md(249 insertions, 0 deletions).wc -l CONTRIBUTING.mdreports 248 lines of substantive content (well above the 25-line threshold)../COPYING,docs/,scripts/test.py,pytest.ini,.github/workflows/,changes.txt).gh pr create.