Skip to content

Add BaZi Ten Gods computation module with typing and unit tests#6

Open
cto-new[bot] wants to merge 1 commit intoPvfrom
feat/bazi-ten-gods-typehints-tests
Open

Add BaZi Ten Gods computation module with typing and unit tests#6
cto-new[bot] wants to merge 1 commit intoPvfrom
feat/bazi-ten-gods-typehints-tests

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Oct 24, 2025

Summary

This PR introduces a new module for computing Ten Gods relationships between heavenly stems in BaZi, complete with type annotations and unit tests for correctness.

Details

  • Implements bazi.ten_gods with typed dataclasses and computations for Ten Gods mapping.
  • Provides a get_ten_god function for mapping day stem vs. other stem to labeled, coded result.
  • Includes type hints for all core data structures and interfaces.
  • Adds unit tests covering representative cases and error handling.
  • Adds .gitignore and ensures package structure ready for further extension.

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

Introduce the `bazi.ten_gods` module to calculate Ten Gods relationships
between heavenly stems for BaZi (Four Pillars of Destiny). This module
includes type hints throughout, a normalized day/other stem mapping utility,
and thorough pytest-driven unit tests.

This change enables type-checked, robust, and easily testable BaZi Ten Gods
logic, supporting reliability for downstream consumers. No breaking changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants