[Mnemosyne] Export, deletion, and richer stats #1219

Closed
Rockachopa wants to merge 4 commits from feat/mnemosyne-export-deletion-stats into main
Owner

Mnemosyne Phase 1 Enhancement

Closes #1218

Changes

archive.py — 3 new methods + enhanced stats:

  • remove(entry_id) — deletes entry and cleans all bidirectional links
  • export(topics=None, source=None, since=None) — filtered archive export
  • list_topics() — topic→count mapping, sorted by frequency
  • stats() — now includes orphans, link_density, oldest_entry, newest_entry

cli.py — 3 new commands:

  • mnemosyne topics — list all topics with entry counts
  • mnemosyne remove <id> — remove an entry by ID
  • mnemosyne export — export archive data (filter by topic/source/date, output to file)

tests — 4 new test cases:

  • test_archive_remove — removal + bidirectional link cleanup
  • test_archive_export — filtered export by topic
  • test_archive_list_topics — topic counting
  • test_archive_richer_stats — orphans, link_density, age range

Verification

cd the-nexus
python -m pytest nexus/mnemosyne/tests/ -v
## Mnemosyne Phase 1 Enhancement Closes #1218 ### Changes **archive.py** — 3 new methods + enhanced stats: - `remove(entry_id)` — deletes entry and cleans all bidirectional links - `export(topics=None, source=None, since=None)` — filtered archive export - `list_topics()` — topic→count mapping, sorted by frequency - `stats()` — now includes `orphans`, `link_density`, `oldest_entry`, `newest_entry` **cli.py** — 3 new commands: - `mnemosyne topics` — list all topics with entry counts - `mnemosyne remove <id>` — remove an entry by ID - `mnemosyne export` — export archive data (filter by topic/source/date, output to file) **tests** — 4 new test cases: - `test_archive_remove` — removal + bidirectional link cleanup - `test_archive_export` — filtered export by topic - `test_archive_list_topics` — topic counting - `test_archive_richer_stats` — orphans, link_density, age range ### Verification ```bash cd the-nexus python -m pytest nexus/mnemosyne/tests/ -v ```
Rockachopa added 4 commits 2026-04-11 18:45:38 +00:00
Closes #1218
- remove() cleans bidirectional links
- export() filters by topic/source/date
- stats() includes orphans, link_density, age range
- list_topics() returns topic->count mapping
Part of #1218
Part of #1218
chore: update module docstring for Phase 1
Some checks failed
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 3s
1e170074ce
Rockachopa requested review from perplexity 2026-04-11 18:45:39 +00:00
Owner

Duplicate of #1220 which has already been merged. Closing.

Duplicate of #1220 which has already been merged. Closing.
Timmy closed this pull request 2026-04-11 18:54:41 +00:00
Some checks failed
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 3s

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#1219