Moved code to structure that was mostly talked over with @lucekdudek
Renamed Model into DemandOfferBaseModel as its more suited name than generic model
Imports are organized in following way:
Each package have __all__ in __init__.py that exports stuff that used outside
In area of the same level in package, imports from __init__.py are not used, specific modules are chosen
That way, we can keep __init__.py clear enough to have stuff exposed for external use, when internal imports are not polluting everything.
For both scenarios I've chosen to use absolute imports, but maybe local imports for non-external stuff could be used too. We could also go with third path, where external imports are used from __init__.py but internal imports are imported separately from specific module.
Also, I'm not sure what suitable way could be done at the highest core level regarding imports. As modules are golem-api-based, it seems like its fair idea, but how about other modules like golem_node?
Brace yourselves, massive change diff is coming!
What I've done:
Model
intoDemandOfferBaseModel
as its more suited name than generic modelImports are organized in following way:
__all__
in__init__.py
that exports stuff that used outside__init__.py
are not used, specific modules are chosenThat way, we can keep
__init__.py
clear enough to have stuff exposed for external use, when internal imports are not polluting everything.For both scenarios I've chosen to use absolute imports, but maybe local imports for non-external stuff could be used too. We could also go with third path, where external imports are used from
__init__.py
but internal imports are imported separately from specific module.Also, I'm not sure what suitable way could be done at the highest
core
level regarding imports. As modules are golem-api-based, it seems like its fair idea, but how about other modules likegolem_node
?