Closed MGlauer closed 5 years ago
This branch fails to convert my standard testfile in cli.
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/dialects/oep/compiler.py", line 96, in visit_resource
schema=self.visit(resource.schema),
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/dialects/base/compiler.py", line 8, in visit
return meth(obj, *args, **kwargs)
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/dialects/oep/compiler.py", line 112, in visit_schema
foreignKeys=list(map(self.visit, schema.foreign_keys)),
TypeError: 'NoneType' object is not iterable
The command I used:
omi translate -f oep-v1.3 -t oep-v1.4 metadata_v13.json
I tried to trace back where it went wrong. The last commit I saw working was 7ed1434f37865c327f6b2f82d4f1228de63387fb . After the merge of this one in cd6c99ae2e52f77ec2ffc4532751b0546284d60e there was a different error:
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2324, in load
return self.resolve()
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2330, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/cli.py", line 19, in <module>
from omi.dialects import get_dialect
ImportError: cannot import name 'get_dialect' from 'omi.dialects' (/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/dialects/__init__.py)
So I'm unsure where the problem lies.
The problem was that the compiler did not check, whether the entries for licenses, sources etc where actually there. I fixed that and added tests accordingly.
This pull request allows
null
/None
values in all fields. This was considered invalid input in former releases.