Commit Graph

10 Commits

Author SHA1 Message Date
Johannes Klein
271d0bd856 Add higher rank mode unrestricted to offline suggestions (#2711)
* Use unrestricted commonAncestorRankType for offline predictions from file

* The plugin provides an interface for this

* Fix type error

* Add missing type

* The iconic taxon is no longer part of the predictions result

If we use common ancestor rollup mode the ancestor taxa are no longer included in the result (which in turn are the top 10 species predictions). So, we have to get the iconic taxon name for each result in a different manner.

* Not needed as results are returned with highest score first

* Remove number wrapper

* Update comment

* There is no special offline not-confident criterion

This now returns common ancestor as top ID in case there is none over the threshold. So, same as online.

* No distinction between debug types

* Update ModelPrediction.js

* This is actually redundant

* Offline suggestions need to be sorted same as online

* Should not have removed the export

* Update comments
2025-03-04 16:37:14 +01:00
Kirk van Gorkom
375937bd6b Add common ancestor mode to vision camera plugin mock 2025-03-03 11:02:36 -08:00
Johannes Klein
f84d09648d chore: rename look up location (#2603)
Renames a function call and fixes a NullPointerException on Android
2025-01-09 16:43:54 +01:00
Johannes Klein
feec5567a3 feat: update vision-camera-plugin-inatvision to a version that fully supports the geomodel (#2584)
* Update vision-plugin

* useOfflineSuggestion TS

* Use location for prediction from file

* Remove log

* Use plugin function to lookup location and elevation based on h3 cells

* taxonomyRollupCutoff is now done in the plugin on basis of the tops score for a frame

* Fix wrong commit reference. Now references main branch

* Fix has location check to account for 0.0 locations

* Only prop in lat and long

* Add explanation

* Fix: Import vision-plugin function from wrapper file

* Add jest mock for new plugin function
2025-01-08 16:15:36 +01:00
Amanda Bullington
c6a09a2a8c Refactor to begin simplifying device orientation/rotation code (#2422)
* Refactor useDeviceOrientation to remove extra useEffects

* Rotation code cleanup

* Update mock with useDeviceOrientationChange
2024-11-13 16:24:08 -08:00
Johannes Klein
5c8e3be12c test AI camera in e2e (#2188)
* Add a cameraZoomRange default
* Small detox version bump
* Add a mocked camera with a take photo button
* An e2e mock for the computer vision plugin predicting a frame
* Mock taking a photo by loading the first photo from the CameraRoll

Closes #1981
2024-11-01 10:38:37 -07:00
Amanda Bullington
15382cee35 Integration test for photo import (#2058)
* Write an integration test for PhotoImport; closes #1430

* Add test for photo importer -> group photos -> obs edit flow

* Remove global image-picker mock
2024-09-10 16:26:23 -07:00
Amanda Bullington
cf70a4358a Move modules from jest setup to __mocks__ (#1949)
* Get a few mocks working in __mocks__ folder

* Move more mocks into __mocks__

* Move mocks

* Move zustand mock

* Add more mocks to __mocks__

* More mocks

* Move more files to __mocks__ and audit existing mocks

* Mock react navigation in __mocks__

* Restore test to help with imports after jest env torn down

* Add fake timer to integration test with userEvent

* Add RN paper mock
2024-08-11 11:27:52 -07:00
Amanda Bullington
3536fa15ae Move all RN/JS code under src folder to (hopefully) make things easier to find & edit 2021-11-12 17:10:54 -08:00
Amanda Bullington
ff6789c32c Merge obs list, obs card, and user profile into main (#4)
* Obs detail screen skeleton; move safe area view to wrapper component

* Progress on obs detail

* Get ids and photos from api v2

* Fetch data needed for data tab in obs detail

* Create basic map for data tab, centered on lat/long

* Create linked realms for photos and identifications; access these on obs detail screen

* User Profile and more setup for test suite

* Delete coverage directory

* Add Jest coverage folder to gitignore

* Keep trying to mock out fetch for inatjs in ObsList.test.js

* Rename ObsList.test to match component name
2021-11-04 15:44:57 -07:00