Skip to content

Deprecating Docs.delete's name arg#1142

Merged
jamesbraza merged 4 commits intomainfrom
fixing-docs-delete
Oct 16, 2025
Merged

Deprecating Docs.delete's name arg#1142
jamesbraza merged 4 commits intomainfrom
fixing-docs-delete

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

@jamesbraza jamesbraza commented Oct 16, 2025

This PR:

  • Starts a deprecation of Docs.delete's name arg
  • Denies a silent failure where docname gets ignored if one also specified a different name
  • Adds test coverage of Docs.delete

@jamesbraza jamesbraza self-assigned this Oct 16, 2025
Copilot AI review requested due to automatic review settings October 16, 2025 17:43
@jamesbraza jamesbraza added the enhancement New feature or request label Oct 16, 2025
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 16, 2025
@dosubot
Copy link
Copy Markdown

dosubot bot commented Oct 16, 2025

Documentation Updates

Checked 1 published document(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link
Copy Markdown
Contributor

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

Deprecates the Docs.delete name argument in favor of docname and adds lifecycle test coverage including document deletion.

  • Adds a deprecation warning when the legacy name parameter is used.
  • Expands test_docs_lifecycle to assert add returns a docname and to exercise deletion by docname.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/test_paperqa.py Adds lifecycle assertions and a new deletion subtest using docname to prepare for deprecation of name.
src/paperqa/docs.py Introduces deprecation warning logic for the name parameter in delete, preferring docname.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 16, 2025
@jamesbraza jamesbraza merged commit 650d24f into main Oct 16, 2025
7 checks passed
@jamesbraza jamesbraza deleted the fixing-docs-delete branch October 16, 2025 23:08
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants