Skip to content

Conversation

@BryonLewis
Copy link
Collaborator

Creates a new management command that allows for bulk importing WAV files.

  • Restructures the guano metadata calculation into a utility function so it can be used multiple places
  • Adds the filename fallback calculation (this was on the client side if the guano metadata didn't return proper data
  • Creates an importRecordings management command that will take a folder of WAV files and create recordings and convert them to spectrograms.
    • Allows for setting ownership to a specific user
    • Can set to be public
    • Also allowed to limit the number of imports
  • Updates the Readme to include documentation about the new command, including how to bind mount data when running so import inside of the docker container

@BryonLewis BryonLewis marked this pull request as ready for review December 11, 2025 15:39
@BryonLewis BryonLewis requested a review from naglepuff December 11, 2025 15:39
Copy link
Collaborator

@naglepuff naglepuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and works great in docker. Natively it doesn't seem to work (perhaps due to the version of python being used to run it?) without the suggestion regarding matplotlib. I'm fine if this gets merged as-is. Comments here are generally just minor suggestions.

label_name = match.group(2)
date_str = match.group(3)
timestamp_str = match.group(4)
# extra_data = match.group(5) # Not used currently
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there plans to use this in the future? Should we track this with an issue instead of a comment? I can imagine a scenario where this line becomes confusing or raises questions for new developers or us in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove it, it's not data that is needed.

Comment on lines +182 to +186
except Exception as e:
self.stdout.write(
self.style.ERROR(f' Failed to generate spectrogram: {str(e)}')
)
logger.exception('Error generating spectrogram', exc_info=e)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to re-raise so the outer try/except can properly increment failed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update to add it in.

BryonLewis and others added 4 commits December 18, 2025 14:45
Co-authored-by: Michael Nagler <mike.nagler@kitware.com>
Co-authored-by: Michael Nagler <mike.nagler@kitware.com>
Co-authored-by: Michael Nagler <mike.nagler@kitware.com>
@BryonLewis BryonLewis merged commit 60ec1c5 into main Dec 18, 2025
5 checks passed
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.

2 participants