Repository navigation
Enhance and Clean Up by AI Agents
Release Notes: py2cpp 1.5.2
Release Date: May 1, 2026
GitHub Comparison: 1.5.1...1.5.2
Overview
Version 1.5.2 introduces major improvements to the testing infrastructure, including property-based testing with RapidCheck, extensive documentation enhancements across core containers, and various code quality improvements. This release also includes fixes for cross-platform compatibility and build system refinements.
✨ New Features
-
Property-Based Testing – Integrated RapidCheck framework for property-based tests alongside doctest:
- 10 new property-based tests covering permutation (SJT, EHR) and combination (EMK) algorithms
- Tests verify index validity, completeness, uniqueness, and generator properties
- Conditional compilation support for optional dependencies
-
New Headers Added:
dict.hpp– Python-like dictionary implementationfractions.hpp– Fraction arithmeticset.hpp– Python-like set containerrange.hpp– Python-like range/enumerate utilitiesenumerate.hpp– Enumerate wrapper for containerslist.hpp– List-like container
📚 Documentation Improvements
Comprehensive Doxygen documentation has been added across all core components:
| Component | Documentation Added |
|---|---|
dict.hpp |
Constructor docs, contains(), copy(), items(), at(), operator overloads |
set.hpp |
Constructor docs, contains(), copy(), assignment operators |
range.hpp |
begin(), end(), empty(), size(), contains(), operator[] |
enumerate.hpp |
Iterator methods, wrapper behavior, const overloads |
fractions.hpp |
Special case handling (inf, nan, zero comparisons) |
🧪 Testing Improvements
-
CMake Test Configuration:
- Added RapidCheck via CPM.cmake with
masterbranch - Conditional linking with proper target detection (
rapidcheck::rapidcheckorrapidcheck) - Disabled doctest auto-discovery to avoid conflicts – now using single CTest target
- Added RapidCheck via CPM.cmake with
-
xmake Configuration:
- Conditional RapidCheck support leveraging CMake-downloaded dependencies
-
Test Assertions – Migrated from
CHECK/CHECK_FALSEtoCHECK_EQ/CHECK_LT/CHECK_NEfor better diagnostic output across:test_dict.cpptest_frac2.cpptest_set.cpptest_range.cpp- EdgeView and AtlasView tests
-
Total Test Coverage:
- 45 doctest tests + 10 RapidCheck property-based tests = 55 total test cases
🔧 Build System Updates
-
CMake:
- Minimum version remains 3.14, uses CPM.cmake for dependency management
- Header-only INTERFACE library with proper include visibility
- Column limit: 100 in
.cmake-format
-
xmake:
- Updated compiler flags:
/EHsc /W4 /WX /wd4459(replaced/wd4819 /wd4996) - Optimize level set to "fastest"
- Updated compiler flags:
-
Cross-platform:
- Added
-Wno-deprecated-literal-operatorfor Termux build compatibility - CI support for Ubuntu, macOS, Windows via GitHub Actions
- Added
📝 Code Style & Conventions
- Header-only:
#pragma oncethroughout - No type suppression – explicit constructs only
- Error handling:
std::runtime_error/std::out_of_range - Conventional commits – feature branches, no force pushes to main
⚠️ Known Issues
- Pre-existing crash in
test_combin.cpptest case "Generate all combinations by emk_comb_gen" (SEH exception)- Occurs with or without RapidCheck integration
- Blocks full test suite execution
- Will be addressed in a future release
📊 Statistics
- Files changed: 33
- Additions: 1,286
- Deletions: 589
Upgrading Notes
No breaking changes are introduced in this release. Existing code using py2cpp 1.5.1 should continue to work unchanged. For users who want to leverage the new property-based tests, ensure RapidCheck is available (CMake will fetch it automatically via CPM).
Contributors
- @luk036 – Main development, documentation, build system updates