Closed mtilda closed 1 year ago
The method camera_abbreviations on line 57 of app/models/perseverance_scraper.rb is unused and lacking RSpec coverage.
camera_abbreviations
app/models/perseverance_scraper.rb
def camera_abbreviations { erucam: "EDL_RUCAM", erdcam: "EDL_RDCAM", edocam: "EDL_DDCAM", epu1cam: "EDL_PUCAM1", epu2cam: "EDL_PUCAM2", navlcam: "NAVCAM_LEFT", navrcam: "NAVCAM_RIGHT", mczlcam: "MCZ_LEFT", mczrcam: "MCZ_RIGHT", fhlacam: "FRONT_HAZCAM_LEFT_A", fhracam: "FRONT_HAZCAM_RIGHT_A", fhlbcam: "FRONT_HAZCAM_LEFT_B", fhrbcam: "FRONT_HAZCAM_RIGHT_B", rhlcam: "REAR_HAZCAM_LEFT", rhrcam: "REAR_HAZCAM_RIGHT", skycam: "SKYCAM", watson: "SHERLOC_WATSON" } end
It looks like it would have been used to lookup valid camera abbreviations during scraping, but that logic has been replaced by
rover.cameras.find_by(name: camera_name) || camera_name
on line 81.
There are performance advantages to avoiding an SQL lookup, which could make the scraper faster... @chrisccerami let me know what you want me to do with this. Implement it or trash it?
This issue is closely related to #149
The method
camera_abbreviations
on line 57 ofapp/models/perseverance_scraper.rb
is unused and lacking RSpec coverage.It looks like it would have been used to lookup valid camera abbreviations during scraping, but that logic has been replaced by
on line 81.
There are performance advantages to avoiding an SQL lookup, which could make the scraper faster... @chrisccerami let me know what you want me to do with this. Implement it or trash it?