docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023
Open
dashitongzhi wants to merge 2 commits into
Open
docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023dashitongzhi wants to merge 2 commits into
dashitongzhi wants to merge 2 commits 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.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
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.
Comment on lines
+122
to
+126
| | 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). | |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.