Open rth opened 4 years ago
Yeah, I'm not sure how to set test resource file paths otherwise, any suggestions?
For test data, I think we should put it under icubam/resources/test
or icubam/data/test
, define e.g. TEST_DATA_PATH
with respect to __file__
in icubam/data/__init__.py
and use paths with respect to this base directory in tests.
To keep ICUBAM generic and not specific to France we should avoid any hard-coded ressources. In particular, we should move icubam/predicu/data maybe to some language specific path.
One thing I don't understand about the current resources folder, is that tests use relative paths e.g.
resources/test.toml
meaning that if python is started from a different folder than ICUBAM root directory, it will not work.For instance,
currently fails with
That's OK as long as it's only test config files, but that would not be acceptable with actual data ressources.
I think we might want to have,
resources/
with config files as we currently have.icubam/data/fr
oricubam/resources/fr/
for language specific data files that we want to vendor inside the project. Then include those inpackage_data
insetup.py
WDYT? cc @olivierteboul