-
Notifications
You must be signed in to change notification settings - Fork 26
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
JoeCohen
wants to merge
219
commits into
main
Choose a base branch
from
jdc-1955-inat-import
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
iNat Import #2150
+3,999
−44
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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
…erver/mushroom-observer into jdc-1955-inat-import
- 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
- response is an
- Pass string to ImportedInatObs and convert to json there - Make corresponding changes in InatImportsController - define `ImportedInatObs#obs` and `#when` - Add test assertion for `when`
- 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.
…erver/mushroom-observer into jdc-1955-inat-import
- Change code to `MockCode` for clarity - Adjust `Content-Length` accordingly
- Prevents master credentials from appearing in error messages
Remove test credentials and fix test
- 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
- fixes headers - uses RestClient instead of Httparty See https://www.inaturalist.org/pages/api+reference#authorization_code_flow
- Maps their "licenses" to the narrowest available MO license
- == smallest existing bounding MO Location
…bserver into jdc-1955-inat-import
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Import iNat observation(s) to MO