GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Automate the building of gmt_data_server.txt #137

Closed PaulWessel closed 2 years ago

PaulWessel commented 2 years ago

Creating _gmt_dataserver.txt is currently a manual operation prone to errors and omissions. This PR starts the process of automating this process by adding more data to the recipe files so that the tiling script can build the server section for each data set. As new data sets are added and we run srv_tiling.sh -fon them, the snippet of code for that dataset required for _gmt_dataserver.txt is created and added to the information folder (e.g., earth_relief_server.txt). These files (now 14) are added to git. A new Makefile can now create the updated _gmt_dataserver.txt from the collection of snippets and a basic header section, with an automatically updated date stamp.

I have tested the _gmt_dataserver.txt produced by the new data sets and Makefile. However, that file is not in this PR since we want to be able to approve and merge this PR without updating the gmtserver file. Note that I have recreated all the new (10) grids and tiles after fixing the metadata and scripts.

The recipe files have been updated to separate the reference and DOI, and we have added a field for a default CPT so that the snippets can be built automatically.

Once we are happy with the test server results we will run the make command, update the stored gmt_data_server.txt, then manually copy the files on the server from test to data and finally merge that new branch.

maxrjones commented 2 years ago

I have tested the _gmt_dataserver.txt produced by the new data sets and Makefile. However, that file is not in this PR since we want to be able to approve and merge this PR without updating the gmtserver file. Note that I have recreated all the new (10) grids and tiles after fixing the metadata and scripts.

There is an update to information/gmt_data_server.txt included in the PR. Will this trigger the update of the gmtserver file?

PaulWessel commented 2 years ago

Yes but no change really. I have changed things so that the number of entries are now in the _gmt_dataserver.txt file rather than being computed on the server by a script. So this PR adds the 98 but I have also changed the _srv_doupdates.sh to just copy that file to its top directory rather than wc etc.