kaiiam / mifc

A minimum information standard checklist formalizing the description of food composition data and related metadata.
MIT License
2 stars 1 forks source link

Data validation test not performing as expected? #1

Closed kaiiam closed 10 months ago

kaiiam commented 1 year ago

@turbomam here is a simple validation test I performed which is giving unexpected results or perhaps I'm misunderstanding something.

Using the default schema generated by the cookie cutter repo, where the mifc.yaml schema file is completely unmodified from the original cookie cutter generated version. I added some basic tests in valid and invalid directories as they are expected to be the makefile.

I added the following really simple examples to see if i understand how the builtin validation is working as I think it should be specified in the makefile src/data/examples/.

src/data/examples/valid/1.yaml which is just the original Food-001.yaml example expected to work src/data/examples/invalid/1.yaml which is known invalid test src/data/examples/valid/2.yaml which has a string value for age_in_years which is suppose to be an integer.

When I pushed the first two files the build was OK https://github.com/kaiiam/mifc/actions/runs/4609698986/jobs/8147184670 which I believe is expected. However when I pushed valid/2.yaml which contains an error the string for a slot specified to be integer, the build didn't complain https://github.com/kaiiam/mifc/actions/runs/4609726739/jobs/8147250174. Am I potentially misunderstand how this is suppose to work? Or should it have complained when I pushed the valid/2.yaml test?

kaiiam commented 1 year ago

Fixed it up to be on a branch which triggered the build validation process as expected, however it fails on this instance which to me looks like it should be valid. Perhaps @turbomam maybe you can comment on this?

On instance:
    {'age_in_years': 31,
     'id': 'example:Food002',
     'name': 'Kai Blumberg',
     'primary_email': 'foo.bar@example.com'}
make: *** [Makefile:136: examples/output] Error 1
Error: Process completed with exit code 2.
kaiiam commented 1 year ago

failing build run ifo is https://github.com/kaiiam/mifc/actions/runs/4679230695/jobs/8288974891?pr=2