Adds Decimal value objects and enforces immutability - #4
Merged
Conversation
Updates the package version to 0.1.5.1 in pyproject.toml and uv.lock. This increment addresses a minor release.
Ensures that value objects are immutable after initialization by preventing attribute reassignment and deletion. This enhances data integrity and prevents unintended modifications to value object state.
Updates the package version to 0.1.6 in pyproject.toml and uv.lock. This version bump reflects changes and improvements.
Ensures that value objects are immutable after initialization by preventing attribute reassignment and deletion. This enhances data integrity and prevents unintended modifications to value object state.
Updates the package version to 0.1.6 in pyproject.toml and uv.lock. This version bump reflects changes and improvements.
Simplifies value object implementations by removing unnecessary comments and focusing on core functionality. This improves code readability and maintainability. Specifically, removes redundant comments in `CompositeValueObject` and `CurrencyValueObject`. Also, refines equality checks and hashing in `CompositeValueObject` and removes redundant tests. Updates URL regex in `UrlValueObject` to fix a minor issue.
Adds tests to ensure that value objects and composite value objects are immutable after initialization. Also adds tests to verify correct behavior when `super().__init__` is not called in derived classes.
Updates the package version to address a bug fix or minor enhancement.
Simplifies value object implementations by removing unnecessary comments and focusing on core functionality. This improves code readability and maintainability. Specifically, removes redundant comments in `CompositeValueObject` and `CurrencyValueObject`. Also, refines equality checks and hashing in `CompositeValueObject` and removes redundant tests. Updates URL regex in `UrlValueObject` to fix a minor issue.
Adds tests to ensure that value objects and composite value objects are immutable after initialization. Also adds tests to verify correct behavior when `super().__init__` is not called in derived classes.
Updates the package version to address a bug fix or minor enhancement.
Adds DecimalValueObject and PositiveDecimalValueObject for handling decimal values. Updates MoneyValueObject to use PositiveDecimalValueObject instead of PositiveFloatValueObject for amount. This allows for more precise monetary calculations.
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.
Adds
DecimalValueObjectandPositiveDecimalValueObjectclasses, and implements immutability for all value objects.This change introduces new value object types for handling decimal values and ensures that value objects are immutable after initialization.
DecimalValueObjectandPositiveDecimalValueObjectValueObjectandCompositeValueObjectThis change addresses the need for decimal value object types and ensures that value objects are immutable, preventing accidental modification after creation.