Object-mother-pattern

Latest version: v2025.1.12

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2025.01.12

Changelog

๐Ÿ”จ Refactoring
- **Mother Class Reorganization:**
- Reorganized mother classes into `date` and `identifier` modules.
- Renamed `BoolMother` to `BooleanMother` for consistency.

๐Ÿ‘ท๐Ÿป CI/CD Improvements
- **Dependency Updates:**
- Bumped `actions/upload-artifact` from `4.5.0` to `4.6.0`.
- Bumped `github/codeql-action` from `3.27.9` to `3.28.1`.
---
[Full Changelog](https://github.com/adriamontoto/object-mother-pattern/compare/v2025.01.03...v2025.01.12)

2025.01.03

Changelog

โœจ Features
- **Mother Classes Enhancements:**
- Implemented `BytesMother`.
- Implemented `StringUUIDMother` and `UUIDMother` classes with corresponding tests.
- Updated `FloatMother` to allow random decimal places when not specified.
- Implemented `DateMother` and `DatetimeMother` with corresponding tests.

๐Ÿ”จ Refactoring
- **Code Improvements:**
- Updated import paths for consistency across mother classes.
- Improved type checking for value parameters in various mother classes.

๐Ÿ› Bug Fixes
- **Mother Class Fixes:**
- Improved error messages and handled edge cases in `FloatMother`.
- Implemented timezone awareness in `DatetimeMother`.
- Updated `StringDatetimeMother` tests to use `DatetimeMother` for initialization.
- Streamlined `FloatMother` to correctly handle equal `min` and `max` values.
- Added coverage pragma comments for `DatetimeMother`, `NameMother`, `list`, `set`, `tuple`, `dict`, and dictionary edge cases.

- **Testing and Coverage Enhancements:**
- Added coverage pragma comments for edge case handling in `NameMother`.
- Updated bug template for consistency.

๐Ÿงช Tests
- Implemented test modules for `BytesMother`, `StringMother`, and `FloatMother`.

๐Ÿ“š Documentation
- **Readme and Usage Documentation:**
- Added a utilization section with examples and real-life use cases.
- Updated example outputs in `README`, `BytesMother`, `StringMother`, and `FloatMother`.
- Added contributing guidelines to `README`.

๐Ÿ“ฆ Build
- Updated `.gitignore` to exclude coverage and environment folders.
- Removed `pytest-asyncio` from development requirements.

๐Ÿ‘ท๐Ÿป CI/CD
- Removed JSON files checker from pre-commit configuration.

๐Ÿ”ง Chores
- Updated comments in `.gitignore` for clarity and consistency.
- Corrected typo in `.gitignore` comments.
- Updated license reference in `pyproject.toml` to point to `LICENSE` file.
- Updated version to `2025.01.03`.
---
[Full Changelog](https://github.com/adriamontoto/object-mother-pattern/compare/v2024.12.21...v2025.01.03)

2024.12.21

Changelog

โœจ Features
- **Mother Classes for Random Value Generation:**
- Implemented `BaseMother` as a foundational class for generating random values.
- Added `IntegerMother` for generating random integers.
- Added `BoolMother` for generating random boolean values.
- Implemented `StringMother` for generating random string values.
- Added `FloatMother` for generating random float values.
- Implemented `TextMother` for generating random text values.
- Created `NameMother` class for generating random name values.

๐Ÿ”จ Refactoring
- **Directory and File Organization:**
- Reorganized `BoolMother` and `IntegerMother` into the primitives directory.
- Moved primitives-related tests to a dedicated `primitives` test folder.
- Updated import of `override` for compatibility with Python 3.11.
- Replaced string `'invalid'` with `IntegerMother.invalid_type()` in `IntegerMother` tests.
- Removed redundant type and value checks in `IntegerMother`.

- **Code Quality and Maintenance:**
- Updated date generation method for improved efficiency.
- Ran automatic code formatter for consistent style.

๐Ÿ› Bug Fixes
- Resolved issue with invalid type `NoneType` handling in `IntegerMother`.
---
[Full Changelog](https://github.com/adriamontoto/object-mother-pattern/commits/v2024.12.21)

Links

Releases

Has known vulnerabilities

ยฉ 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.