SCECcode / ucvm

UCVM is used to query seismic velocity models for earth properties (Vp, Vs, density) by lat,long, and depth. It can create velocity meshes used in seismic wave propagation simulations. This repo contains the source codes that implement the core UCVM query interface. Python-based plotting modules, based on matplotlib, are now hosted in a separate github repo called SCECcode/ucvm_plotting.
https://www.scec.org/research/ucvm
BSD 3-Clause "New" or "Revised" License
19 stars 3 forks source link

Improve installation by consolidating Python scripts into autotools scripts #9

Open baagaard-usgs opened 2 years ago

baagaard-usgs commented 2 years ago

Autotools integration

The combination of Python scripts and autotools (autoconf, automake, etc) introduces several issues from a developer and user perspective:

  1. The Python scripts always run all steps. For example, the ucvm_setup.py script always starts from the beginning, even when some of the steps may have completed successfully.
  2. The installation process involves running multiple scripts.
  3. Combining Python scripts with autotools results in an installation process that is significantly more difficult to debug and diagnose errors. It is also much more cumbersome to maintain.

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

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.

baagaard-usgs commented 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.