Skip to content

Conversation

jamesbraza
Copy link
Collaborator

As a prerequisite for PyPDF support, this PR:

  1. Adopts uv workspace layout: https://docs.astral.sh/uv/concepts/projects/workspaces/#workspace-layouts
  2. Moves PyMuPDF to a separate package paper-qa-pymupdf, so in a future PR a PyPDF one can be made

@jamesbraza jamesbraza self-assigned this Jul 23, 2025
@jamesbraza jamesbraza added the enhancement New feature or request label Jul 23, 2025
@Copilot Copilot AI review requested due to automatic review settings July 23, 2025 04:56
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 23, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 uv workspace layout with packages under packages/ directory
  • Extracts PyMuPDF-related functionality into a separate paper-qa-pymupdf package
  • 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

Copy link

@cursor cursor bot left a 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

]
dependencies = [
"PyMuPDF>=1.24.12", # For pymupdf.set_messages addition
"paper-qa",
]

pyproject.toml#L33-L34

paper-qa/pyproject.toml

Lines 33 to 34 in 154042d

"numpy",
"paper-qa-pymupdf",

Fix in CursorFix in Web


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

"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",

Fix in CursorFix in Web


Comment bugbot run to trigger another review on this PR
Was this report helpful? Give feedback by reacting with 👍 or 👎

@jamesbraza jamesbraza force-pushed the uv-workspace branch 3 times, most recently from 1236b7e to d69dd63 Compare July 23, 2025 16:08
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 23, 2025
@jamesbraza jamesbraza merged commit d7d396d into main Jul 23, 2025
7 checks passed
@jamesbraza jamesbraza deleted the uv-workspace branch July 23, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants