optimamodel / optima

Optima HIV software tool
http://optimamodel.com
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Rework init file #1901

Closed kelvinburke closed 1 year ago

kelvinburke commented 1 year ago

Previously optima.init imported the projects file as optima._project so that it wouldn't get confused with the class optima.Project.

But this causes errors when unpickling for some reason: the error comes on linux/mac when starting multi-threading, when it starts up more threads I think it pickles and unpickles the current environment, and the unpickler expects the submodules as optima.project, but the init file imported them as optima._project, or in that case optima._utils

So instead we import the projects file as optima.project and the class is either optima.Project or optima.project.Project

The fix worked on linux and didn't break anything that I could tell on my windows machine either

Similarly for all the other files