Open baagaard-usgs opened 2 years ago
On a related note, I have created a repo for the Euclid software https://github.com/baagaard-usgs/euclid-etree and updated the configure.ac
and Makefiles for better portability. One only needs to run autoreconf
to generate the configure script. It builds and installs the etree library. The examples and tools can also be built, but they are not installed.
Autotools integration
The combination of Python scripts and autotools (autoconf, automake, etc) introduces several issues from a developer and user perspective:
ucvm_setup.py
script always starts from the beginning, even when some of the steps may have completed successfully.I suggest consolidating the installation process so that it is all done by autotools. This will provide better checking and error reporting and allow the entire installation process to be consistent and controlled by the top-level configure script.
Additional issues
libtool
to build the libraries allows static and/or dynamic libraries to be built in a portable way (for example, support both macOS and Linux). Currently, the Makefile.am scripts are hardwired to build shared libraries on a Linux system.configure
script. When using autotools, such a tarball is generated with themake dist
command. This eliminates the need for a user to runaclocal
,automake
, orautoconf
; a user just runsconfigure
,make
, andmake install
. Developers should only have to runautoreconf
to generate theconfigure
script.make install
script. This reduces the size of the tarballs and allows the data files to be installed directly to the installation location (minimizing storage requirements). This follows the model used by Proj for downloading the geographic datum information.See https://github.com/SCECcode/cvmh/pull/2 for an example of how this can work. I am making the above changes for ucvm in a fork for the features/models I am using. I don't have time to fix all of the autotools issues for all of the models, but once you see an example, it is pretty easy to make the updates.
Edits
Jan 12, 2022: After working more with the UCVM source code, I understand how the plugin models work. I edited the comments above to remove my suggestion to integrate the code for querying the models (for example,
cca
) into the UCVM code base. I think it makes sense to be able to update the query code for the individual models without touching the UCVM repository.