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

Scaffold Sound and Conveyance #4169

Open
wants to merge 72 commits into
base: development
Choose a base branch
from
Open

Scaffold Sound and Conveyance #4169

wants to merge 72 commits into from

Conversation

mjy
Copy link
Member

@mjy mjy commented Jan 16, 2025

Sound branch. For test purposes only.

@kleintom
Copy link
Contributor

Very neat, I'm really looking forward to seeing what unexpected sounds get added! I'm sure you're probably aware of some of these already, but for what it's worth:

General

  • The combination of:
    • Sound autocomplete doesn't search on filename, and
    • when you create a sound from an annotator, you can't set a name

means that currently you can't autocomplete on sounds created from annotators (without first setting the name by some other means), which was unexpected.
If name remains unrequired for sounds, does it perhaps make sense to be able to filter on filename in addition to name?

500s

  • Select edit in the header bar from conveyances/1 or from a conveyances radial navigator
  • conveyances/list (select 'list' from /conveyances)
  • select 'related' from a sound navigator
  • from filter sounds, choose 'confidence' and select a confidence from either of the batch annotators (works fine on individual sound annotators)
  • add a sound row to a matrix (I presume that's what triggers this), then choose 'interactive key' from the matrix navigator

Conveyances in radial annotators

  • Is it intended that more than one conveyance can use the same sound file? Currently I don't see how to do that: you can only select a new file when creating a conveyance from annotators.
  • Deleting conveyances from the radial updates the ui but doesn't actually do the delete (when you reload they're back)
  • In edit/move_to there's a 'taxon name' option (which fails) - should that be field occurrence instead?

Collecting events

In gitter you mentioned annotating collecting events with sounds, but I'm not seeing how, there's no conveyances option in annotators (CE also doesn't show up as a 'move to' option).

Filter sounds

  • add filter for blank name?

Browse sound

  • Should the sound_id query param be set on selection from search box? Possibly related:
    • If I search for a sound from the Browse Sounds search box, its conveyances don't get loaded - I have to go to a different page and select 'Browse sounds' from the navigator radial for that sound to see the conveyances in browse
    • If I search for one sound and load it, then search for a different sound and load it, the sound doesn't update.
  • add a sound navigator radial in addition to the annotator?
  • would it be helpful for conveyance objects displayed in the Conveyances panel to link to their object or have radials?

Matrices (cool that adding this was so easy!)

  • Add a sound row: the green edit circle is a broken link

@kleintom
Copy link
Contributor

I'm getting a 500 on anything that hits views/sounds/_attributes.json.jbuilder (I think) for at least some sounds - here's one from my local install:

(byebug) json.attributes!
{"id"=>2, "name"=>"birb", "project_id"=>13, "created_by_id"=>154, "updated_by_id"=>154, "sound_file"=>"/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--5b250f1a27426170a79c68337f1727cb88fa417f/birds-chirping-ambiance-26052.mp3", "created_at"=>Mon, 10 Mar 2025 23:17:40.584877000 UTC +00:00, "updated_at"=>Mon, 10 Mar 2025 23:17:40.588873000 UTC +00:00, "object_tag"=>"birb: birds-chirping-ambiance-26052.mp3", "object_label"=>"birb", "global_id"=>"gid://taxon-works/Sound/2", "base_class"=>"Sound", "url_for"=>"http://localhost:3000/sounds/2.json", "object_url"=>"/sounds/2", "is_a?"=>String, "metadata"=>{"file_size"=>383040, "mpeg_frame_header"=>{"header"=>"11111111111100111110010001100100", "position"=>0, "version"=>"MPEG2", "layer"=>"layer3", "frame_bitrate"=>160, "channel_mode"=>"Joint Stereo", "sample_rate"=>24000}, "xing_header"=>{"id"=>"\xF9\ed\x12", "flags"=>4062022688}, "vbri_header"=>{"id"=>"\xD9\xC9\x80\x10", "bytes_count"=>495166599, "frames_count"=>2066743296}, "bitrate"=>160, "duration"=>19.152}}

where the "xing_header"=>{"id"=>"\xF9\ed\x12", "flags"=>4062022688} bit is throwing an exception in converting that sound to JSON since \xF9 isn't legal utf-8, or something along those lines.
https://sandcastle.taxonworks.org/tasks/sounds/browse?sound_id=20 in Aphid project does it for me there.
The rest of this was tested locally with the metadata part of _attributes faked, so possibly some issues below are a reflection of that rather than real issues.

Other 500s

  • In filter sounds, do a batch protocol update, get a 500 with 'Could not find the inverse association for protocol_relationship_object ("protocol_relationships" in Sound)'
  • In Edit Matrices, add a sound row, then go to the navigator for that matrix and click 'Interactive key' --> 500

Updates for conveyances on CE

  • Browse CE doesn't show conveyances (does show depictions)
  • conveyances/1/edit doesn't offer a CE option
  • in filter sounds, CE facet and CE as a conveyance-type option are missing

Other issues

  • if I update conveyance name in annotator and click on conveyance update (instead of name update), should name get updated? It isn't currently.
    image
  • Browse FO doesn't have a sounds section
  • conveyances/1 navigator-->New errors
  • in edit Matrix, could add Sounds to the Keyword tab of the Rows selector (I think):
    image
  • in filter sounds, all of the batch radials next to the filter button are always(?) disabled
  • add 'filter sounds' to the hub filter category, 'browse sounds' to the browse category
  • the first time I open an existing conveyance in a radial, NaNs:
    image
  • I don't see how to edit that region

@kleintom
Copy link
Contributor

In matrix edit, the pinboard tab for new rows doesn't show pinned sounds:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants