Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iNat Import #2150

Draft
wants to merge 219 commits into
base: main
Choose a base branch
from
Draft

iNat Import #2150

wants to merge 219 commits into from

Conversation

JoeCohen
Copy link
Member

Import iNat observation(s) to MO

JoeCohen and others added 30 commits March 25, 2024 06:12
- Generates and corrects skeleton files for controller, test, and helper
- Adds empty template (with just a submit button)
- Adds some translation symbols
- Adds labeled field for inputting iNat ids
- Styles submit button
- Adds test
- simplifies test_new
- adds simple test_create
- Uses strings instead of arrays for text_field.
- Fixes bug in preceding push
- Adds link to new iNat import on Create Observation page
- Modifies tests, views, and helpers accordingly
- Revises tests, including addtional tests
- Refactors controller
- Adds comment to form
- Add "public" to filename
- Format the json files for easier reading
- Modify inats pseudo fixture
- Call iNat API via HTTParty
- Change test to use fixture & stub call to iNat API
- Extracts methods
- removes some comments
- Pass string to ImportedInatObs and convert to json there
- Make corresponding changes in InatImportsController
- define `ImportedInatObs#obs` and `#when`
- Add test assertion for `when`
JoeCohen and others added 21 commits July 13, 2024 18:02
- Extracts method
- eliminates a local variable
- Initializes it equal to params[:inat_ids]
- Fixes how `auth` converts that to an array of integers.
- Simplifies validation of params[:inat_ids]
Also rearranges InatImportController private methods to group them near the appropriate action.
- Change code to `MockCode` for clarity
- Adjust `Content-Length` accordingly
- Prevents master credentials from appearing in error messages
- Improves InatImportsController coverage by creating an Obs and running assertions on the Obs
-  Simulates iNat redirect to #auth
  - Sets`InatImport` and `code` to what they would be if redirected from iNat authorization
- stubs token request
- c
- Cover half of previous uncovered lines
- Tests importing an Obs that has photos
- Tests other parts of of import
- Improves coverage
- Tests importing a sequence
- Proves that we can't import a forbidden taxon
 - renames action from `auth` to `authenticate` to avoid confusion with "authorize"
 - Add comments explaining workflow and use of INatImport model
@JoeCohen JoeCohen added the iNat interaction with iNat label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iNat interaction with iNat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iNat import
4 participants