Skip to content

Add validation for Quality and Rotate options - #105

Open
Vijaysir0hi wants to merge 1 commit into
kondratevdev:masterfrom
Vijaysir0hi:feat/validate-quality-rotate
Open

Vijaysir0hi wants to merge 1 commit into
kondratevdev:masterfrom
Vijaysir0hi:feat/validate-quality-rotate

Conversation

@Vijaysir0hi

Copy link
Copy Markdown
Contributor

Resolves #28 (subtask for Quality and Rotate scalar options).

Changes

  • Implemented Quality.validate() to ensure values are integers between 0 and 100 inclusive, rejecting negative values, values over 100, and non-integer/boolean types.
  • Implemented Rotate.validate() to ensure angles are integer multiples of 90, rejecting non-multiples and boolean types.
  • Updated docstrings for Quality and Rotate documenting raised ValueError exceptions and constraints.
  • Added comprehensive unit tests in tests/test_unit/test_options/test_quality.py and tests/test_unit/test_options/test_rotate.py covering valid bounds, direct option instantiation, Transform keyword arguments, and invalid types/ranges.
  • Cleaned up tests/test_unit/test_options/test_integer.py to decouple constrained options into dedicated test suites.

Signed-off-by: Vijay Sirohi <191354616+Vijaysir0hi@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

[meta] Add validation for processing options

1 participant