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.
This commit is contained in:
Alex committed 2026-09-07 10:20:43 +01:00
1 parent 3e7f1f91b4
commit 574f96341e
984 files changed
+9847 -9682

No files matched your search

+7 -7
View File
@@ -13,10 +13,10 @@ import uuid
import pytest
import application.graphrag.extraction as extraction_module
from application.graphrag.store import GraphStore
from application.storage.db.source_config import SourceConfig
from application.vectorstore import pgconn
import docsgpt.graphrag.extraction as extraction_module
from docsgpt.graphrag.store import GraphStore
from docsgpt.storage.db.source_config import SourceConfig
from docsgpt.vectorstore import pgconn
extract_graph_for_source = extraction_module.extract_graph_for_source
@@ -55,7 +55,7 @@ def _live_store(monkeypatch, info):
dsn = _ephemeral_dsn(info)
# The pipeline builds its own GraphStore() from settings, so point those at
# the ephemeral cluster too — never at the operator's configured DB.
from application.core import settings as settings_module
from docsgpt.core import settings as settings_module
monkeypatch.setattr(
settings_module.settings, "PGVECTOR_CONNECTION_STRING", dsn, raising=False
@@ -103,7 +103,7 @@ class _StubEmbedding:
@pytest.fixture
def stub_embedding(monkeypatch):
from application.core.settings import settings
from docsgpt.core.settings import settings
# The resolver short-circuits to the remote API when this is configured,
# which would bypass the stub on a dev machine that sets it.
@@ -436,7 +436,7 @@ class TestEmbeddingsResolution:
fake_store = MagicMock()
fake_store.pending_chunks.return_value = []
monkeypatch.setattr(
"application.graphrag.store.GraphStore", lambda *a, **k: fake_store
"docsgpt.graphrag.store.GraphStore", lambda *a, **k: fake_store
)
_install_stub_llm(monkeypatch, _StubLLM([]))