Udayraj123 / OMRChecker

Evaluate OMR sheets fast and accurately using a scanner 🖨 or your phone 🤳.
GNU General Public License v3.0
709 stars 295 forks source link

Updated src/defaults/schema.json #115

Closed rudrapsc closed 1 year ago

rudrapsc commented 1 year ago

edited schema, now it will show validation error if in the preprocessor the name is not given , options are not given and if the name of the plugin happen to be CropOnMarkers , then relative path becomes a required field and will show error if not given.

removed relative path from the template.json of sample4 image

it showed this error image

rudrapsc commented 1 year ago

image

rudrapsc commented 1 year ago

image

this screenshot shows three invalid json ,one with array length greater than the max , one with array length shorter than given min and one with garbage options.

Udayraj123 commented 1 year ago

Okay, the key column seems not specific to the error path. But it's not related to your changes.

Udayraj123 commented 1 year ago

Can you make the following change in src/utils/file.py and share the output with me?

key, validator, msg = error.path, error.validator, error.message
# print the error paths
print(error.path)
print(error.absolute_path)

ref: https://python-jsonschema.readthedocs.io/en/latest/errors/

rudrapsc commented 1 year ago

Can you make the following change in src/utils/file.py and share the output with me?

key, validator, msg = error.path, error.validator, error.message
# print the error paths
print(error.path)
print(error.absolute_path)

ref: https://python-jsonschema.readthedocs.io/en/latest/errors/

image

this is the output i received

Udayraj123 commented 1 year ago
image

Need to change sigmax in builtins.py

Udayraj123 commented 1 year ago

Changing morphKernel to have 1.0 as one of the values gives this error -

TypeError: Can't parse 'ksize'. Sequence item with index 0 has a wrong type

This is a limitation of JSON it seems: https://json-schema.org/understanding-json-schema/reference/numeric.html#:~:text=JSON%20does%20not%20have%20distinct,the%20same%20value%20in%20JSON.