Whilst in some_other_package
, I am importing files from the snnalgorithms
pip package. I received the error:
No module named 'src.snnalgorithms'
. This is a valid error because that src.snnalgorithms
file does not exist in the some_other_package
project from which I was calling the pip package.
As a solution, I can make all the imports in the snn.algorithms
pip package, relative to itself. Instead of:
from src.snnalgorithms.population.DUMMY import DUMMY
One could write:
from snnalgorithms.population.DUMMY import DUMMY
However, that implies that each time I want to run the code to briefly verify a minor change, or run the tests after a change, I will have to:
- Upload the changes into the
pip
package. - Re-install the pip package locally to reflect the changes.
This significantly slows down development. Hence I was wondering are there more efficient solutions for this?