Commit Graph
974 Commits
Author SHA1 Message Date
Trenton H 644a0f3c6b Register the builtin Tika parser 2026-03-13 09:27:52 -07:00
Trenton H dcf4402b15 Renames so it aligns better in the browser view 2026-03-13 09:27:48 -07:00
Trenton HandClaude Sonnet 4.6 89d00247f6 Fix: require context manager for TikaDocumentParser; clean up client lifecycle
- consumer.py: call __enter__ for new-style parsers so _tika_client and
  _gotenberg_client are set before parse() is invoked
- views.py: use `with parser` (via nullcontext for old-style parsers) in
  get_metadata so extract_metadata always runs inside a context manager
- tika.py: GotenbergClient added to ExitStack alongside TikaClient;
  inline client creation removed from extract_metadata and _convert_to_pdf;
  __exit__ uses ExitStack.close() instead of __exit__ pass-through

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:27:42 -07:00
Trenton HandClaude Sonnet 4.6 c16bcb7fef Fix: satisfy mypy and pyrefly for TikaDocumentParser
Use a TYPE_CHECKING-guarded assert to narrow self._tika_client from
TikaClient | None to TikaClient at the point of use in parse().  The
assert is visible to type checkers (TYPE_CHECKING=True) so both mypy
and pyrefly accept the subsequent attribute accesses without error;
at runtime TYPE_CHECKING is False so the assert never executes and no
ruff S101 suppression is required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:27:38 -07:00
Trenton HandClaude Sonnet 4.6 d0b95f2cda Fix: update remaining imports and move live Tika tests after parser migration
- src/documents/tests/test_parsers.py: import TikaDocumentParser from
  paperless.parsers.tika (old paperless_tika.parsers no longer exists)
- git mv paperless_tika/tests/test_live_tika.py →
  paperless/tests/parsers/test_live_tika.py to co-locate all Tika tests
  with the parser; update import and replace old attribute API
  (tika_parser.text/.archive_path) with accessor methods
  (get_text/get_archive_path)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:27:29 -07:00
Trenton HandClaude Sonnet 4.6 2b33617262 Feature: Phase 3 — migrate TikaDocumentParser to ParserProtocol
Refactor TikaDocumentParser to satisfy ParserProtocol without subclassing
the legacy DocumentParser ABC:

- Add ClassVars: name, version, author, url
- Add supported_mime_types() classmethod (12 Office/ODF/RTF MIME types)
- Add score() classmethod — returns None when TIKA_ENABLED is False, 10 otherwise
- can_produce_archive = False (PDF is for display, not an OCR archive)
- requires_pdf_rendition = True (Office formats need PDF for browser display)
- __enter__/__exit__ via ExitStack: TikaClient opened once per parser
  lifetime and shared across parse() and extract_metadata() calls
- extract_metadata() falls back to a short-lived TikaClient when called
  outside a context manager (legacy view-layer metadata path)
- _convert_to_pdf() uses OutputTypeConfig() to honour the database-stored
  ApplicationConfiguration before falling back to the env-var setting
- Rename convert_to_pdf → _convert_to_pdf (private helper)

Update paperless_tika/signals.py shim to import from the new module path
and drop the legacy logging_group/progress_callback kwargs.

Update documents/consumer.py to extend the existing TextDocumentParser
special cases to also cover TikaDocumentParser (parse/get_thumbnail
signatures, __exit__ cleanup).

Add TestTikaParserRegistryInterface (7 tests) covering score(), properties,
and ParserProtocol isinstance check.  Update existing tests to use the new
accessor API (get_text, get_date, get_archive_path, _convert_to_pdf).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:26:49 -07:00
Trenton HandClaude Sonnet 4.6 0a9c67e9b1 Chore: move Tika parser and tests to paperless/
Move TikaDocumentParser and its tests to the canonical parser package
location, matching the pattern established for TextDocumentParser:

- src/paperless_tika/parsers.py → src/paperless/parsers/tika.py
- src/paperless_tika/tests/test_tika_parser.py → src/paperless/tests/parsers/test_tika_parser.py
- src/paperless_tika/tests/samples/ → src/paperless/tests/samples/tika/

