Repository navigation
6.0.0
CHANGELOG
6.0.0 (2025-08-11)
BREAKING CHANGE
- Temporal types now extend native Python datetime types directly
Feat
- migrate temporal types to V3 pattern (#24)
5.0.0 (2025-08-11)
BREAKING CHANGE
- Boolean and Binary types now extend native Python types directly
Feat
- migrate boolean and binary types to V3 pattern (#23)
4.0.0 (2025-08-11)
BREAKING CHANGE
- Remove validate_dataclass decorator. Dataclasses no longer
validate mocksmith types. Use Pydantic BaseModel for validation instead.
Feat
- replace validate_dataclass with Pydantic-only validation (#22)
3.1.0 (2025-07-06)
Feat
- add Literal type support for mock generation (#21)
3.0.3 (2025-07-04)
Refactor
- consolidate numeric types using inheritance and update constraint parameters (#20)
3.0.2 (2025-07-02)
Fix
- release process issue
3.0.1 (2025-07-02)
Fix
- release workflow
3.0.0 (2025-07-02)
Feat
- simplify string types to use only startswith/endswith constraints (#19)
- add hybrid validation using Pydantic constraints internally
- add constrained type for money, decimal and float (#17)
v2.0.1 (2025-06-30)
Fix
- remove upper bound constraints from Python and Pydantic dependencies (#16)
v2.0.0 (2025-06-25)
Documentation
-
Fix changelog entry for v1.1.0 [skip ci]
(bc9d674) -
Moved enum support feature from v1.0.0 to v1.1.0 where it belongs - Removed duplicate entry from
v1.0.0 section
Features
- feat: add IP address types for network data validation
- Added IPAddress type that accepts both IPv4 and IPv6 addresses - Added IPv4Address type for
IPv4-only validation - Added IPv6Address type for IPv6-only validation - All types include proper
validation using Python's ipaddress module - Mock generation creates realistic IP addresses -
Added comprehensive tests and example - Works with both dataclasses and Pydantic models
- feat: add Pydantic built-in types support and improve unsupported type handling
BREAKING CHANGE: Remove Email, URL, IPAddress, IPv4Address, and IPv6Address specialized types in
favor of Pydantic equivalents
-
Add comprehensive support for Pydantic built-in types in mock generation: - Network types:
HttpUrl, EmailStr, IPvAnyAddress, IPv4/6Address - Numeric types: PositiveInt, NegativeFloat,
conint, confloat - String types: UUID4, SecretStr, constr with patterns - Date/time types:
FutureDate, PastDate, FutureDatetime, PastDatetime - Support for Pydantic v2 Annotated types with
constraints -
Improve unsupported type handling: - Add intelligent fallback with auto-instantiation attempts -
Always show warnings for unsupported types to encourage feature requests - Add special handling
for Path, Set, and FrozenSet types - Return None with helpful warning messages -
Remove redundant specialized types: - Email → use Pydantic's EmailStr - URL → use Pydantic's
HttpUrl or AnyUrl - IPAddress/IPv4Address/IPv6Address → use Pydantic's IP types - Reduces code
duplication and maintenance burden -
Consolidate examples from 7 files to 4 main files: - Merge enum and Pydantic built-in types
examples into main mock examples - Add Pydantic types limitations section to dataclass example -
Improve organization and reduce example sprawl -
Update documentation: - Document all supported Pydantic types - Add unsupported type handling
section - Clarify Pydantic types in dataclasses limitations - Update migration guide for removed
types -
Update tests to reflect removed types and new functionality
This change modernizes mocksmith to leverage Pydantic's type system while providing better developer
experience through clear warnings and expanded type support.
- fix: use secure temporary paths instead of hardcoded /tmp
- Replace hardcoded /tmp paths with tempfile.gettempdir() - Addresses bandit security warning B108 -
Remove smart field name detection from mock generation - Update examples and tests accordingly
BREAKING CHANGES
- Remove Email, URL, IPAddress, IPv4Address, and IPv6Address specialized types in favor of Pydantic
equivalents
v1.1.0 (2025-06-22)
v1.0.0 (2025-06-22)
Chores
-
Bump version to 0.2.0 and enable major version bumps
(88270ae) -
Set major_on_zero = true to allow proper versioning - Bump to 0.2.0 to move past the existing
0.1.0 tag -
Update readme
(ad42dde) -
deps-dev: Bump the development group with 3 updates
(#7,
92c5f0c)
Updates the requirements on pytest-cov,
black and isort to permit the
latest version.
Updates pytest-cov to 6.2.1 -
Changelog -
Commits
Updates black to 25.1.0 - Release notes -
Changelog -
Commits
Updates isort to 6.0.1 - Release notes -
Changelog -
Commits
--- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.2.1
dependency-type: direct:development
dependency-group: development
-
dependency-name: black dependency-version: 25.1.0
-
dependency-name: isort dependency-version: 6.0.1
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updates the requirements on pytest,
pytest-cov, ruff
and black to permit the latest version.
Updates pytest to 8.3.5 - Release notes -
Changelog -
Commits
Updates pytest-cov to 5.0.0 -
Changelog -
Commits
Updates ruff to 0.11.13 - Release notes -
Changelog -
Commits
Updates black to 24.8.0 - Release notes -
Changelog -
Commits
--- updated-dependencies: - dependency-name: pytest dependency-version: 8.3.5
dependency-type: direct:development
dependency-group: development
-
dependency-name: pytest-cov dependency-version: 5.0.0
-
dependency-name: ruff dependency-version: 0.11.13
-
dependency-name: black dependency-version: 24.8.0
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gurmeet Saran gurmeetx@gmail.com
Updates the requirements on pre-commit to permit the
latest version. - Release notes -
Changelog -
Commits
--- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.2.0
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Continuous Integration
-
Fix auto release
(2fb3aa3) -
Fix building package before publishing
(bde7f18) -
Fix flake test case test_pydantic_optional_fields
(92a24b7) -
Fixing release package error
(75bed0a) -
Update version
(3fc7e13) -
Updated test cases and github action for release management + pyright integration
(#1,
a4423b5)
-
add release workflow and github action
-
fix: apply linter fixes for tests
-
fix: resolve all linting issues
-
add pyright
-
feat: switch to Poetry and add pyright type checking
- Replace setuptools with Poetry for dependency management - Add pyright for type checking
(replacing mypy) - Update all GitHub Actions workflows to use Poetry - Fix type checking errors
and Python 3.8 compatibility - Add Makefile for common development tasks - Add TESTING.md
documentation explaining coverage approach - Configure coverage threshold at 59% (accounts for
skipped tests on Python 3.8) - Fix Poetry installation on Windows CI - Update .gitignore to
exclude poetry.lock - Fix pydantic example type ignore comment - Use shell: bash for
cross-platform compatibility - Skip failing dataclass validation tests on Python 3.8
Note: Coverage varies by Python version (59% on 3.8, 66% on 3.9+) due to
dataclass validation limitations on Python 3.8.
Bumps codecov/codecov-action from 4 to 5. - Release
notes -
Changelog -
Commits
--- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps softprops/action-gh-release from 1 to 2. -
Release notes -
Changelog -
Commits
--- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: '2'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Features
-
Add automatic enum support for mock generation
(ff1ecba) -
Mock factory now automatically handles Python Enum types - Randomly selects from available enum
values - Works with Optional[Enum] fields (80% chance of value, 20% None) - Supports all enum
types: string values, integers, and auto() - Added comprehensive tests and example - Works
seamlessly with both dataclasses and Pydantic models
add constraned types for int
- add mocking
add tinyint
add support for tinyint and real type
- Add UUID type and reorganize specialized types
(e5b723f)
This commit includes: - Added UUID type to specialized types - Moved URL from contact.py to web.py
for better organization - Fixed flaky tests for optional fields
BREAKING CHANGE: URL import path changed from mocksmith.specialized.contact to mocksmith.specialized
-
change project name to mocksmith
-
add auto release for package
- Moved URL to web.py
(8a31f9d)
Refactoring
- Remove unneeded file
(83a66df)