A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Chore: add ymlfmt (#9745)
shamoon312bb743b964
diff --git a/.devcontainer/docker-compose.devcontainer.sqlite-tika.yml b/.devcontainer/docker-compose.devcontainer.sqlite-tika.ymlindex 8aead7fe2..76cf9ca45 100644--- a/.devcontainer/docker-compose.devcontainer.sqlite-tika.yml+++ b/.devcontainer/docker-compose.devcontainer.sqlite-tika.yml@@ -21,19 +21,17 @@# This file is intended only to be used through VSCOde devcontainers. See README.md# in the folder .devcontainer.-services:broker:image: docker.io/library/redis:7restart: unless-stoppedvolumes:- ./redisdata:/data-# No ports need to be exposed; the VSCode DevContainer plugin manages them.paperless-development:image: paperless-ngxbuild:- context: ../ # Dockerfile cannot access files from parent directories if context is not set.+ context: ../ # Dockerfile cannot access files from parent directories if context is not set.dockerfile: ./.devcontainer/Dockerfilerestart: unless-stoppeddepends_on:@@ -60,25 +58,20 @@ services:PAPERLESS_TIKA_ENDPOINT: http://tika:9998PAPERLESS_STATICDIR: ./src/documents/staticPAPERLESS_DEBUG: true-# Overrides default command so things don't shut down after the process ends.command: /bin/sh -c "chown -R paperless:paperless /usr/src/paperless/paperless-ngx/src/documents/static/frontend && chown -R paperless:paperless /usr/src/paperless/paperless-ngx/.ruff_cache && while sleep 1000; do :; done"-gotenberg:image: docker.io/gotenberg/gotenberg:8.17restart: unless-stopped-# The Gotenberg Chromium route is used to convert .eml files. We do not# want to allow external content like tracking pixels or even JavaScript.command:- "gotenberg"- "--chromium-disable-javascript=true"- "--chromium-allow-list=file:///tmp/.*"-tika:image: docker.io/apache/tika:latestrestart: unless-stopped-volumes:data:media:diff --git a/.github/dependabot.yml b/.github/dependabot.ymlindex f93821d70..74be0e121 100644--- a/.github/dependabot.yml+++ b/.github/dependabot.yml@@ -5,7 +5,6 @@ version: 2# Required for uv support for nowenable-beta-ecosystems: trueupdates:-# Enable version updates for pnpm- package-ecosystem: "npm"target-branch: "dev"@@ -35,7 +34,6 @@ updates:patterns:- "@typescript-eslint*"- "eslint"-# Enable version updates for Python- package-ecosystem: "uv"target-branch: "dev"@@ -71,7 +69,6 @@ updates:patterns:- psycopg*- zxing-cpp-# Enable updates for GitHub Actions- package-ecosystem: "github-actions"target-branch: "dev"@@ -91,7 +88,6 @@ updates:- "major"- "minor"- "patch"-# Update Dockerfile in root directory- package-ecosystem: "docker"directory: "/"@@ -105,7 +101,6 @@ updates:commit-message:prefix: "docker"include: "scope"-# Update Docker Compose files in docker/compose directory- package-ecosystem: "docker-compose"directory: "/docker/compose/"diff --git a/.github/labeler.yml b/.github/labeler.ymlindex 8d87d13c6..bd2af8611 100644--- a/.github/labeler.yml+++ b/.github/labeler.yml@@ -5,17 +5,14 @@ backend:- 'pyproject.toml'- 'uv.lock'- 'requirements.txt'-frontend:- changed-files:- any-glob-to-any-file:- 'src-ui/**'-documentation:- changed-files:- any-glob-to-any-file:- 'docs/**'-ci-cd:- changed-files:- any-glob-to-any-file:diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 56c2fdeec..83cbce290 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -1,5 +1,4 @@name: ci-on:push:tags:@@ -12,72 +11,57 @@ on:pull_request:branches-ignore:- 'translations**'-env:DEFAULT_UV_VERSION: "0.6.x"# This is the default version of Python to use in most steps which aren't specificDEFAULT_PYTHON_VERSION: "3.11"-jobs:pre-commit:# We want to run on external PRs, but not on our own internal PRs as they'll be run# by the push to the branch. Without this if check, checks are duplicated since# internal PRs match both the push and pull_request events.- if:- github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=- github.repository-+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repositoryname: Linting Checksruns-on: ubuntu-24.04steps:- -- name: Checkout repository+ - name: Checkout repositoryuses: actions/checkout@v4- -- name: Install python+ - name: Install pythonuses: actions/setup-python@v5with:python-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Check files+ - name: Check filesuses: pre-commit/[email protected]-documentation:name: "Build & Deploy Documentation"runs-on: ubuntu-24.04needs:- pre-commitsteps:- -- name: Checkout+ - name: Checkoutuses: actions/checkout@v4- -- name: Set up Python+ - name: Set up Pythonid: setup-pythonuses: actions/setup-python@v5with:python-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Install uv+ - name: Install uvuses: astral-sh/setup-uv@v5with:version: ${{ env.DEFAULT_UV_VERSION }}enable-cache: truepython-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Install Python dependencies+ - name: Install Python dependenciesrun: |uv sync --python ${{ steps.setup-python.outputs.python-version }} --dev --frozen- -- name: Make documentation+ - name: Make documentationrun: |uv run \--python ${{ steps.setup-python.outputs.python-version }} \--dev \--frozen \mkdocs build --config-file ./mkdocs.yml- -- name: Deploy documentation+ - name: Deploy documentationif: github.event_name == 'push' && github.ref == 'refs/heads/main'run: |echo "docs.paperless-ngx.com" > "${{ github.workspace }}/docs/CNAME"@@ -88,14 +72,12 @@ jobs:--dev \--frozen \mkdocs gh-deploy --force --no-history- -- name: Upload artifact+ - name: Upload artifactuses: actions/upload-artifact@v4with:name: documentationpath: site/retention-days: 7-tests-backend:name: "Backend Tests (Python ${{ matrix.python-version }})"runs-on: ubuntu-24.04@@ -106,49 +88,40 @@ jobs:python-version: ['3.10', '3.11', '3.12']fail-fast: falsesteps:- -- name: Checkout+ - name: Checkoutuses: actions/checkout@v4- -- name: Start containers+ - name: Start containersrun: |docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml pull --quietdocker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml up --detach- -- name: Set up Python+ - name: Set up Pythonid: setup-pythonuses: actions/setup-python@v5with:python-version: "${{ matrix.python-version }}"- -- name: Install uv+ - name: Install uvuses: astral-sh/setup-uv@v5with:version: ${{ env.DEFAULT_UV_VERSION }}enable-cache: truepython-version: ${{ steps.setup-python.outputs.python-version }}- -- name: Install system dependencies+ - name: Install system dependenciesrun: |sudo apt-get update -qqsudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript libzbar0 poppler-utils- -- name: Configure ImageMagick+ - name: Configure ImageMagickrun: |sudo cp docker/rootfs/etc/ImageMagick-6/paperless-policy.xml /etc/ImageMagick-6/policy.xml- -- name: Install Python dependencies+ - name: Install Python dependenciesrun: |uv sync \--python ${{ steps.setup-python.outputs.python-version }} \--group testing \--frozen- -- name: List installed Python dependencies+ - name: List installed Python dependenciesrun: |uv pip list- -- name: Tests+ - name: Testsenv:PAPERLESS_CI_TEST: 1# Enable paperless_mail testing against real server@@ -161,28 +134,24 @@ jobs:--dev \--frozen \pytest- -- name: Upload backend test results to Codecov+ - name: Upload backend test results to Codecovif: always()uses: codecov/test-results-action@v1with:token: ${{ secrets.CODECOV_TOKEN }}flags: backend-python-${{ matrix.python-version }}files: junit.xml- -- name: Upload backend coverage to Codecov+ - name: Upload backend coverage to Codecovuses: codecov/codecov-action@v5with:token: ${{ secrets.CODECOV_TOKEN }}flags: backend-python-${{ matrix.python-version }}files: coverage.xml- -- name: Stop containers+ - name: Stop containersif: always()run: |docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml logsdocker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml down-install-frontend-dependencies:name: "Install Frontend Dependencies"runs-on: ubuntu-24.04@@ -194,8 +163,7 @@ jobs:uses: pnpm/action-setup@v4with:version: 10- -- name: Use Node.js 20+ - name: Use Node.js 20uses: actions/setup-node@v4with:node-version: 20.x@@ -209,15 +177,12 @@ jobs:~/.pnpm-store~/.cachekey: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }}- -- name: Install dependencies+ - name: Install dependenciesif: steps.cache-frontend-deps.outputs.cache-hit != 'true'run: cd src-ui && pnpm install- -- name: Install Playwright+ - name: Install Playwrightif: steps.cache-frontend-deps.outputs.cache-hit != 'true'run: cd src-ui && pnpm playwright install --with-deps-tests-frontend:name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"runs-on: ubuntu-24.04@@ -235,8 +200,7 @@ jobs:uses: pnpm/action-setup@v4with:version: 10- -- name: Use Node.js 20+ - name: Use Node.js 20uses: actions/setup-node@v4with:node-version: 20.x@@ -252,31 +216,25 @@ jobs:key: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }}- name: Re-link Angular clirun: cd src-ui && pnpm link @angular/cli- -- name: Linting checks+ - name: Linting checksrun: cd src-ui && pnpm run lint- -- name: Run Jest unit tests+ - name: Run Jest unit testsrun: cd src-ui && pnpm run test --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }}- -- name: Run Playwright e2e tests+ - name: Run Playwright e2e testsrun: cd src-ui && pnpm exec playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }}- -- name: Upload frontend test results to Codecov+ - name: Upload frontend test results to Codecovuses: codecov/test-results-action@v1if: always()with:token: ${{ secrets.CODECOV_TOKEN }}flags: frontend-node-${{ matrix.node-version }}directory: src-ui/- -- name: Upload frontend coverage to Codecov+ - name: Upload frontend coverage to Codecovuses: codecov/codecov-action@v5with:token: ${{ secrets.CODECOV_TOKEN }}flags: frontend-node-${{ matrix.node-version }}directory: src-ui/coverage/-frontend-bundle-analysis:name: "Frontend Bundle Analysis"runs-on: ubuntu-24.04@@ -284,20 +242,17 @@ jobs:- tests-frontendsteps:- uses: actions/checkout@v4- -- name: Install pnpm+ - name: Install pnpmuses: pnpm/action-setup@v4with:version: 10- -- name: Use Node.js 20+ - name: Use Node.js 20uses: actions/setup-node@v4with:node-version: 20.xcache: 'pnpm'cache-dependency-path: 'src-ui/pnpm-lock.yaml'- -- name: Cache frontend dependencies+ - name: Cache frontend dependenciesid: cache-frontend-depsuses: actions/cache@v4with:@@ -305,15 +260,12 @@ jobs:~/.pnpm-store~/.cachekey: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/package-lock.json') }}- -- name: Re-link Angular cli+ - name: Re-link Angular clirun: cd src-ui && pnpm link @angular/cli- -- name: Build frontend and upload analysis+ - name: Build frontend and upload analysisenv:CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}run: cd src-ui && pnpm run build --configuration=production-build-docker-image:name: Build Docker image for ${{ github.ref_name }}runs-on: ubuntu-24.04@@ -325,8 +277,7 @@ jobs:- tests-backend- tests-frontendsteps:- -- name: Check pushing to Docker Hub+ - name: Check pushing to Docker Hubid: push-other-places# Only push to Dockerhub from the main repo AND the ref is either:# main@@ -342,15 +293,13 @@ jobs:echo "Not pushing to DockerHub"echo "enable=false" >> $GITHUB_OUTPUTfi- -- name: Set ghcr repository name+ - name: Set ghcr repository nameid: set-ghcr-repositoryrun: |ghcr_name=$(echo "${{ github.repository }}" | awk '{ print tolower($0) }')echo "Name is ${ghcr_name}"echo "ghcr-repository=${ghcr_name}" >> $GITHUB_OUTPUT- -- name: Gather Docker metadata+ - name: Gather Docker metadataid: docker-metauses: docker/metadata-action@v5with:@@ -365,37 +314,31 @@ jobs:# For a tag x.y.z or vX.Y.Z, output an x.y.z and x.y image tagtype=semver,pattern={{version}}type=semver,pattern={{major}}.{{minor}}- -- name: Checkout+ - name: Checkoutuses: actions/checkout@v4# If https://github.com/docker/buildx/issues/1044 is resolved,# the append input with a native arm64 arch could be used to# significantly speed up building- -- name: Set up Docker Buildx+ - name: Set up Docker Buildxuses: docker/setup-buildx-action@v3- -- name: Set up QEMU+ - name: Set up QEMUuses: docker/setup-qemu-action@v3with:platforms: arm64- -- name: Login to GitHub Container Registry+ - name: Login to GitHub Container Registryuses: docker/login-action@v3with:registry: ghcr.iousername: ${{ github.actor }}password: ${{ secrets.GITHUB_TOKEN }}- -- name: Login to Docker Hub+ - name: Login to Docker Hubuses: docker/login-action@v3# Don't attempt to login if not pushing to Docker Hubif: steps.push-other-places.outputs.enable == 'true'with:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}- -- name: Login to Quay.io+ - name: Login to Quay.iouses: docker/login-action@v3# Don't attempt to login if not pushing to Quay.ioif: steps.push-other-places.outputs.enable == 'true'@@ -403,8 +346,7 @@ jobs:registry: quay.iousername: ${{ secrets.QUAY_USERNAME }}password: ${{ secrets.QUAY_ROBOT_TOKEN }}- -- name: Build and push+ - name: Build and pushuses: docker/build-push-action@v6with:context: .@@ -422,23 +364,19 @@ jobs:type=registry,ref=ghcr.io/${{ steps.set-ghcr-repository.outputs.ghcr-repository }}/builder/cache/app:devcache-to: |type=registry,mode=max,ref=ghcr.io/${{ steps.set-ghcr-repository.outputs.ghcr-repository }}/builder/cache/app:${{ github.ref_name }}- -- name: Inspect image+ - name: Inspect imagerun: |docker buildx imagetools inspect ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}- -- name: Export frontend artifact from docker+ - name: Export frontend artifact from dockerrun: |docker create --name frontend-extract ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/- -- name: Upload frontend artifact+ - name: Upload frontend artifactuses: actions/upload-artifact@v4with:name: frontend-compiledpath: src/documents/static/frontend/retention-days: 7-build-release:name: "Build Release"needs:@@ -446,63 +384,52 @@ jobs:- documentationruns-on: ubuntu-24.04steps:- -- name: Checkout+ - name: Checkoutuses: actions/checkout@v4- -- name: Set up Python+ - name: Set up Pythonid: setup-pythonuses: actions/setup-python@v5with:python-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Install uv+ - name: Install uvuses: astral-sh/setup-uv@v5with:version: ${{ env.DEFAULT_UV_VERSION }}enable-cache: truepython-version: ${{ steps.setup-python.outputs.python-version }}- -- name: Install Python dependencies+ - name: Install Python dependenciesrun: |uv sync --python ${{ steps.setup-python.outputs.python-version }} --dev --frozen- -- name: Install system dependencies+ - name: Install system dependenciesrun: |sudo apt-get update -qqsudo apt-get install -qq --no-install-recommends gettext liblept5- -- name: Download frontend artifact+ - name: Download frontend artifactuses: actions/download-artifact@v4with:name: frontend-compiledpath: src/documents/static/frontend/- -- name: Download documentation artifact+ - name: Download documentation artifactuses: actions/download-artifact@v4with:name: documentationpath: docs/_build/html/- -- name: Generate requirements file+ - name: Generate requirements filerun: |- uv export --quiet --no-dev --all-extras --format requirements-txt --output-file requirements.txt- -- name: Compile messages+ uv export --quiet --no-dev --all-extras --format requirements-txt --output-file requirements.txt+ - name: Compile messagesrun: |cd src/uv run \--python ${{ steps.setup-python.outputs.python-version }} \manage.py compilemessages- -- name: Collect static files+ - name: Collect static filesrun: |cd src/uv run \--python ${{ steps.setup-python.outputs.python-version }} \manage.py collectstatic --no-input- -- name: Move files+ - name: Move filesrun: |echo "Making dist folders"for directory in dist \@@ -539,21 +466,18 @@ jobs:cp --recursive docs/_build/html/ dist/paperless-ngx/docsmv --verbose static dist/paperless-ngx- -- name: Make release package+ - name: Make release packagerun: |echo "Creating release archive"cd distsudo chown -R 1000:1000 paperless-ngx/tar -cJf paperless-ngx.tar.xz paperless-ngx/- -- name: Upload release artifact+ - name: Upload release artifactuses: actions/upload-artifact@v4with:name: releasepath: dist/paperless-ngx.tar.xzretention-days: 7-publish-release:name: "Publish Release"runs-on: ubuntu-24.04@@ -565,14 +489,12 @@ jobs:- build-releaseif: github.ref_type == 'tag' && (startsWith(github.ref_name, 'v') || contains(github.ref_name, '-beta.rc'))steps:- -- name: Download release artifact+ - name: Download release artifactuses: actions/download-artifact@v4with:name: releasepath: ./- -- name: Get version+ - name: Get versionid: get_versionrun: |echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT@@ -581,8 +503,7 @@ jobs:elseecho "prerelease=false" >> $GITHUB_OUTPUTfi- -- name: Create Release and Changelog+ - name: Create Release and Changelogid: create-releaseuses: release-drafter/release-drafter@v6with:@@ -593,8 +514,7 @@ jobs:publish: true # ensures release is not marked as draftenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- -- name: Upload release archive+ - name: Upload release archiveid: upload-release-assetuses: shogo82148/actions-upload-release-asset@v1with:@@ -603,7 +523,6 @@ jobs:asset_path: ./paperless-ngx.tar.xzasset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xzasset_content_type: application/x-xz-append-changelog:name: "Append Changelog"runs-on: ubuntu-24.04@@ -611,26 +530,22 @@ jobs:- publish-releaseif: needs.publish-release.outputs.prerelease == 'false'steps:- -- name: Checkout+ - name: Checkoutuses: actions/checkout@v4with:ref: main- -- name: Set up Python+ - name: Set up Pythonid: setup-pythonuses: actions/setup-python@v5with:python-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Install uv+ - name: Install uvuses: astral-sh/setup-uv@v5with:version: ${{ env.DEFAULT_UV_VERSION }}enable-cache: truepython-version: ${{ env.DEFAULT_PYTHON_VERSION }}- -- name: Append Changelog to docs+ - name: Append Changelog to docsid: append-Changelogworking-directory: docsrun: |@@ -652,8 +567,7 @@ jobs:git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"git commit -am "Changelog ${{ needs.publish-release.outputs.version }} - GHA"git push origin ${{ needs.publish-release.outputs.version }}-changelog- -- name: Create Pull Request+ - name: Create Pull Requestuses: actions/github-script@v7with:script: |diff --git a/.github/workflows/cleanup-tags.yml b/.github/workflows/cleanup-tags.ymlindex 59a6161c5..324ef7750 100644--- a/.github/workflows/cleanup-tags.yml+++ b/.github/workflows/cleanup-tags.yml@@ -6,17 +6,14 @@# This workflow will not trigger runs on forked repos.name: Cleanup Image Tags-on:delete:push:paths:- ".github/workflows/cleanup-tags.yml"-concurrency:group: registry-tags-cleanupcancel-in-progress: false-jobs:cleanup-images:name: Cleanup Image Tags for ${{ matrix.primary-name }}@@ -30,8 +27,7 @@ jobs:# Requires a personal access token with the OAuth scope delete:packagesTOKEN: ${{ secrets.GHA_CONTAINER_DELETE_TOKEN }}steps:- -- name: Clean temporary images+ - name: Clean temporary imagesif: "${{ env.TOKEN != '' }}"uses: stumpylog/image-cleaner-action/[email protected]with:@@ -43,7 +39,6 @@ jobs:repo_name: "paperless-ngx"match_regex: "(feature|fix)"do_delete: "true"-cleanup-untagged-images:name: Cleanup Untagged Images Tags for ${{ matrix.primary-name }}if: github.repository_owner == 'paperless-ngx'@@ -58,8 +53,7 @@ jobs:# Requires a personal access token with the OAuth scope delete:packagesTOKEN: ${{ secrets.GHA_CONTAINER_DELETE_TOKEN }}steps:- -- name: Clean untagged images+ - name: Clean untagged imagesif: "${{ env.TOKEN != '' }}"uses: stumpylog/image-cleaner-action/[email protected]with:diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.ymlindex cdc0e7d6d..0be68b3ed 100644--- a/.github/workflows/codeql-analysis.yml+++ b/.github/workflows/codeql-analysis.yml@@ -10,16 +10,14 @@# supported CodeQL languages.#name: "CodeQL"-on:push:- branches: [ main, dev ]+ branches: [main, dev]pull_request:# The branches below must be a subset of the branches above- branches: [ dev ]+ branches: [dev]schedule:- cron: '28 13 * * 5'-jobs:analyze:name: Analyze@@ -28,27 +26,23 @@ jobs:actions: readcontents: readsecurity-events: write-strategy:fail-fast: falsematrix:- language: [ 'javascript', 'python' ]+ language: ['javascript', 'python']# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]# Learn more about CodeQL language support at https://git.io/codeql-language-support-steps:- - name: Checkout repository- uses: actions/checkout@v4-- # Initializes the CodeQL tools for scanning.- - name: Initialize CodeQL- uses: github/codeql-action/init@v3- with:- languages: ${{ matrix.language }}- # If you wish to specify custom queries, you can do so here or in a config file.- # By default, queries listed here will override any specified in a config file.- # Prefix the list here with "+" to use these queries and those in the config file.- # queries: ./path/to/local/query, your-org/your-repo/queries@main-- - name: Perform CodeQL Analysis- uses: github/codeql-action/analyze@v3+ - name: Checkout repository+ uses: actions/checkout@v4+ # Initializes the CodeQL tools for scanning.+ - name: Initialize CodeQL+ uses: github/codeql-action/init@v3+ with:+ languages: ${{ matrix.language }}+ # If you wish to specify custom queries, you can do so here or in a config file.+ # By default, queries listed here will override any specified in a config file.+ # Prefix the list here with "+" to use these queries and those in the config file.+ # queries: ./path/to/local/query, your-org/your-repo/queries@main+ - name: Perform CodeQL Analysis+ uses: github/codeql-action/analyze@v3diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.ymlindex 308b646d7..3711d3f6e 100644--- a/.github/workflows/crowdin.yml+++ b/.github/workflows/crowdin.yml@@ -1,35 +1,28 @@name: Crowdin Action-on:workflow_dispatch:schedule:- cron: '2 */12 * * *'push:- paths: [- 'src/locale/**',- 'src-ui/messages.xlf',- 'src-ui/src/locale/**'- ]- branches: [ dev ]-+ paths: ['src/locale/**', 'src-ui/messages.xlf', 'src-ui/src/locale/**']+ branches: [dev]jobs:synchronize-with-crowdin:name: Crowdin Syncif: github.repository_owner == 'paperless-ngx'runs-on: ubuntu-24.04-steps:- - name: Checkout- uses: actions/checkout@v4- - name: crowdin action- uses: crowdin/github-action@v2- with:- upload_translations: false- download_translations: true- crowdin_branch_name: 'dev'- localization_branch_name: l10n_dev- pull_request_labels: 'skip-changelog, translation'- env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}- CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}+ - name: Checkout+ uses: actions/checkout@v4+ - name: crowdin action+ uses: crowdin/github-action@v2+ with:+ upload_translations: false+ download_translations: true+ crowdin_branch_name: 'dev'+ localization_branch_name: l10n_dev+ pull_request_labels: 'skip-changelog, translation'+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}+ CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}diff --git a/.github/workflows/pr-bot.yml b/.github/workflows/pr-bot.ymlindex 85c3a9fd8..e2f4c44a4 100644--- a/.github/workflows/pr-bot.yml+++ b/.github/workflows/pr-bot.yml@@ -1,26 +1,21 @@name: PR Bot-on:pull_request:types: [opened]pull_request_target:types: [opened]-permissions:contents: readpull-requests: write-jobs:pr-bot:name: Automated PR Botruns-on: ubuntu-latest-steps:- name: Label by file pathuses: actions/labeler@v5with:repo-token: ${{ secrets.GITHUB_TOKEN }}-- name: Label by sizeuses: Gascon1/[email protected]with:@@ -30,13 +25,7 @@ jobs:s_label: 'non-trivial's_diff: '99999'fail_if_xl: 'false'- excluded_files: >- /\.lock$/- /\.txt$/- ^src-ui/pnpm-lock\.yaml$- ^src-ui/messages\.xlf$- ^src/locale/en_US/LC_MESSAGES/django\.po$-+ excluded_files: /\.lock$/ /\.txt$/ ^src-ui/pnpm-lock\.yaml$ ^src-ui/messages\.xlf$ ^src/locale/en_US/LC_MESSAGES/django\.po$- name: Label bot-generated PRsif: ${{ contains(github.actor, 'dependabot') || contains(github.actor, 'crowdin-bot') }}uses: actions/github-script@v7@@ -62,7 +51,6 @@ jobs:labels,});}-- name: Welcome commentif: ${{ !contains(github.actor, 'bot') }}uses: actions/github-script@v7diff --git a/.github/workflows/project-actions.yml b/.github/workflows/project-actions.ymlindex aa6ad2d38..ed27a0255 100644--- a/.github/workflows/project-actions.yml+++ b/.github/workflows/project-actions.yml@@ -1,5 +1,4 @@name: Project Automations-on:pull_request_target: #_target allows access to secretstypes:@@ -8,10 +7,8 @@ on:branches:- main- dev-permissions:contents: read-jobs:pr_opened_or_reopened:name: pr_opened_or_reopeneddiff --git a/.github/workflows/repo-maintenance.yml b/.github/workflows/repo-maintenance.ymlindex 930b2a7b5..61b86a0d2 100644--- a/.github/workflows/repo-maintenance.yml+++ b/.github/workflows/repo-maintenance.yml@@ -1,18 +1,14 @@name: 'Repository Maintenance'-on:schedule:- cron: '0 3 * * *'workflow_dispatch:-permissions:issues: writepull-requests: writediscussions: write-concurrency:group: lock-jobs:stale:name: 'Stale'@@ -27,9 +23,8 @@ jobs:stale-issue-label: stalestale-pr-label: stalestale-issue-message: >- This issue has been automatically marked as stale because it has not had- recent activity. It will be closed if no further activity occurs. Thank you- for your contributions. See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+ This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+lock-threads:name: 'Lock Old Threads'if: github.repository_owner == 'paperless-ngx'@@ -42,20 +37,14 @@ jobs:discussion-inactive-days: '30'log-output: trueissue-comment: >- This issue has been automatically locked since there- has not been any recent activity after it was closed.- Please open a new discussion or issue for related concerns.- See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+ This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+pr-comment: >- This pull request has been automatically locked since there- has not been any recent activity after it was closed.- Please open a new discussion or issue for related concerns.- See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+ This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+discussion-comment: >- This discussion has been automatically locked since there- has not been any recent activity after it was closed.- Please open a new discussion for related concerns.- See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+ This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/dev/CONTRIBUTING.md#automatic-repository-maintenance) for more details.+close-answered-discussions:name: 'Close Answered Discussions'if: github.repository_owner == 'paperless-ngx'diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex ad29e627e..a20ed19d7 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -76,3 +76,8 @@ repos:rev: "v0.10.0.1"hooks:- id: shellcheck+ - repo: https://github.com/google/yamlfmt+ rev: v0.14.0+ hooks:+ - id: yamlfmt+ exclude: "^src-ui/pnpm-lock.yaml"diff --git a/docker/compose/docker-compose.mariadb-tika.yml b/docker/compose/docker-compose.mariadb-tika.ymlindex 7b5d34d00..2eb5a6eb1 100644--- a/docker/compose/docker-compose.mariadb-tika.yml+++ b/docker/compose/docker-compose.mariadb-tika.yml@@ -36,7 +36,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-db:image: docker.io/library/mariadb:11restart: unless-stopped@@ -48,7 +47,6 @@ services:MARIADB_USER: paperlessMARIADB_PASSWORD: paperlessMARIADB_ROOT_PASSWORD: paperless-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -75,7 +73,6 @@ services:PAPERLESS_TIKA_ENABLED: 1PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000PAPERLESS_TIKA_ENDPOINT: http://tika:9998-gotenberg:image: docker.io/gotenberg/gotenberg:8.19restart: unless-stopped@@ -85,11 +82,9 @@ services:- "gotenberg"- "--chromium-disable-javascript=true"- "--chromium-allow-list=file:///tmp/.*"-tika:image: docker.io/apache/tika:latestrestart: unless-stopped-volumes:data:media:diff --git a/docker/compose/docker-compose.mariadb.yml b/docker/compose/docker-compose.mariadb.ymlindex 890807fa3..67e564c8f 100644--- a/docker/compose/docker-compose.mariadb.yml+++ b/docker/compose/docker-compose.mariadb.yml@@ -31,7 +31,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-db:image: docker.io/library/mariadb:11restart: unless-stopped@@ -43,7 +42,6 @@ services:MARIADB_USER: paperlessMARIADB_PASSWORD: paperlessMARIADB_ROOT_PASSWORD: paperless-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -65,7 +63,6 @@ services:PAPERLESS_DBUSER: paperless # only needed if non-default usernamePAPERLESS_DBPASS: paperless # only needed if non-default passwordPAPERLESS_DBPORT: 3306-volumes:data:media:diff --git a/docker/compose/docker-compose.portainer.yml b/docker/compose/docker-compose.portainer.ymlindex 390530934..c63a446d7 100644--- a/docker/compose/docker-compose.portainer.yml+++ b/docker/compose/docker-compose.portainer.yml@@ -32,7 +32,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-db:image: docker.io/library/postgres:17restart: unless-stopped@@ -42,7 +41,6 @@ services:POSTGRES_DB: paperlessPOSTGRES_USER: paperlessPOSTGRES_PASSWORD: paperless-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -61,7 +59,6 @@ services:PAPERLESS_DBHOST: dbenv_file:- stack.env-volumes:data:media:diff --git a/docker/compose/docker-compose.postgres-tika.yml b/docker/compose/docker-compose.postgres-tika.ymlindex d5fdb48ab..813d48eb0 100644--- a/docker/compose/docker-compose.postgres-tika.yml+++ b/docker/compose/docker-compose.postgres-tika.yml@@ -35,7 +35,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-db:image: docker.io/library/postgres:17restart: unless-stopped@@ -45,7 +44,6 @@ services:POSTGRES_DB: paperlessPOSTGRES_USER: paperlessPOSTGRES_PASSWORD: paperless-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -68,22 +66,18 @@ services:PAPERLESS_TIKA_ENABLED: 1PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000PAPERLESS_TIKA_ENDPOINT: http://tika:9998-gotenberg:image: docker.io/gotenberg/gotenberg:8.19restart: unless-stopped-# The gotenberg chromium route is used to convert .eml files. We do not# want to allow external content like tracking pixels or even javascript.command:- "gotenberg"- "--chromium-disable-javascript=true"- "--chromium-allow-list=file:///tmp/.*"-tika:image: docker.io/apache/tika:latestrestart: unless-stopped-volumes:data:media:diff --git a/docker/compose/docker-compose.postgres.yml b/docker/compose/docker-compose.postgres.ymlindex f57cc283a..fb34bcc47 100644--- a/docker/compose/docker-compose.postgres.yml+++ b/docker/compose/docker-compose.postgres.yml@@ -31,7 +31,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-db:image: docker.io/library/postgres:17restart: unless-stopped@@ -41,7 +40,6 @@ services:POSTGRES_DB: paperlessPOSTGRES_USER: paperlessPOSTGRES_PASSWORD: paperless-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -59,7 +57,6 @@ services:environment:PAPERLESS_REDIS: redis://broker:6379PAPERLESS_DBHOST: db-volumes:data:media:diff --git a/docker/compose/docker-compose.sqlite-tika.yml b/docker/compose/docker-compose.sqlite-tika.ymlindex 68239d4c5..79ae45f09 100644--- a/docker/compose/docker-compose.sqlite-tika.yml+++ b/docker/compose/docker-compose.sqlite-tika.yml@@ -35,7 +35,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -56,22 +55,18 @@ services:PAPERLESS_TIKA_ENABLED: 1PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000PAPERLESS_TIKA_ENDPOINT: http://tika:9998-gotenberg:image: docker.io/gotenberg/gotenberg:8.19restart: unless-stopped-# The gotenberg chromium route is used to convert .eml files. We do not# want to allow external content like tracking pixels or even javascript.command:- "gotenberg"- "--chromium-disable-javascript=true"- "--chromium-allow-list=file:///tmp/.*"-tika:image: docker.io/apache/tika:latestrestart: unless-stopped-volumes:data:media:diff --git a/docker/compose/docker-compose.sqlite.yml b/docker/compose/docker-compose.sqlite.ymlindex a4241e2f4..e60099300 100644--- a/docker/compose/docker-compose.sqlite.yml+++ b/docker/compose/docker-compose.sqlite.yml@@ -28,7 +28,6 @@ services:restart: unless-stoppedvolumes:- redisdata:/data-webserver:image: ghcr.io/paperless-ngx/paperless-ngx:latestrestart: unless-stopped@@ -44,7 +43,6 @@ services:env_file: docker-compose.envenvironment:PAPERLESS_REDIS: redis://broker:6379-volumes:data:media:diff --git a/mkdocs.yml b/mkdocs.ymlindex fcaedaaee..66add07b7 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -11,14 +11,12 @@ theme:toggle:icon: material/brightness-autoname: Switch to light mode-# Palette toggle for light mode- media: "(prefers-color-scheme: light)"scheme: defaulttoggle:icon: material/brightness-7name: Switch to dark mode-# Palette toggle for dark mode- media: "(prefers-color-scheme: dark)"scheme: slate@@ -60,17 +58,17 @@ markdown_extensions:emoji_generator: !!python/name:material.extensions.emoji.to_svgstrict: truenav:- - index.md- - setup.md- - 'Basic Usage': usage.md- - configuration.md- - administration.md- - advanced_usage.md- - 'REST API': api.md- - development.md- - 'FAQs': faq.md- - troubleshooting.md- - changelog.md+ - index.md+ - setup.md+ - 'Basic Usage': usage.md+ - configuration.md+ - administration.md+ - advanced_usage.md+ - 'REST API': api.md+ - development.md+ - 'FAQs': faq.md+ - troubleshooting.md+ - changelog.mdcopyright: Copyright © 2016 - 2023 Daniel Quinn, Jonas Winkler, and the Paperless-ngx teamextra:social:@@ -83,5 +81,5 @@ extra:plugins:- search- glightbox:- skip_classes:- - no-lightbox+ skip_classes:+ - no-lightbox