sorry for the uber-general issue title, but I can find no other way to express the root question I have.
In the other repo, it looks like epanet_py.c directly wraps and exposes most of the EPANET API, with the addition of an error manager layer. This file is an intermediate API that unpacks error conditions, and then the swig-generated toolkit_wrap.c / toolkit.py paired functions (in this repo) take care of appropriate type conversions and warning/exception throwing.
So the first question is about the interdependencies. In the EPANET repo:
epanet_py.c (excluded from normal C build)
errormanager.c (excluded from normal C build)
BUILD_PY_LIB option in CMakeLists.txt to add above files into compilation
... these are not needed for the EPANET toolkit/cli compilation or anything, so I'm confused as to where they really belong.
Now the real questions is - is all this necessary? I realize that this is the product of much effort, so I assume that much thought went into this structure. I'm looking for some written history of the events leading up to this, and I'm just not able to string together the narrative from issue-threads and commit messages.
I was under the impression that a major advantage of using SWIG is to automatically handle much of what is being done via these mechanisms by crafting a concise interface file. Does this not pan out in practice? I'm grateful for any background info, links, blogs, or otherwise.
sorry for the uber-general issue title, but I can find no other way to express the root question I have.
In the other repo, it looks like
epanet_py.c
directly wraps and exposes most of the EPANET API, with the addition of an error manager layer. This file is an intermediate API that unpacks error conditions, and then the swig-generatedtoolkit_wrap.c / toolkit.py
paired functions (in this repo) take care of appropriate type conversions and warning/exception throwing.So the first question is about the interdependencies. In the EPANET repo:
epanet_py.c
(excluded from normal C build)errormanager.c
(excluded from normal C build)BUILD_PY_LIB
option in CMakeLists.txt to add above files into compilation... these are not needed for the EPANET toolkit/cli compilation or anything, so I'm confused as to where they really belong.
Now the real questions is - is all this necessary? I realize that this is the product of much effort, so I assume that much thought went into this structure. I'm looking for some written history of the events leading up to this, and I'm just not able to string together the narrative from issue-threads and commit messages.
I was under the impression that a major advantage of using SWIG is to automatically handle much of what is being done via these mechanisms by crafting a concise interface file. Does this not pan out in practice? I'm grateful for any background info, links, blogs, or otherwise.