Skip to content

docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023

Open
dashitongzhi wants to merge 1 commit into
pymupdf:mainfrom
dashitongzhi:docs/add-contributing-20260613092203
Open

docs: add CONTRIBUTING.md with setup, testing, and PR guide#5023
dashitongzhi wants to merge 1 commit into
pymupdf:mainfrom
dashitongzhi:docs/add-contributing-20260613092203

Conversation

@dashitongzhi

Copy link
Copy Markdown

Summary

  • Adds a new 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 (including PYMUPDF_USE_BSD and PYMUPDF_MUPDF_REF environment variables), running tests via scripts/test.py, coding style, conventional-commit guidance, the pull-request process, documentation workflow, release process, and licensing.
  • Links to existing scripts/, docs/, changes.txt, .github/workflows/, and the COPYING file 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 from setup.py, the CI matrix in .github/workflows/, and the scripts/test.py runner. 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

  • Verified git status shows only the new CONTRIBUTING.md (249 insertions, 0 deletions).
  • wc -l CONTRIBUTING.md reports 248 lines of substantive content (well above the 25-line threshold).
  • All internal links resolve to files that already exist in the repo (./COPYING, docs/, scripts/test.py, pytest.ini, .github/workflows/, changes.txt).
  • Markdown renders cleanly on GitHub; no fenced-block or link warnings reported by gh pr create.
  • Reviewer to sanity-check wording and confirm the section list matches the maintainers' preferred onboarding flow.

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.
Copilot AI review requested due to automatic review settings June 13, 2026 01:23
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.md with 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 thread CONTRIBUTING.md
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). |
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.

2 participants