-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feature/paperless-ngx connector #4609
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
base: main
Are you sure you want to change the base?
Feature/paperless-ngx connector #4609
Conversation
@cbrown350 is attempting to deploy a commit to the Danswer Team on Vercel. A member of the Team first needs to authorize it. |
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.
PR Summary
This PR adds a new Paperless-ngx connector implementation with comprehensive testing and documentation. Here are the key points:
-
Implements
LoadConnector
,PollConnector
, andSlimConnector
interfaces with proper date filtering, tag/user filtering, and error handling in/backend/onyx/connectors/paperless_ngx/connector.py
-
Includes a robust testing setup with both unit tests and a convenient Docker-based manual testing script (
run_manual_test_paperless_server.sh
) for local validation -
Adds proper UI configuration in
web/src/lib/connectors/connectors.tsx
with fields for tag filtering, username filtering, and no-owner document inclusion -
Bug in date field validation - the code raises an exception when
ui_date_field
matches a valid field instead of setting it, and lacks proper handling of master vs local date fields -
Missing error handling for API response validation in
_parse_document()
- should add checks for required fields and data type validation
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
12 file(s) reviewed, 10 comment(s)
Edit PR Review Bot Settings | Greptile
backend/tests/daily/connectors/paperless_ngx/test_paperless_ngx_connector.py
Show resolved
Hide resolved
backend/tests/daily/connectors/paperless_ngx/run_manual_test_paperless_server.sh
Outdated
Show resolved
Hide resolved
backend/tests/daily/connectors/paperless_ngx/test_paperless_ngx_connector.py
Outdated
Show resolved
Hide resolved
backend/tests/daily/connectors/paperless_ngx/run_manual_test_paperless_server.sh
Show resolved
Hide resolved
…r. Not yet fully tested.
…se retrieval, fixes polling
68bfd4a
to
4a8b530
Compare
Description
This adds code for a Paperless-ngx connector: https://docs.paperless-ngx.com
How Has This Been Tested?
This includes the standard mock testing similar to other connectors. Additionally, it has been manually tested extensively. Anyone can easily test it using a clean Docker Paperless-ngx image by running the included script at backend\tests\daily\connectors\paperless_ngx\run_manual_test_paperless_server.sh. This script sets up a server and then provides credentials you can use to create a connector in a local Onyx instance.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.
#159
#776
#3107
onyx-dot-app/documentation#196