stapel-docs 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stapel_docs-0.2.2/stapel_docs.egg-info → stapel_docs-0.2.3}/PKG-INFO +2 -2
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/README.md +1 -1
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/docs/capabilities.json +1 -1
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/docs/llms.txt +1 -1
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/pyproject.toml +1 -1
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/services.py +38 -32
- {stapel_docs-0.2.2 → stapel_docs-0.2.3/stapel_docs.egg-info}/PKG-INFO +2 -2
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/CONFIG.MD +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/LICENSE +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/__init__.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/_capabilities.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/_codegen.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/_codegen_settings.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/actions.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/admin.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/apps.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/assets/DEJAVU-FONTS-LICENSE.txt +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/assets/DejaVuSans-Bold.ttf +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/assets/DejaVuSans.ttf +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/authz.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/checks.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/codegen_urls.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/conf.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/conftest.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/doc_types.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/docs/errors.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/docs/flows.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/dto.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/errors.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/events.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/exporters.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/functions.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/gdpr.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/management/__init__.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/management/commands/__init__.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/management/commands/docs_purge_expired.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/migrations/0001_initial.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/migrations/0002_uploadsession_checksum_uploadsession_expires_at.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/migrations/__init__.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/models.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/presenters.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/py.typed +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/schemas/emits/document.created.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/schemas/emits/document.deleted.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/schemas/emits/document.storage_changed.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/schemas/emits/document.updated.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/schemas/functions/docs.create_document.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/serializers.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/setup.cfg +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/stapel_docs.egg-info/SOURCES.txt +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/stapel_docs.egg-info/dependency_links.txt +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/stapel_docs.egg-info/requires.txt +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/stapel_docs.egg-info/top_level.txt +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/storage.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tasks.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_checks.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_comm.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_content.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_contract.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_documents.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_error_i18n.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_export.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_folders.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_gdpr.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_ingest.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_limits.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_public_api.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_revisions.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_storage_seam.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_storage_tx.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_tasks.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_trash.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_updates.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/tests/test_uploads.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/translations/.state.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/translations/errors.es.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/translations/errors.ru.json +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/urls.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/urls_v1.py +0 -0
- {stapel_docs-0.2.2 → stapel_docs-0.2.3}/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stapel-docs
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Documents: storage, revisions and per-type editors for the Stapel framework
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/usestapel/stapel-docs
|
|
@@ -58,7 +58,7 @@ pip install stapel-docs
|
|
|
58
58
|
|
|
59
59
|
| Fact | Value |
|
|
60
60
|
|---|---|
|
|
61
|
-
| Version | `0.2.
|
|
61
|
+
| Version | `0.2.3` |
|
|
62
62
|
| Python | `>=3.11` (3.11, 3.12, 3.13) |
|
|
63
63
|
| HTTP operations | 27 |
|
|
64
64
|
| Config axes | 1 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"module": "stapel-docs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"provides": "Google-Drive-style workspace documents: a folder tree, one-entity-per-type documents over an open type registry, content-addressed snapshot storage with an update journal and revision history, optimistic-lock editing (v1), trash with irreversible purge, a swappable object-storage seam, comm ingest (docs.create_document) and registry-driven export (PDF built in).",
|
|
5
5
|
"axes": [
|
|
6
6
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# stapel-docs 0.2.
|
|
1
|
+
# stapel-docs 0.2.3
|
|
2
2
|
|
|
3
3
|
Google-Drive-style workspace documents: a folder tree, one-entity-per-type documents over an open type registry, content-addressed snapshot storage with an update journal and revision history, optimistic-lock editing (v1), trash with irreversible purge, a swappable object-storage seam, comm ingest (docs.create_document) and registry-driven export (PDF built in).
|
|
4
4
|
|
|
@@ -622,43 +622,49 @@ def _save_snapshot(
|
|
|
622
622
|
already_stored = storage_tx.put(key, body, content_type=content_mime(document))
|
|
623
623
|
added = 0 if already_stored else len(body)
|
|
624
624
|
|
|
625
|
-
document.head_seq = new_seq
|
|
626
|
-
document.snapshot_seq = new_seq
|
|
627
|
-
document.snapshot_key = key
|
|
628
|
-
document.size_bytes = len(body)
|
|
629
|
-
document.save(
|
|
630
|
-
update_fields=["head_seq", "snapshot_seq", "snapshot_key", "size_bytes", "updated_at"]
|
|
631
|
-
)
|
|
632
|
-
|
|
633
625
|
revision = None
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
626
|
+
# Mutation + outbox rows share this atomic block (outbox canon — see
|
|
627
|
+
# module docstring). The callers already hold a wider
|
|
628
|
+
# transaction.atomic(); nesting here is a safe savepoint (per
|
|
629
|
+
# stapel_core.comm.mutate_and_emit's documented nesting guarantee) and
|
|
630
|
+
# makes this helper self-sufficient for emit-check's lexical scan.
|
|
631
|
+
with transaction.atomic():
|
|
632
|
+
document.head_seq = new_seq
|
|
633
|
+
document.snapshot_seq = new_seq
|
|
634
|
+
document.snapshot_key = key
|
|
635
|
+
document.size_bytes = len(body)
|
|
636
|
+
document.save(
|
|
637
|
+
update_fields=["head_seq", "snapshot_seq", "snapshot_key", "size_bytes", "updated_at"]
|
|
642
638
|
)
|
|
643
639
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
640
|
+
if force_revision or _auto_revision_due(document):
|
|
641
|
+
revision = Revision.objects.create(
|
|
642
|
+
document=document,
|
|
643
|
+
seq=new_seq,
|
|
644
|
+
kind=Revision.KIND_AUTO,
|
|
645
|
+
storage_key=key,
|
|
646
|
+
created_by=user,
|
|
647
|
+
size_bytes=len(body),
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
# Orphan cleanup: the previous snapshot dies iff no Revision points at
|
|
651
|
+
# it (content-addressed keys make identical bodies dedup for free).
|
|
652
|
+
freed = 0
|
|
653
|
+
if (
|
|
654
|
+
prev_key
|
|
655
|
+
and prev_key != key
|
|
656
|
+
and not Revision.objects.filter(document=document, storage_key=prev_key).exists()
|
|
657
|
+
):
|
|
658
|
+
storage_tx.delete(prev_key)
|
|
659
|
+
freed = prev_size
|
|
654
660
|
|
|
655
|
-
|
|
661
|
+
_compact_journal(document)
|
|
656
662
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
663
|
+
if emit_updated:
|
|
664
|
+
events.emit_document_updated(document)
|
|
665
|
+
delta = added - freed
|
|
666
|
+
if delta:
|
|
667
|
+
events.emit_storage_changed(document.workspace_id, delta)
|
|
662
668
|
return revision
|
|
663
669
|
|
|
664
670
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stapel-docs
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Documents: storage, revisions and per-type editors for the Stapel framework
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/usestapel/stapel-docs
|
|
@@ -58,7 +58,7 @@ pip install stapel-docs
|
|
|
58
58
|
|
|
59
59
|
| Fact | Value |
|
|
60
60
|
|---|---|
|
|
61
|
-
| Version | `0.2.
|
|
61
|
+
| Version | `0.2.3` |
|
|
62
62
|
| Python | `>=3.11` (3.11, 3.12, 3.13) |
|
|
63
63
|
| HTTP operations | 27 |
|
|
64
64
|
| Config axes | 1 |
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|