Closed falkamelung closed 5 years ago
@falkamelung Or you could just modify the template file generation script to use the same format its being read in. That is much much cleaner than writing a whole separate script to validate if the user created a valid template format.
How are these template files generated? If they are generated by hand, I would just tell you to be more diligent about their creation (and to write a generation script for them like generate_tenplate_files.py). If there is a script to generate them, just make it conform to the reading protocol.
I am concerned about manually generated files. Several times it took me an hour so so until I realized what the problem is. And others also asked me why a template failed. As I mentioned, the old code did not require the spaces so people get confused. It would take only a few minutes to write this script? Not a big thing, though.
Falk Amelung Professor Department of Marine Geosciences Rosenstiel School of Marine and Atmospheric Sciences University of Miami 4600 Rickenbacker Causeway Miami, FL 33149 USA Tel: 305 421 4949 E-mail: famelung@rsmas.miami.edumailto:famelung@rsmas.miami.edu Web: http://insar.rsmas.miami.edu InSAR data: http://insarmaps.miami.edu
On Mar 15, 2019, at 1:15 PM, Joshua Zahner notifications@github.com<mailto:notifications@github.com> wrote:
@falkamelunghttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffalkamelung&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cfe75614a0fce42c860de08d6a969cd38%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636882669221450003&sdata=vSh8JEmUPSObkdtvio1FUGDsIcTXvzWes9%2F%2Fop1bwbQ%3D&reserved=0 Or you could just modify the template file generation script to use the same format its being read in. That is much much cleaner than writing a whole separate script to validate if the user created a valid template format.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeodesymiami%2Frsmas_isce%2Fissues%2F98%23issuecomment-473370880&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cfe75614a0fce42c860de08d6a969cd38%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636882669221460012&sdata=PrTvX13OrksBbYA7Car2Av2W15b9zALs2ov784m9o8Q%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKpT3D7dKQnWiMY04g-dFRnxoifNNCO6ks5vW9UngaJpZM4b2Za-&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7Cfe75614a0fce42c860de08d6a969cd38%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636882669221460012&sdata=BzTGV%2B6g%2BjSFlXjQz%2BJ93Bb8HCz04%2FriFSqSF%2BJLNMc%3D&reserved=0.
You shouldn't be manually generating these files then. It would be a better use of time to write a script to generate those template files automatically rather than write a script to check if the manually written ones adhere to specified formatting.
In general, its always better to fix the problem at its source rather than check whether a problem exists later on.
The new template reader requires spaces on both sides of the
=
. If you sayyou get an error. You need to say
It would be good to have a function
check_template_format.py
to check for this which throughs a meaningful message if there is a format issue (our previous template reader did not require the space. I actually like the space requirement). There are other frequent formatting mistakes which we could add to check for at a later stage.