Merge tika fixtures (tika_parser, sample_odt_file, sample_docx_file,
sample_doc_file, sample_broken_odt) into the shared parsers conftest.
Remove the now-empty src/paperless_tika/tests/conftest.py.

Content is unchanged — this commit is rename-only so git history is
preserved on the moved files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 09:26:26 -07:00
Trenton HandGitHub d86cfdb088 Feature: Initial document parser plugin framework (#12294) 2026-03-12 21:53:17 +00:00
Trenton HandGitHub ee0d1a3094 Enhancement: Make the StatusConsumer truly async (#12298) 2026-03-12 13:27:35 -07:00
Trenton HandGitHub 86fa74c115 Fix: Postgres selection, DBENGINE and migrations (#12299) 2026-03-11 11:54:24 -07:00
shamoonandGitHub 86573fc1a0 Chore: separate actions from bulk edit endpoint (#12286) 2026-03-10 18:55:36 +00:00
shamoonandGitHub 3e32e90355 Breaking: drop support for api versions < 9 (#12284) 2026-03-09 22:36:22 +00:00
Trenton HandGitHub 0bcf904e3a Chore: Finish settings refactor (#12263) 2026-03-09 17:43:51 +00:00
Trenton HandGitHub 9d5e618de8 Chore: pytest style paperless tests (#12254) 2026-03-06 13:04:23 -08:00
shamoonandGitHub 85a18e5911 Enhancement: saved view sharing (#12142) 2026-03-04 14:15:43 -08:00
shamoon d51a118aac Merge branch 'main' into dev 2026-03-04 13:31:20 -08:00
shamoon 8f311c4b6b Bump version to 2.20.10 2026-03-04 10:38:14 -08:00
Andreas SchneiderandGitHub 190fc70288 Fix: use maxsplit=1 in Redis URL parsing to handle URLs with multiple colons (#12239) 2026-03-04 01:06:51 -08:00
shamoonandGitHub 299dac21ee Enhancement: “live” document updates (#12141) 2026-03-04 00:27:07 +00:00
5498503d60 Chore: Improve user migration path (#12232)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-03-03 15:51:48 -08:00
Trenton HandGitHub 20a9cd40e8 Feature: Switch all indexing to use rich (#12193) 2026-03-02 10:41:09 -08:00
shamoon f65807b906 Merge branch 'main' into dev
# Conflicts:
#	docs/setup.md
#	src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts
#	src/documents/tests/test_api_documents.py
2026-02-28 02:31:20 -08:00
shamoon 47f9f642a9 Bump version to 2.20.9 2026-02-28 01:35:26 -08:00
0bc032a67d Development: improve test portability (#12187)
* Fix: improve test portability

* Make settings always consistent

* Make a few more tests deterministic wrt settings

* Dont pollute settings for this one

* Fix timezone issue with mail parser

* Update test_parser.py

* Uh, I guess OCR gives variants for this

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-02-27 23:24:11 +00:00
Trenton HandGitHub 5988d5896b Breaking: Refactor advanced database settings to allow more user configuration (#12165) 2026-02-27 14:37:26 -08:00
Trenton HandGitHub 53ac338946 Breaking: Removes API v1 and the related serializer (#12166) 2026-02-26 04:06:43 +00:00
shamoon 1b912c137a Merge branch 'main' into dev 2026-02-21 17:45:28 -08:00
shamoon 35be0850ec Bump version to 2.20.8 2026-02-21 16:49:52 -08:00
shamoon be4e29a19c Merge branch 'main' into dev 2026-02-16 09:01:19 -08:00
shamoon e63b62d531 Bump version to 2.20.7 2026-02-16 07:26:59 -08:00
Trenton HandGitHub 8db1c4e08b Breaking: Remove pybzar as a barcode reader (#12065) 2026-02-13 08:14:00 -08:00
Trenton HandGitHub e8e027abc0 Chore: Optimizes the integer fields for choice types mostly, while leaving plenty of room to grow (#12057) 2026-02-10 15:11:44 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Trenton H
33cbe2ad54 Chore(deps): Bump the utilities-minor group across 1 directory with 6 updates (#11993)
* Chore(deps): Bump the utilities-minor group across 1 directory with 6 updates

Bumps the utilities-minor group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [babel](https://github.com/python-babel/babel) | `2.17.0` | `2.18.0` |
| [dateparser](https://github.com/scrapinghub/dateparser) | `1.2.2` | `1.3.0` |
| [django-cachalot](https://github.com/noripyt/django-cachalot) | `2.8.0` | `2.9.0` |
| [openai](https://github.com/openai/openai-python) | `2.15.0` | `2.16.0` |
| [torch](https://github.com/pytorch/pytorch) | `2.9.1` | `2.10.0` |
| [ruff](https://github.com/astral-sh/ruff) | `0.14.14` | `0.15.0` |



Updates `babel` from 2.17.0 to 2.18.0
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.17.0...v2.18.0)

Updates `dateparser` from 1.2.2 to 1.3.0
- [Release notes](https://github.com/scrapinghub/dateparser/releases)
- [Changelog](https://github.com/scrapinghub/dateparser/blob/master/HISTORY.rst)
- [Commits](https://github.com/scrapinghub/dateparser/compare/v1.2.2...v1.3.0)

Updates `django-cachalot` from 2.8.0 to 2.9.0
- [Release notes](https://github.com/noripyt/django-cachalot/releases)
- [Changelog](https://github.com/noripyt/django-cachalot/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/noripyt/django-cachalot/compare/v2.8.0...v2.9.0)

Updates `openai` from 2.15.0 to 2.16.0
- [Release notes](https://github.com/openai/openai-python/releases)
- [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openai/openai-python/compare/v2.15.0...v2.16.0)

Updates `torch` from 2.9.1 to 2.10.0
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v2.9.1...v2.10.0)

Updates `ruff` from 0.14.14 to 0.15.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.14...0.15.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-version: 2.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
- dependency-name: dateparser
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
- dependency-name: django-cachalot
  dependency-version: 2.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
- dependency-name: openai
  dependency-version: 2.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
- dependency-name: torch
  dependency-version: 2.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
- dependency-name: ruff
  dependency-version: 0.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: utilities-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updates to ruff 0.15.0

* Ignores all notes in the baseline.  They seem to be problematic??

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2026-02-04 11:50:31 -08:00
Sebastian SteinbeißerandGitHub 3b5ffbf9fa Chore(mypy): Annotate None returns for typing improvements (#11213) 2026-02-02 08:44:12 -08:00
shamoon c3b036e0d3 Merge branch 'main' into dev 2026-01-31 09:10:33 -08:00
shamoon 3e41d99a82 Bump version to 2.20.6 2026-01-30 17:59:55 -08:00
Christoph SchoberandGitHub d16d3fb618 Feature: support split documents based on tag barcodes (#11645) 2026-01-29 08:05:33 -08:00
shamoonandGitHub 6d93ae93b4 Chore: fix session token strategy import deprecation (#11914) 2026-01-27 19:38:33 +00:00
shamoonandGitHub 1f074390e4 Feature: sharelink bundles (#11682) 2026-01-27 18:54:51 +00:00
e9e138e62c Enhancement: configurable SSO groups claim (#11841)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-01-26 18:31:01 +00:00
f2bb6c9725 Enhancement: Add support for app oidc (#11756)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-01-26 00:29:36 -08:00
Trenton HandGitHub d0032c18be Breaking: Remove support for document and thumbnail encryption (#11850) 2026-01-24 19:29:54 -08:00
Trenton HandGitHub 51b466a86b Feature: Simplify and improve the consumer (#11753) 2026-01-21 14:37:48 -08:00
shamoon a527f5e244 Merge branch 'main' into dev 2026-01-19 10:59:01 -08:00
shamoon 771f3f150a Bump version to 2.20.5 2026-01-19 09:18:23 -08:00
shamoon 9c0de249a6 Merge branch 'main' into dev 2026-01-13 11:53:40 -08:00
shamoon 3618c50b62 Bump version to 2.20.4 2026-01-13 10:01:42 -08:00
shamoonandGitHub e940764fe0 Feature: Paperless AI (#10319) 2026-01-13 16:24:42 +00:00
shamoonandGitHub 58d88440f1 Feature: Remote OCR (Azure AI) (#10320) 2026-01-08 21:49:17 +00:00
Trenton HandGitHub ba42f0eb4f Feature: pre-compress static files on ARM64 (#11721) 2026-01-06 09:10:32 -08:00