mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-07 03:52:32 +08:00
chore: remove module-level comments and docstrings from assets package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d8cb122dfb
commit
80d99e7b63
@ -1,9 +1,3 @@
|
||||
"""
|
||||
Multipart upload parsing for asset uploads.
|
||||
|
||||
This module handles the HTTP-specific concerns of parsing multipart form data,
|
||||
streaming file uploads to temp storage, and validating hash fields.
|
||||
"""
|
||||
import os
|
||||
import uuid
|
||||
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
# Re-export public API from query modules
|
||||
# Pure atomic database queries only - no business logic or orchestration
|
||||
|
||||
from app.assets.database.queries.asset import (
|
||||
asset_exists_by_hash,
|
||||
bulk_insert_assets,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.dialects import sqlite
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
"""
|
||||
Pure atomic database queries for AssetInfo operations.
|
||||
|
||||
This module contains only atomic DB operations - no business logic,
|
||||
no filesystem operations, no orchestration across multiple tables.
|
||||
"""
|
||||
from collections import defaultdict
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
|
||||
@ -1,12 +1,3 @@
|
||||
"""
|
||||
Asset manager - thin API adapter layer.
|
||||
|
||||
This module transforms API schemas to/from service layer calls.
|
||||
It should NOT contain business logic or direct SQLAlchemy usage.
|
||||
|
||||
Architecture:
|
||||
API Routes -> manager.py (schema transformation) -> services/ (business logic) -> queries/ (DB ops)
|
||||
"""
|
||||
import contextlib
|
||||
import mimetypes
|
||||
import os
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
# Asset services layer
|
||||
# Business logic that orchestrates database queries and filesystem operations
|
||||
# Services own session lifecycle via create_session()
|
||||
|
||||
from app.assets.services.asset_management import (
|
||||
delete_asset_reference,
|
||||
get_asset_detail,
|
||||
|
||||
@ -1,12 +1,3 @@
|
||||
"""
|
||||
Asset management services - CRUD operations on assets.
|
||||
|
||||
Business logic for:
|
||||
- get_asset_detail: Fetch full asset details with tags
|
||||
- update_asset_metadata: Update name, tags, and/or metadata
|
||||
- delete_asset_reference: Delete AssetInfo and optionally orphaned content
|
||||
- set_asset_preview: Set or clear preview on an asset
|
||||
"""
|
||||
import contextlib
|
||||
import os
|
||||
from typing import Sequence
|
||||
|
||||
@ -1,10 +1,3 @@
|
||||
"""
|
||||
Ingest services - handles ingesting files into the asset database.
|
||||
|
||||
Business logic for:
|
||||
- ingest_file_from_path: Ingest a file from filesystem path (upsert asset, cache state, info)
|
||||
- register_existing_asset: Create AssetInfo for an asset that already exists by hash
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
from typing import Sequence
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
"""
|
||||
Service layer data transfer objects.
|
||||
|
||||
These dataclasses represent the data returned by service functions,
|
||||
providing explicit types instead of raw dicts or ORM objects.
|
||||
"""
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
"""
|
||||
Tagging services - manage tags on assets.
|
||||
|
||||
Business logic for:
|
||||
- apply_tags: Add tags to an asset
|
||||
- remove_tags: Remove tags from an asset
|
||||
- list_tags: List tags with usage counts
|
||||
"""
|
||||
from app.assets.database.queries import (
|
||||
add_tags_to_asset_info,
|
||||
get_asset_info_by_id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user