CalCOFI / OceanView

App that can incentivize ocean users to report their observations
1 stars 0 forks source link

Timeout check and null return value check for image and text search #26

Closed mfrants closed 1 year ago

mfrants commented 1 year ago

Hi Chieh

I've added time outs for both types of searches on the uploads page. The one for text search was fairly straightforward, because it uses a Future, but the one for image search was tricky because it uses a MultiPartRequest, and I couldn't find a clean way to handle a timeout for that. I finally got something to work, but it's pretty kludgy. If you come up with a better method, feel free to change it.

I've found that the best way to test this is to set the timeout duration to something really small, like 5 milliseconds, and try a search.

hundredball commented 1 year ago

Hi Marina, thank you for making these changes. I think your solution for image search is good enough for now. As I tested, it worked well. However, I did encounter some issues in Text search.

mfrants commented 1 year ago

Hi Chieh

Thanks for looking at this. Can you tell me what you did to get these errors in text search (what you typed in to get "not found", how you got the error with the back button)? I'll take a look.

Marina Frants Information Manager, CCE-LTER and CalCOFI Scripps Institution of Oceanography @.***

On Mon, Apr 10, 2023 at 11:27 PM Chieh Hsu @.***> wrote:

Hi Marina, thank you for making these changes. I think your solution for image search is good enough for now. As I tested, it worked well. However, I did encounter some issues in Text search.

  • Even though the results are found and printed on terminal, not found is still shown.
  • Pressing the back button in AphiaParseDemo occurs error

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/26*issuecomment-1502751875__;Iw!!Mih3wA!E8VuixP7_NijHxKgr4RZ9mlPW7EAqMBHKN8qqwfWhfA28jqwlbJ0laDol3c79W8Ay-novzZlw21QRZGvw60jvgix$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWVNUQC7GP4N3O2AOCDXAT2WRANCNFSM6AAAAAAWZOC2HI__;!!Mih3wA!E8VuixP7_NijHxKgr4RZ9mlPW7EAqMBHKN8qqwfWhfA28jqwlbJ0laDol3c79W8Ay-novzZlw21QRZGvw5H7e3Qe$ . You are receiving this because you authored the thread.Message ID: @.***>

hundredball commented 1 year ago

I typed cat and in the terminal, it actually found some results but showed not found on the emulator.

hundredball commented 1 year ago

Text search for cat returned suggestions on terminal but not found on emulator

Screen Shot 2023-04-11 at 5 54 44 PM

Pressing back button incurs error of null value

Screen Shot 2023-04-11 at 5 55 06 PM
hundredball commented 1 year ago

Hi @mfrants, I hope you are doing well recently, could you check these two PRs when you have time?

mfrants commented 1 year ago

Hi Chieh

I’ll try to get to it on Monday or Tuesday.

Marina Frants (she/her/hers) Information Manager, CCE-LTER/CalCOFI Scripps Institution of Oceanography, La Jolla, CA @.***

On Apr 20, 2023, at 7:30 AM, Chieh Hsu @.***> wrote:

Hi @mfrants https://urldefense.com/v3/__https://github.com/mfrants__;!!Mih3wA!FYX1IQ4Ou6WDFl8wB8XHelRkRFxIbtcJZ6kO04WLwFSL-r6zefp-uaVhlTJidwlRJh9DTXgNuVgaKJqM6UeMRd_S$, I hope you are doing well recently, could you check these two PRs when you have time?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/26*issuecomment-1516435647__;Iw!!Mih3wA!FYX1IQ4Ou6WDFl8wB8XHelRkRFxIbtcJZ6kO04WLwFSL-r6zefp-uaVhlTJidwlRJh9DTXgNuVgaKJqM6ZSVDuzt$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWRBFLNOWCQKE3CPUQLXCFB7VANCNFSM6AAAAAAWZOC2HI__;!!Mih3wA!FYX1IQ4Ou6WDFl8wB8XHelRkRFxIbtcJZ6kO04WLwFSL-r6zefp-uaVhlTJidwlRJh9DTXgNuVgaKJqM6RiJ_UcB$. You are receiving this because you were mentioned.

mfrants commented 1 year ago

Hi Chieh

I just pushed a fix for this.

Marina Frants Information Manager, CCE-LTER and CalCOFI Scripps Institution of Oceanography @.***

On Tue, Apr 11, 2023 at 5:57 PM Chieh Hsu @.***> wrote:

Text search for cat returned suggestions on terminal but not found on emulator

