Description
Import using the importing User's MO API key
- Search iNatImportJob for uses of iNat manager's API Key
- Add assertions to iNatImportJobTest, maybe InatImportControllerTest
- In InatImport find or create API Key for the user
- Fix places in INatImportJob which used webmaster key
- Will this enable greater use of MO API
- Create obs?
- add images?
- Understand/Fix inability to use in background in dev mode
- Suggested Manual test
- Fix stubbing of PhotoImporter
- Understand possibly fix Double license of image. Might be for another PR
- Review the Remove env.test? dependency #2890 conditional on
imported_img.original_name
and figure out what I really want. Maybe use another user, maybe not have that assert, maybe something else. - Merge Remove env.test? dependency #2890 into User specific iNat Import API Key #2851
- dry @default_user, @user: I don't think I need both
- Investigate different photo sources "two different places that the stored iNat responses expect their images to come from (https://inaturalist-open-data.s3.amazonaws.com/photos and https://static.inaturalist.org/photos/). Not sure why"
- Can I use single source like https://www.inaturalist.org/photos/106145205?size=original. NO. That url is the iNat page for the photo.
- create a photo stubber which can handle both CC-licensed & All Rights Reserved photos.
- Shorten
.sub
args inapp/classes/inat/obs_photo.rb
url
- call revised photo stubber (implicitly or explictly) in all tests
- run
import_job_obs_with_one_photo
on its own - Review Remove env.test? dependency #2890 stubs of Inat::PhotoImporter.stub and see if you can replace them with lower level stubs to the iNat get calls. I think this will conceptually at least simplify things and it is a better place to do the stubbing.
- Look at refactoring the iNat get calls into one or two helpful functions. You have started down this road with stub_inat_photo_requests, but there seem to be two different places that the stored iNat responses expect their images to come from (https://inaturalist-open-data.s3.amazonaws.com/photos and https://static.inaturalist.org/photos/). Not sure why, but it's what I observed while working on the tests.
- RuboCop
- Manual test
- PR ready for review
Metadata
Metadata
Assignees
Labels
No labels