-
Couldn't load subscription status.
- Fork 779
uv workspace layout, broke out PyMuPDF
#1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR restructures the codebase to adopt the uv workspace layout and extracts PyMuPDF functionality into a separate package as preparation for PyPDF support.
- Migrates the project structure to use
uvworkspace layout with packages underpackages/directory - Extracts PyMuPDF-related functionality into a separate
paper-qa-pymupdfpackage - Updates import statements and configuration files to reflect the new package structure
Reviewed Changes
Copilot reviewed 15 out of 61 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Configures uv workspace, updates package structure, adds dependency on paper-qa-pymupdf |
| packages/paper-qa-pymupdf/* | New separate package containing PyMuPDF PDF parsing functionality |
| src/paperqa/readers.py | Removes PyMuPDF code that was moved to separate package |
| src/paperqa/settings.py | Updates imports to use paperqa_pymupdf package |
| tests/test_paperqa.py | Updates imports and moves test to new package |
| .github/workflows/* | Updates CI to build both packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Circular Dependency Blocks Package Installation
A circular dependency exists between the paper-qa and paper-qa-pymupdf packages. paper-qa-pymupdf declares paper-qa as a dependency, while paper-qa also declares paper-qa-pymupdf as a dependency. This prevents proper installation, packaging, and dependency resolution. The paper-qa-pymupdf package further reinforces this circular dependency by importing modules from paperqa.
packages/paper-qa-pymupdf/pyproject.toml#L19-L23
paper-qa/packages/paper-qa-pymupdf/pyproject.toml
Lines 19 to 23 in 154042d
| ] | |
| dependencies = [ | |
| "PyMuPDF>=1.24.12", # For pymupdf.set_messages addition | |
| "paper-qa", | |
| ] |
pyproject.toml#L33-L34
Lines 33 to 34 in 154042d
| "numpy", | |
| "paper-qa-pymupdf", |
Bug: Apache-AGPL License Conflict
License incompatibility: The paper-qa package, licensed under Apache Software License, depends on paper-qa-pymupdf, which is licensed under GNU Affero General Public License v3. This dependency on a more restrictively licensed package creates a conflict, potentially making the entire paper-qa distribution subject to AGPLv3 terms.
packages/paper-qa-pymupdf/pyproject.toml#L10-L11
paper-qa/packages/paper-qa-pymupdf/pyproject.toml
Lines 10 to 11 in 154042d
| "Intended Audience :: Developers", | |
| "License :: OSI Approved :: GNU Affero General Public License v3", |
Comment bugbot run to trigger another review on this PR
Was this report helpful? Give feedback by reacting with 👍 or 👎
1236b7e to
d69dd63
Compare
As a prerequisite for PyPDF support, this PR:
uvworkspace layout: https://docs.astral.sh/uv/concepts/projects/workspaces/#workspace-layoutspaper-qa-pymupdf, so in a future PR a PyPDF one can be made