These tests should actually check that the values are greather than zero, so checks.check_is_greater_than_zero() is more adequate here. As the values should be made optional do something similiar as this:
if width_px is not None:
checks.check_is_greater_than_zero(width_px, 'width_px')
For the properties like y_max_dva you will also need some additional checks, similar to the checks for distance_cm that are already in place.
Test cases for the Screen class go to tests/unit/gaze/screen_test.py, tests for the Experiment class go to tests/unit/gaze/experiment_test.py.
Description of the problem
Currently there is no way to specify for example only the sampling rate of an experiment without any screen dimensions.
This restriction is artificial and we should allow for all the experiment arguments to be
None
.Description of a solution
Both
Experiment
andScreen
should have all arguments optional.In the Screen class there are several checks that the passed arguments are not zero:
https://github.com/aeye-lab/pymovements/blob/115a9b3febc4796e8952661a39cd6926de4ebb63/src/pymovements/gaze/screen.py#L114-L120
These tests should actually check that the values are greather than zero, so
checks.check_is_greater_than_zero()
is more adequate here. As the values should be made optional do something similiar as this:For the properties like
y_max_dva
you will also need some additional checks, similar to the checks fordistance_cm
that are already in place.Test cases for the Screen class go to
tests/unit/gaze/screen_test.py
, tests for the Experiment class go totests/unit/gaze/experiment_test.py
.Minimum acceptance criteria