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

JSON generator #7

Merged
merged 11 commits into from
Mar 2, 2024
Merged

JSON generator #7

merged 11 commits into from
Mar 2, 2024

Conversation

danellecline
Copy link
Collaborator

This adds a new feature to generate JSON metadata from Soundtrap, IcListen, and NRS audio files.

Some examples:

NRS
python src/main_json_generator.py --json-base-dir=test/json/nrs --output=output --uri=gs://noaa-passive-bioacoustic/nrs/audio/11/nrs_11_2019-2021/audio --prefix=NRS11 --start=20191024 --end=20191101 --recorder=NRS

SOUNDTRAP

python src/main_json_generator.py --json-base-dir=test/json/soundtrap --output=output --uri=s3://pacific-sound-ch01 --prefix=7000 --start=20230718 --end=20230719 --recorder=SOUNDTRAP

ICLISTEN
python src/main_json_generator.py --json-base-dir=test/json/iclisten --output=output --uri=s3://pacific-sound-256khz --prefix=MARS --start=20230718 --end=20230719 --recorder=ICLISTEN

@danellecline danellecline linked an issue Feb 29, 2024 that may be closed by this pull request
@carueda
Copy link
Member

carueda commented Feb 29, 2024

@danellecline Can you please re-sync your branch? I pulled it and then noted it is behind a few commits in "main".

msg = f'Could not get account number from AWS. Check your config.ini file. ' \
f'Account number is not set in the config.ini file and AWS credentials are not configured.'
print(msg)
return None
Copy link
Member

Choose a reason for hiding this comment

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

Can you change the return type to accommodate possible None ?


@pytest.mark.skipif(not AWS_AVAILABLE,
reason="This test is excluded because it requires a valid AWS account")
def test_soundtrap_json_generator():
Copy link
Member

Choose a reason for hiding this comment

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

This test is failing for me locally. Though I do have stuff under my ~/.aws perhaps my credentials have expired. To move on quickly, I renamed that dir to something else and now this test is skipped (which is good).

@carueda carueda merged commit 4836d0e into main Mar 2, 2024
2 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.

Add JSON generation
2 participants