[image: Screen Shot 2023-04-11 at 5 54 44 PM] https://urldefense.com/v3/__https://user-images.githubusercontent.com/21293342/231319879-87e162d4-3f0b-4d7a-a41f-d9d1e6199c1a.png__;!!Mih3wA!Fd5xpuxAYXDZVLAN7uSmGNucTbMJUGUW3-3ZuYlfQqSDUcu5s_ZHFLJiLJ0HgPyI9LjdFNJHPqLRsXoU5bZMD0C0$ Pressing back button incurs error of null value

[image: Screen Shot 2023-04-11 at 5 55 06 PM] https://urldefense.com/v3/__https://user-images.githubusercontent.com/21293342/231319943-804d95bd-513f-4abe-be13-4b314059577f.png__;!!Mih3wA!Fd5xpuxAYXDZVLAN7uSmGNucTbMJUGUW3-3ZuYlfQqSDUcu5s_ZHFLJiLJ0HgPyI9LjdFNJHPqLRsXoU5e8uWMIA$

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/26*issuecomment-1504357501__;Iw!!Mih3wA!Fd5xpuxAYXDZVLAN7uSmGNucTbMJUGUW3-3ZuYlfQqSDUcu5s_ZHFLJiLJ0HgPyI9LjdFNJHPqLRsXoU5YwZUg48$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWWPTPFJNAUI5RTT2TDXAX4ZDANCNFSM6AAAAAAWZOC2HI__;!!Mih3wA!Fd5xpuxAYXDZVLAN7uSmGNucTbMJUGUW3-3ZuYlfQqSDUcu5s_ZHFLJiLJ0HgPyI9LjdFNJHPqLRsXoU5ZvRkxR0$ . You are receiving this because you authored the thread.Message ID: @.***>

hundredball commented 1 year ago

Thanks, Marina! This fix works for me as well. I also did a small change to fix the back button on the text search page. If you don't mind, I can also push it to this branch.

mfrants commented 1 year ago

Hi Chieh

Yes, please go ahead and push.

Marina Frants Information Manager, CCE-LTER and CalCOFI Scripps Institution of Oceanography @.***

On Mon, Apr 24, 2023 at 11:17 PM Chieh Hsu @.***> wrote:

Thanks, Marina! This fix works for me as well. I also did a small change to fix the back button on the text search page. If you don't mind, I can also push it to this branch.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/26*issuecomment-1521210149__;Iw!!Mih3wA!DtTL_hdWBCBNS_lE7HzgK1UbqZVAbtxXMsBCTMO3UdS0PsFvSFIOI271cJubmK5mXKr-MVswjD8xTKhp8acFvPgw$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWRQGQDRP3ORLA33CY3XC5UARANCNFSM6AAAAAAWZOC2HI__;!!Mih3wA!DtTL_hdWBCBNS_lE7HzgK1UbqZVAbtxXMsBCTMO3UdS0PsFvSFIOI271cJubmK5mXKr-MVswjD8xTKhp8e8nnQnE$ . You are receiving this because you were mentioned.Message ID: @.***>

hundredball commented 1 year ago

Hi @mfrants, I just pushed the fix for it. If that also works for you, you can merge this PR. I thought we would still have a meeting today. Do you have any topics that would like to hand over to me before your trips?

mfrants commented 1 year ago

Hi Chieh

Sorry, I got into zoom a few minutes late. I can talk now if you want, but actually I think we're in good shape, so unless there's anything you want to go over, we can skip the meeting tonight.

Marina Frants Information Manager, CCE-LTER and CalCOFI Scripps Institution of Oceanography @.***

On Tue, Apr 25, 2023 at 5:39 PM Chieh Hsu @.***> wrote:

Hi @mfrants https://urldefense.com/v3/__https://github.com/mfrants__;!!Mih3wA!DxlcTQmYK_li8Dtzz9T_SV5-l-Cg_WH4XPCFyvsr4ZJfdWyt5IZzLsWYdEfVbBhmb9HoIYK7CX87QmVquWMO92yX$, I just pushed the fix for it. If that also works for you, you can merge this PR. I thought we would still have a meeting today. Do you have any topics that would like to hand over to me before your trips?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/CalCOFI/OceanView/pull/26*issuecomment-1522597829__;Iw!!Mih3wA!DxlcTQmYK_li8Dtzz9T_SV5-l-Cg_WH4XPCFyvsr4ZJfdWyt5IZzLsWYdEfVbBhmb9HoIYK7CX87QmVquQlEYaCz$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AV6LPWRQZYGTQKCMHK7KB3TXDBVD5ANCNFSM6AAAAAAWZOC2HI__;!!Mih3wA!DxlcTQmYK_li8Dtzz9T_SV5-l-Cg_WH4XPCFyvsr4ZJfdWyt5IZzLsWYdEfVbBhmb9HoIYK7CX87QmVquXYMAV2t$ . You are receiving this because you were mentioned.Message ID: @.***>