This repository was archived by the owner on Dec 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Category support additions #19
Merged
Jake-Pullen
merged 7 commits into
feature/add-category-support
from
category_support_additions
Jun 28, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
95dffe5
Some initial changes based on feedback
Jake-Pullen 3a8233e
More additions
Jake-Pullen 0e34431
Resolved most comments from Pull Request 8
Jake-Pullen 574341b
Moved convert to universal currency to its own module.
Jake-Pullen c3003a5
Working towards adding default rows, need to add system user?
Jake-Pullen fc61b98
feat: ✨We now add an internal master category per user that is hidden
Jake-Pullen 7efc613
fix: 🩹 Fixed a test failure
Jake-Pullen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| category: | ||
| - name: 'internal_master_category' | ||
| - name: 'tesing more categories' | ||
| budget_value: '100' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import logging | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| # TODO: Make this into a proper class so we can scale currrency handling | ||
|
|
||
|
|
||
| def convert_to_universal_currency(input_value: float) -> int: | ||
| """ | ||
| Converts the the input value to remove all decimal places and return an int. | ||
| This will be the starting point for our universal currency, | ||
| (see docs/data_dictionary). | ||
| for now, we will just focus on making this an int. | ||
| it will need change later once we have the basics done | ||
| """ | ||
| logger.info(f"received {input_value} to convert to universal currency") | ||
| input_value = float(input_value) | ||
| while input_value % 1 != 0: | ||
| logger.debug(f"input value is not a whole number {input_value}") | ||
| input_value = input_value * 10 | ||
| logger.info(f"returning {int(input_value)}") | ||
| return int(input_value) | ||
|
|
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.