[PR #221] [MERGED] refactor: define stored post and author models #219

Closed
opened 2026-10-13 19:49:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/221
Author: @Glitchy-Sheep
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: feat/define-stored-post-models


📝 Commits (1)

  • 83688c8 refactor: define stored post and author models

📊 Changes

2 files changed (+486 additions, -0 deletions)

View changed files

➕ boosty_downloader/domain/stored_post.py (+176 -0)
➕ test/unit/domain/stored_post_test.py (+310 -0)

📄 Description

📝 Summary

Add shared domain records for a saved post, its media history, locked posts and author details. They provide the data needed to complete a post page across separate download runs, such as downloading text first and videos later.

🔧 What changes

  • Keep post metadata, ordered text/list/media blocks and synchronization details in standard-library dataclasses.
  • Track each media piece's file state, relative paths, disk size and added/removed dates. Preserve inventory order independently of the current body order.
  • Keep subscription and one-off purchase prices separately, plus author details and locked-post metadata.
  • Document the partial-download use case in the module. Runtime download behavior is unchanged; reconciliation and storage adapters follow separately.

🧪 Tests

  • task ci: 430 unit/e2e tests passed, with lint, formatting, Pyright, import boundaries and wheel/sdist builds.
  • 13 new domain test cases cover rich content, value equality, removal order, independent file states, collection defaults and unknown versus zero values.
  • Two independent reviews completed. The subsequent module-docstring update passed Ruff lint/format and staged whitespace checks.
  • Live API integration was not run: these data-only models perform no requests or downloads.

⏭️ Next

Reconcile the saved record with fresh API data and a snapshot of local files to select the exact pieces to download.

✅ Checklist

  • Tested live on a real blog (feature or fix): not applicable to this data-only change
  • Updated CLI --help and README if needed: not applicable
  • Updated docs/ if the download flow or dev process changed: not applicable; the model's purpose is documented in its module
  • Added a line to ## Unreleased in CHANGELOG.md (or the ci/skip-changelog label if not user-facing)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/221 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 10/4/2026 **Status:** ✅ Merged **Merged:** 10/4/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `feat/define-stored-post-models` --- ### 📝 Commits (1) - [`83688c8`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/83688c877ba52b55e5e78b431956642ba2ade554) refactor: define stored post and author models ### 📊 Changes **2 files changed** (+486 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `boosty_downloader/domain/stored_post.py` (+176 -0) ➕ `test/unit/domain/stored_post_test.py` (+310 -0) </details> ### 📄 Description ## 📝 Summary Add shared domain records for a saved post, its media history, locked posts and author details. They provide the data needed to complete a post page across separate download runs, such as downloading text first and videos later. ## 🔧 What changes - Keep post metadata, ordered text/list/media blocks and synchronization details in standard-library dataclasses. - Track each media piece's file state, relative paths, disk size and added/removed dates. Preserve inventory order independently of the current body order. - Keep subscription and one-off purchase prices separately, plus author details and locked-post metadata. - Document the partial-download use case in the module. Runtime download behavior is unchanged; reconciliation and storage adapters follow separately. ## 🧪 Tests - `task ci`: 430 unit/e2e tests passed, with lint, formatting, Pyright, import boundaries and wheel/sdist builds. - 13 new domain test cases cover rich content, value equality, removal order, independent file states, collection defaults and unknown versus zero values. - Two independent reviews completed. The subsequent module-docstring update passed Ruff lint/format and staged whitespace checks. - Live API integration was not run: these data-only models perform no requests or downloads. ## ⏭️ Next Reconcile the saved record with fresh API data and a snapshot of local files to select the exact pieces to download. ## ✅ Checklist - [x] Tested live on a real blog (feature or fix): not applicable to this data-only change - [x] Updated CLI `--help` and README if needed: not applicable - [x] Updated `docs/` if the download flow or dev process changed: not applicable; the model's purpose is documented in its module - [x] Added a line to `## Unreleased` in CHANGELOG.md (or the `ci/skip-changelog` label if not user-facing) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:49:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#219
No description provided.