eytelwein.main.validation module

Validation helpers for the Eytelwein main module.

This module provides centralized validation utilities used across multiple domains of the Eytelwein package.

eytelwein.main.validation.validate_positive_count(count: int, param_name: str = 'count') → None[source]

Validate that a discrete configuration count is a positive integer.

This centralized helper is used for parameters like strand_count and quantity_of_drives that represent discrete configuration counts, which must be plain int (not Quantity) values.

Parameters:
  • count (int) – The count value to validate.

  • param_name (str, optional) – Name of the parameter for error messages (default: “count”).

Raises:
  • ValueError – If count is a bool (which is a subclass of int in Python).

  • ValueError – If count is not an integer type.

  • ValueError – If count is not >= 1.

Notes

Discrete configuration counts (e.g., strand_count, quantity_of_drives) represent architectural choices in reeving or drive design and are always plain integers, never Quantity objects. This is intentional: while measured values and dimensionless ratios use Quantity, configuration counts reflect the logical structure of the system, not measurements with units.