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

Issue 7 #8

Closed kaiiam closed 3 weeks ago

kaiiam commented 4 weeks ago

PR addressing #7. Added new Provenance class as a container. I hadn't intended to make this be multivalued: true but I couldn't get the tsv to validate without it. Perhaps in a future PR we can do something different for this.

kaiiam commented 4 weeks ago

@turbomam I'm having some issues with my build failing

ImportError: cannot import name 'FoodCollection' from 'mifc.datamodel.mifc' (/home/runner/work/mifc/mifc/src/mifc/datamodel/mifc.py)

I think it has something to do with the python tests not working. I think I had this issue before but never managed to fix it. Let me know if there is something obvious that can/should be done. Thanks if you get a chance to help much appreciated.

kaiiam commented 4 weeks ago

When I run make test I seem to get a similar error

======================================================================
ERROR: tests.test_data (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_data
Traceback (most recent call last):
  File "/Users/kai/.pyenv/versions/3.9.2/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/Users/kai/.pyenv/versions/3.9.2/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/Users/kai/Desktop/software/mifc/tests/test_data.py", line 7, in <module>
    from mifc.datamodel.mifc import FoodCollection
ModuleNotFoundError: No module named 'mifc'

Although that one isn't the same python script. I've tried running cruft update to see if that helps.

kaiiam commented 3 weeks ago

I've created #9 to deal with the build issues, I want to move forward with this for now. The this repo has its own tests using LinkML validate and convert which worked with the new changes introduce here. So I'm going to move forward with this PR, and hopefully get help later in #9.