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

Github build and test failures #9

Closed kaiiam closed 3 weeks ago

kaiiam commented 3 weeks ago

Repo was created with linkml-project-cookiecutter about a year back but the build checks fail. Never got around to addressing this issue. It'd be nice to get someone like @turbomam who is more familiar with these types of issues.

One of the github check failures when trying to deploy a branch seems to be from the mifc/datamodel/mifc.py file. The check gives the error:

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

Additionally, 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'

This time with the mifc/tests/test_data.py script. I'm guessing something about the python dependencies, poetry or similar maybe part of the issue? Perhaps the python files are not syncing up with the schema yaml somehow? Please let me know if anyone from the linkML community could help,

Much obliged!

kaiiam commented 3 weeks ago

Also have [.cruft.json](https://github.com/kaiiam/mifc/blob/main/.cruft.json) as a file in the main directory, other LinkML projects don't have this should this be removed from the repo?