command line tools builds #256
Replies: 2 comments
-
postscript to the previous. I have a specific example script I want to generalize to put into mspass that has emerged as a need for handling the pwmig conversion. The tool I have in mind is a generic tool to convert a table stored in a text file (csv or text file in fixed formats ala Antelope's Datascope) and store the results in a MongoDB collection. I don't think the tool needs to be designed by committee, but I think you will likely agree when I'm done it will have some utility. It needs to be a command line tool but in python, so resolving the topic of this discussion will be important. |
Beta Was this translation helpful? Give feedback.
-
The bin directory is already there. If you go to our mspass container, you can see that the two scripts (dbclean and dbverify) are in the correct directory:
Note that the setup will put them under the Lines 66 to 71 in 35c5e77 To put a C binary into the same bin directory using the Lines 41 to 43 in 35c5e77 All we need to do is set the CMAKE_RUNTIME_OUTPUT_DIRECTORY variable properly, but I am not exactly sure how at the moment. The other question is whether we have an absolute need to have binaries written in C for the main mspass package. It seems to me that this is better to be avoided. |
Beta Was this translation helpful? Give feedback.
-
Our current setup does not seem to have a mechanism to build any kind of command line tools that can be run from the unix shell from the command line. At present, I think we have two that are not installed in a way the users can use them. The ones I'm aware of are found in python/mspasspy/db/script. They are command line tool called dbverify and dbclean.
In the cxx tree we have the functionality of a "make install' that creates 3 directories under MSPASS_HOME (or it might be MSPASSHOME) called: data, include, and lib. I think we need:
That is a suggestion, but the details about where this is installed and how are less important. What we need is a standard place to put command line tools that users would execute from the command line. Since our container runs a unix os that is sensible and we could set up the container to have that directory in the path some a shell run from a notebook would immecdiately see those tools.
This could be useful in a number of contexts:
This came up because I encountered this issue when converting my plane wave migration code - an example legacy code. I have a set of command line tools I use for data preparation that need a home and right now I don't know how to handle it short of a manual copy of the python scripts to some special directory.
Beta Was this translation helpful? Give feedback.
All reactions