Improvement#19
Merged
RespectMathias merged 28 commits intomainfrom May 22, 2025
Merged
Conversation
Fixed that runserver did not work with activate, so calling executable directly
Added: - Automatic csv download. - Using django from venv
Fixed that runserver did not work with activate, so calling executable directly
Added: - Automatic csv download. - Using django from venv
Added: - Rebased with main - Fixed login related pages by properly using django.contrib.auth - Additional pages
Fixed: - Readded Wasi's styling
…to improvement
Added: - Admin panel button for superusers so you don't need to navigate via url
Added: - bfs unit tests - cbf unit tests
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the project by introducing a unified setup script, adding two recommendation engines (BFS- and content-based), refactoring account management with Django auth URLs and templates, and updating documentation and IDE integrations.
- Added
run.pyscript to streamline environment setup and data import - Introduced
GraphRecommender(BFS) and refactoredBookRecommender(CBF) - Replaced custom account pages with Django auth templates and updated navigation/favicon
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/presentation/templates/registration/*.html | New Django auth templates for login, password reset, and account deletion |
| src/presentation/templates/base.html | Loaded static, added favicon, improved auth nav UI |
| src/presentation/templates/book_details.html | Added “You May Also Like” section using recommended_books |
| src/data_access/apps.py | Removed automatic migrations and seeding on startup |
| src/config/urls.py & settings.py | Included django.contrib.auth.urls and updated login/logout URLs |
| src/business_logic/cbf.py & bfs.py | Added and refactored recommendation engines |
| run.py | New setup/run orchestrator script |
| README.md | Updated installation instructions for run.py |
| .vscode/tasks.json & launch.json | Added VSCode task and preLaunchTask for project setup |
Comments suppressed due to low confidence (1)
src/business_logic/bfs.py:7
- [nitpick] New recommendation logic in
GraphRecommenderisn’t covered by tests. Consider adding unit tests for different depths and edge cases.
class GraphRecommender:
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixed: - Crossplatform paths - Book ids instead of titles to get instances for cbf - print into comment because we don't need to log this since it will get returned empty
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces standalone setup/run scripting, content- and graph-based recommenders, and a full suite of Django auth templates with favicon support.
- Adds
run.pyfor streamlined environment setup, migrations, superuser creation, and data import - Implements
BookRecommender(CBF) andGraphRecommender(BFS) inbusiness_logic/ - Integrates Django auth URLs and templates (login, password reset, account deletion) and updates
base.htmlfor favicon/nav and README for new workflow
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/presentation/templates/registration/password_reset_form.html | New password reset request form template |
| src/presentation/templates/registration/password_reset_email.html | New password reset email body template |
| src/presentation/templates/registration/password_reset_done.html | Template confirming reset email sent |
| src/presentation/templates/registration/password_reset_confirm.html | Template for entering new password via reset link |
| src/presentation/templates/registration/password_reset_complete.html | Template confirming password change completed |
| src/presentation/templates/registration/login.html | Custom login template for Django auth |
| src/presentation/templates/registration/logged_out.html | Template for post-logout acknowledgment |
| src/presentation/templates/registration/delete_account_confirm.html | Confirmation template for permanent account deletion |
| src/presentation/templates/login.html | Removed legacy login template |
| src/presentation/templates/book_details.html | Adds “You May Also Like” recommendations section |
| src/presentation/templates/base.html | Loads static, adds favicon link, and updates navbar with logout/profile |
| src/data_access/apps.py | Removes automatic migration/seeding logic |
| src/config/urls.py | Registers Django auth URLs under /accounts/ |
| src/config/settings.py | Cleans up seeding settings, adds login/logout redirect and email backend |
| src/business_logic/cbf.py | Refactors content-based filtering recommender |
| src/business_logic/bfs.py | Implements graph-based BFS recommender |
| run.py | New run script for setup and server orchestration |
| README.md | Updates setup instructions to use run.py |
| .vscode/tasks.json | Adds “Setup Django Project” task to run setup-only flag |
| .vscode/launch.json | Adjusts launch config to call setup task and use forward slashes |
Comments suppressed due to low confidence (1)
src/business_logic/cbf.py:23
- [nitpick] Using a slash in the column name ("review/score") can lead to ambiguities or require special handling. Consider using snake_case like
review_scorefor consistency.
"review/score": rev.review_score or 0.0,
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Description
Adds:
Linked Issue:
🔄 Type of Change
✅ Checklist
📄 Additional Information