GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

Whether PROMICE-AWS-data-issues is found depends on where `get_l3` is run: should be changed for absolute path #234

Open BaptisteVandecrux opened 2 months ago

BaptisteVandecrux commented 2 months ago

Since github_data_issue.py look for flag and adjustment CSVs at https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/6ad7ee7560ffa8bf7b407d13b08da9d6205a9887/src/pypromice/qc/github_data_issues.py#L19-L20 whether it finds it or not depends on where pypromice is run.

I noticed that when because l3_reprocess.py was running fine but l3_processor.py could not find the flag files. This is because l3_processor.py was running get_l3 in the ./pypromice/src/pypromice folder and the relative path to the flag files was broken.

To prevent this from re-happening, I suggest that get_l3 would give the absolute paths of the flags and adjustment files instead of the relative path.

I also suggest that l3_reprocess.py and l3_processor.py should only make CLI calls containing absolute paths (instead of switching from folder to folder with cd).