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

Return documented things in channel_code_parts and don't throw errors #8

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

anowacki
Copy link
Owner

Previously, channel_code_parts's returned elements of a channel code
as nothing if they were empty in a miniSEED code string, or if the
format was not as expected. However, the docstring actually stated they
would be 'empty', meaning empty strings. Update the behaviour to match
that documented.

At the same time, also stop erroring when encountering a channel code
which for any reason does not fit the expected formats. This is much
preferable because otherwise it is impossible to get the string out
of LibMseed.

@anowacki anowacki force-pushed the channel-code-parts-warning branch from d164e30 to df55731 Compare February 22, 2024 17:00
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.07%. Comparing base (cda0fcc) to head (b396060).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   87.94%   88.07%   +0.12%     
==========================================
  Files           7        7              
  Lines         282      285       +3     
==========================================
+ Hits          248      251       +3     
  Misses         34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Previously, `channel_code_parts`'s returned elements of a channel code
as `nothing` if they were empty in a miniSEED code string, or if the
format was not as expected.  However, the docstring actually stated they
would be 'empty', meaning empty strings.  Update the behaviour to match
that documented.

At the same time, also stop erroring when encountering a channel code
which for any reason does not fit the expected formats.  This is much
preferable because otherwise it is impossible to get the string out
of LibMseed.
Make sure that we test the path taken when a miniSEED id starts
with "XFDSN:" or "FDSN:" but is empty otherwise.
@anowacki anowacki force-pushed the channel-code-parts-warning branch from df55731 to b396060 Compare February 26, 2024 09:41
@anowacki anowacki merged commit 4ec945f into main Feb 26, 2024
13 checks passed
@anowacki anowacki deleted the channel-code-parts-warning branch February 26, 2024 10:11
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.

1 participant