Skip to content

feature/create pr 2#3

Open
MStupar-nc wants to merge 2 commits into
mainfrom
feature/create-pr-2
Open

feature/create pr 2#3
MStupar-nc wants to merge 2 commits into
mainfrom
feature/create-pr-2

Conversation

@MStupar-nc

Copy link
Copy Markdown
Owner

Add "list unread" command to book app

This PR adds a new feature to the sample book app:

  • BookCollection.get_unread_books(): returns unread books (read == False).
  • CLI: adds "unread" and "list-unread" commands handled by handle_unread(), reusing existing show_books() output.
  • Tests: comprehensive pytest tests for get_unread_books covering ordering, empty states, and mixed read/unread behavior.
  • Added samples/book-app-project/plan.md describing the planned work.

Files changed:

  • samples/book-app-project/books.py (+get_unread_books)
  • samples/book-app-project/book_app.py (+handle_unread, help text, command registration)
  • samples/book-app-project/tests/test_books.py (+tests for unread filtering)
  • samples/book-app-project/plan.md (new)

Notes:

  • Method named get_unread_books to keep implementation explicit and testable. Consider renaming to list_unread() for API symmetry.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

MStupar-nc and others added 2 commits April 2, 2026 16:11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants