Commit Graph
9 Commits
Author SHA1 Message Date
Vito ad32a51497 fix: database path config option now works (#119) (#130)
* fix: resolve database path from config.json (#119)

PromptDatabase() was hardcoded to "prompts.db" relative to CWD,
ignoring the DEFAULT_DB_PATH setting from config.json. Added
_resolve_db_path() that reads from PromptManagerConfig when available
and resolves relative paths against the extension root directory.
This fixes Docker deployments where the CWD differs from the extension.

* test: add unit tests for database path resolution (#119)

Cover explicit absolute/relative paths, config fallback, relative
config paths resolved to extension root, and PromptDatabase constructor
integration with _resolve_db_path.

* docs: update database path configuration instructions (#119)

Replace outdated advice to edit py/config.py with correct config.json
approach. Add Docker-specific guidance for absolute paths.

* chore: bump version to 3.1.5

* fix: remove unused import and variables from test (#119)

Address code review: remove unused MagicMock import and unused db
local variables in constructor tests.
2026-03-18 07:29:58 -07:00
Vito Sansevero 2737a4b1ef style: apply Black formatter (line-length=88) to all Python files
Automated formatting pass across 30 files to establish consistent code
style enforced by CI. No logic changes.
2026-02-07 08:30:09 -08:00
Vito Sansevero 4deda8542d feat: normalize tag storage with junction tables
Phase 5 scalability and polish:
- Add tags + prompt_tags junction tables replacing JSON column
- Migrate existing JSON tags via json_each() on startup
- Rewrite all tag queries to use junction tables (O(1) vs O(n))
- Simplify rename/delete/merge tag operations to single SQL
- Batch-attach preview images to prompt list responses (fix N+1)
- Fix fetchone() fragility under thread contention (defensive defaults)
2026-02-07 07:02:39 -08:00
Vito Sansevero 86815913c1 feat(models): add UNIQUE constraint for prompt_id, filename 2026-02-02 15:08:34 -08:00
Vito Sansevero 22593e8514 docs: add comprehensive docstrings to all Python modules
- Add Google-style docstrings to main node files (prompt_manager.py, prompt_manager_text.py)
- Enhance database module docstrings with detailed parameter and return documentation
- Add comprehensive docstrings to all utils modules with usage examples
- Document API endpoints and configuration classes thoroughly
- Update module-level docstrings in all __init__.py files
- Ensure consistent naming (ComfyUI_PromptManager) across all documentation
- Follow Python best practices for docstring formatting
2025-08-12 06:51:36 -07:00
Vito Sansevero 2c890f7eaa style(models): Change log level from info to debug 2025-06-19 16:56:25 -07:00
Vito Sansevero 3b158d0ec3 feat(models): integrate logging for database operations 2025-05-28 08:29:59 -07:00
Vito Sansevero c22cd36e7c fix(models): correct foreign key type mismatch 2025-05-27 12:35:17 -07:00
Vito Sansevero d4c1689ce4 feat(database): add prompt storage and retrieval system 2025-05-24 12:25:44 -07:00