1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #682] [CLOSED] [Feature] Adding printer cost #1098

Closed
opened 2026-05-07 00:16:00 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/682
Author: @wreuel
Created: 3/12/2026
Status: Closed

Base: devHead: feature/printerUseCostOnArchive


📝 Commits (2)

  • 373baaa Adding printer cost
  • de14bae Merge branch 'dev' into feature/printerUseCostOnArchive

📊 Changes

14 files changed (+1007 additions, -6 deletions)

View changed files

📝 backend/app/api/routes/archives.py (+87 -2)
📝 backend/app/core/database.py (+12 -0)
📝 backend/app/models/printer.py (+2 -0)
📝 backend/app/schemas/archive.py (+5 -0)
📝 backend/app/schemas/printer.py (+8 -0)
📝 backend/app/services/archive.py (+10 -2)
📝 backend/app/services/archive_comparison.py (+42 -1)
backend/tests/integration/test_machine_cost_api.py (+419 -0)
backend/tests/unit/test_machine_cost.py (+337 -0)
📝 frontend/src/api/client.ts (+7 -0)
📝 frontend/src/i18n/locales/en.ts (+8 -0)
📝 frontend/src/pages/ArchivesPage.tsx (+7 -1)
📝 frontend/src/pages/PrintersPage.tsx (+60 -0)
📝 frontend/src/pages/StatsPage.tsx (+3 -0)

📄 Description

Description

Added the option to track machine/printer cost

#680

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Added Price and LifeSpan to the Printer
  • Machine Cost Computation
  • Change Archive Endpoints
  • Added unit tests

Screenshots

image image image image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model:

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 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/maziggy/bambuddy/pull/682 **Author:** [@wreuel](https://github.com/wreuel) **Created:** 3/12/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature/printerUseCostOnArchive` --- ### 📝 Commits (2) - [`373baaa`](https://github.com/maziggy/bambuddy/commit/373baaafe6f5c8a5f202b936dba7fe640b926688) Adding printer cost - [`de14bae`](https://github.com/maziggy/bambuddy/commit/de14baed1414de7365a6360d8f4e3ca7448be17e) Merge branch 'dev' into feature/printerUseCostOnArchive ### 📊 Changes **14 files changed** (+1007 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/archives.py` (+87 -2) 📝 `backend/app/core/database.py` (+12 -0) 📝 `backend/app/models/printer.py` (+2 -0) 📝 `backend/app/schemas/archive.py` (+5 -0) 📝 `backend/app/schemas/printer.py` (+8 -0) 📝 `backend/app/services/archive.py` (+10 -2) 📝 `backend/app/services/archive_comparison.py` (+42 -1) ➕ `backend/tests/integration/test_machine_cost_api.py` (+419 -0) ➕ `backend/tests/unit/test_machine_cost.py` (+337 -0) 📝 `frontend/src/api/client.ts` (+7 -0) 📝 `frontend/src/i18n/locales/en.ts` (+8 -0) 📝 `frontend/src/pages/ArchivesPage.tsx` (+7 -1) 📝 `frontend/src/pages/PrintersPage.tsx` (+60 -0) 📝 `frontend/src/pages/StatsPage.tsx` (+3 -0) </details> ### 📄 Description ## Description Added the option to track machine/printer cost ## Related Issue #680 <!-- Link to the issue this PR addresses (if applicable) --> Fixes # ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made <!-- List the specific changes made in this PR --> - Added Price and LifeSpan to the Printer - Machine Cost Computation - Change Archive Endpoints - Added unit tests ## Screenshots <!-- If applicable, add screenshots to demonstrate your changes --> <img width="249" height="116" alt="image" src="https://github.com/user-attachments/assets/c22d0da5-914e-4e34-b8f0-7fb83d7b8ef9" /> <img width="1069" height="327" alt="image" src="https://github.com/user-attachments/assets/f54b28bb-1aa2-424e-aaff-f5f241a86c88" /> <img width="335" height="660" alt="image" src="https://github.com/user-attachments/assets/f5ce2499-7baf-49ab-9bdc-9e0ff56054e9" /> <img width="550" height="1021" alt="image" src="https://github.com/user-attachments/assets/f333849e-d8e0-4906-b4bd-88cf890ef9ef" /> ## Testing <!-- Describe how you tested your changes --> - [X] I have tested this on my local machine - [ ] I have tested with my printer model: <!-- e.g., X1C, P1S, A1 --> ## Checklist - [ ] My code follows the project's coding style - [ ] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [ ] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:00 +02: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
starred/bambuddy-maziggy-1#1098
No description provided.