Skip to content

add maint-script to move book to new collection path - #466

Open
elfkuzco wants to merge 1 commit into
mainfrom
move-book-to-new-path
Open

add maint-script to move book to new collection path#466
elfkuzco wants to merge 1 commit into
mainfrom
move-book-to-new-path

Conversation

@elfkuzco

Copy link
Copy Markdown
Contributor

Rationale

Script proposed #463 (comment) does not achieve to rename book because shuttle identifies the locations as the same (same warehouse and path). This PR introduces maint-script to move book from one collection path to another.

This fixes #463

@elfkuzco elfkuzco self-assigned this Jul 31, 2026
@elfkuzco
elfkuzco requested a review from benoit74 July 31, 2026 17:01
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.12%. Comparing base (30b5372) to head (013a6f0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #466   +/-   ##
=======================================
  Coverage   81.12%   81.12%           
=======================================
  Files          64       64           
  Lines        3879     3879           
  Branches      472      472           
=======================================
  Hits         3147     3147           
  Misses        581      581           
  Partials      151      151           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elfkuzco

Copy link
Copy Markdown
Contributor Author

@benoit74 , because CollectionTitle have primary key made of collection_id and title_id, prod books belonging to such titles will need to be moved to new path. For the two books mentioned in #463 , their titles only have them as prod books, so this will not affect anything else.

Script can be run as (setting correct paths instead of ). Paths must exist on FS

move_book_to_new_collection_path.py --book=6c38dade-f569-fb59-4116-348b477c4f50 --collection=Kiwix --path<new-path> --generate-new-filename

move_book_to_new_collection_path.py --book=83fe4294-6296-9e74-daa7-99be7d2511f3 --collection=Kiwix --path<new-path> --generate-new-filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promoting a book from quarantine did not correctly computed the correct filename

1 participant