kstaats / karoo_gp

A Genetic Programming platform for Python with TensorFlow for wicked-fast CPU and GPU support.
Other
159 stars 61 forks source link

Fix imports in __init__.py. #68

Closed ezio-melotti closed 2 years ago

ezio-melotti commented 2 years ago

This PR reverts a change that broke the release process.

Since the __version__ is defined in the __init__.py, during the release the file is accessed to fetch the version number. However, if the file imports base_class.py or other files, importing __init__.py will in turn trigger other imports that will require other dependency (such as numpy) and the import and the whole release process will fail.

I removed all the imports from __init__.py and adjusted another import in a test (which afaik is the only one that relied on Base_GP being import in __init__.py. In the future we could use a different approach for storing the __version__ if we want to be able to import things directly from karoo_gp.