10 Commits
Author SHA1 Message Date
Alex 574f96341e refactor: rename the application package to docsgpt
The backend import package is now docsgpt, the name it will carry on PyPI;
application was far too generic to install into anyone's site-packages.
git mv plus a mechanical rewrite of every import, dotted string and path
reference: 734 Python files, the compose files, Dockerfile, workflows, docs,
setup scripts, devcontainer, k8s manifests, vscode config, pytest and coverage
config, .gitignore. Behaviour is unchanged.

Kept for one release:
- A top-level application package whose meta-path finder resolves
  application.x.y to the already-imported docsgpt.x.y object, so old imports
  and entry points (celery -A application.app.celery,
  uvicorn application.asgi:asgi_app) keep working with a FutureWarning.
- Celery registers every application.* task name as an alias of its
  docsgpt.* task on start-up, so messages queued by the previous release still
  run. The redbeat key prefix moves to redbeat:docsgpt:v2: so schedule entries
  the previous release wrote are left unread instead of firing twice.

The backend image builds from the repository root (docker build -f
docsgpt/Dockerfile .) so it can ship the alias package; a root .dockerignore
allow-lists docsgpt/ and application/ and keeps caches, local data, .env
files, the sample index files and the Dockerfile out. Compose and the image
workflows point at the new context.
2026-09-07 10:20:43 +01:00
Alex 2565906f88 chore(deps): bump 47 backend dependencies
Bumps the Python backend dependency set, holding back the ones that are
resolver-blocked or that regress behaviour this repo depends on.

Notable upgrades:
  cryptography 46.0.7 -> 50.0.0 (requires msal 1.37.0, which relaxes its cap)
  protobuf 6.33.6 -> 7.35.1 (floats opentelemetry-* to 1.44.0)
  openai 2.32.0 -> 2.53.0, anthropic 0.88.0 -> 0.121.0
  google-genai 1.73.1 -> 2.17.0 (the 2.0 break is scoped to the Interactions
    API, which this repo does not use)
  fastmcp 3.2.4 -> 3.4.6, gunicorn 25.3.0 -> 26.0.0
  starlette 1.0.0 -> 1.6.0, uvicorn 0.42.0 -> 0.52.1
  sentence-transformers 5.3.0 -> 5.7.0, numpy 2.4.4 -> 2.5.1
  faiss-cpu 1.13.2 -> 1.15.0, pillow -> 12.3.0 (pinned; security release)
  pypdf 6.9.2 -> 6.15.0, lxml 6.0.2 -> 6.1.1 (CVE-2026-41066)

Code changes needed by the bumps:
  - openai >= 2.53 rejects a falsy api_key at construction. Keyless
    OpenAI-compatible backends (Ollama, llama.cpp, vLLM) legitimately have
    none, and pydantic-settings yields "" for a bare `API_KEY=` in .env, so
    both call sites now fall back to a placeholder.
  - Flask >= 3.1.2 tears a stream_with_context request down twice, and a
    ContextVar token may only be reset once. The log-context teardown hook
    is now idempotent.
  - sentence-transformers renamed get_sentence_embedding_dimension to
    get_embedding_dimension in 5.4; use the new name with a fallback.

Held back deliberately:
  torch 2.11.0      - 2.13.0 drags torchvision 0.26 -> 0.28 and the whole
                      docling stack; torch is only probed for cuda.empty_cache()
  tokenizers 0.22.2 - transformers pins <=0.23.0 and no stable 0.23.0 exists
  transformers      - capped <5.9.0: 5.9+ breaks docling's PDF layout model on
                      Apple Silicon (MPS float64), matching docling-core's own
                      darwin pin
  docling 2.84.0    - 2.118.1 needs rapidocr >=3.9.1 and conflicts with
                      transformers on macOS; wants its own PR with a
                      golden-corpus diff
  redis 7.4.0       - 8.x defaults socket_timeout to 5s, silently capping the
                      blocking reads in the device broker and SSE tail
  websockets 16.0   - google-genai caps <17.0
  marshmallow       - dataclasses-json hard-caps <4; spec tightened to match
  langchain block   - langchain-community 0.4.2 deletes the Qdrant vectorstore
                      this repo imports; langchain 1.3.x needs websockets <16
2026-08-09 12:30:44 +01:00
81b6ee5daa Pg 4 (#2390)
* feat: postgres tests

* feat: mongo cutoff

* feat: mongo cutoff

* feat: adjust docs and compose files

* fix: mini code mongo removals

* fix: tests and k8s mongo stuff

* feat: test fixes

* fix: ruff

* fix: vale

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: mini suggestions

* vale lint fix 2

* fix: codeql columns thing

* fix: test mongo

* fix: tests coverage

* feat: better tests 4

* feat: more tests

* feat: decent coverage

* fix: ruff fixes

* fix: remove mongo mock

* feat: enhance workflow engine and API routes; add document retrieval and source handling

* feat: e2e tests

* fix: mcp, mongo and more

* fix: mini codeql warning

* fix: agent chunk view

* fix: mini issues

* fix: more pg fixes

* feat: postgres prep on start

* feat: qa tests

* fix: mini improvements

* fix: tests

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Siddhant Rai <siddhant.rai.5686@gmail.com>
2026-04-18 13:13:57 +01:00
Siddhant Rai d6c49bdbf0 test: add agent test coverage and standardize test suite (#2051)
- Add 104 comprehensive tests for agent system
- Integrate agent tests into CI/CD pipeline
- Standardize tests with @pytest.mark.unit markers
- Fix cross-platform path compatibility
- Clean up unused imports and dependencies
2025-10-13 14:43:35 +03:00
ManishMadan2882 21aefa2778 (fix:tests.application) attr err 2025-09-23 23:43:50 +05:30
Alex 83ae3e8371 more ruff fixes 2023-09-27 18:04:07 +01:00
Alex b8acb860aa some tests 2023-09-27 17:54:57 +01:00
Alex 14284e0cc7 Update test_app.py 2023-09-04 18:25:41 +01:00
Anton Larin de40e733ec add simple test to make a PR to check CodeCov 2023-09-04 19:13:51 +02:00
Anton Larin 85f9ae5a0a fix packaging and imports and introduce tests with pytest.
still issues with celery worker.
2023-08-14 18:53:25 +02:00