NewGraphEnvironment / fish_passage_fraser_2023_reporting

Creative Commons Zero v1.0 Universal
0 stars 1 forks source link

15600124 - duplicate photo #57

Closed NewGraphEnvironment closed 3 months ago

NewGraphEnvironment commented 4 months ago

seeing this on mergin and wondering if it is going to surface as an issue later.

image

lets have a look at the scripts/*_photo.R scripts and reproduce the fpr_photo_qa_df object and inspect to see if that catches it. Will be good to know. Be a bit careful to try not to run the scripts that move and resize and rename the photos. Just the qa stuff.

Usually we do not want there to be 1. spaces in file names ( i know you know). 2. duplicates of reserved names for PSCIS required photos (ex. *_inlet.JPG and *inlet2.JPG are fine to submit but *inlet.JPG and *inlet copy.JPG may not be. Not sure how perfect fpr_photo_qa_df yet either. ha

All FYI here but - The excel submission spreadsheet validation system (see PSCIS user guide methods) might catch it but it is common for it to miss things like that and then the actual PSCIS FTP upload system runs sanity checks in 14th century street latin so is commonly impossible to understand.

lucy-schick commented 4 months ago

fpr_photo_qa_df is not catching this duplicate because it looks like fpr_photo_qa is not returning a list when it should be since there are 2 inlet photos (see screenshot).

I think this is happening because this line in fpr_photo_qa

stringr::str_subset(., '_barrel\\.|_outlet\\.|_upstream\\.|_downstream\\.|_road\\.|_inlet\\.') %>%

is only returning photos that contain the _reserved name ending with a . (example _intlet.) and since the copy photo is_inlet copy it doesn't grab it and therefore won't return a list.

Just tried removing \\. so that it returns photos with any ending and it does include the copy photo but got some other errors. Let me know if you want me to dig into this a bit more.

stringr::str_subset(., '_barrel |_outlet |_upstream |_downstream |_road |_inlet') %>%

Removed the copy photo from the directory to fix for the time being.

Screen Shot 2024-02-29 at 2 15 06 PM

lucy-schick commented 3 months ago

closing in favour of https://github.com/NewGraphEnvironment/fpr/issues/61