Skip to content

Fix confusing variable names in collection example docs#149

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-collection-example-confusion
Open

Fix confusing variable names in collection example docs#149
Copilot wants to merge 2 commits intomainfrom
copilot/fix-collection-example-confusion

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 29, 2026

The collection creation example shadowed the imported sigmf module by reusing it as a variable name, and created streams/sigmf variables that were never used. The get_stream_names() call was also isolated from any meaningful context.

Changes

  • Removed the unused streams and sigmf assignments from the collection creation block
  • Moved get_stream_names() usage into the loading example, where it's more illustrative
  • Renamed the list comprehension variable to all_sigmffiles with explicit stream_name= kwarg
# Before (in creation block — unused and shadows import)
streams = collection.get_stream_names()
sigmf = [collection.get_SigMFFile(stream) for stream in streams]

# After (in loading block — shows practical usage)
all_sigmffiles = [collection.get_SigMFFile(stream_name=stream_name)
                  for stream_name in collection.get_stream_names()]

Copilot AI linked an issue Apr 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix confusing example in collection README Fix confusing variable names in collection example docs Apr 29, 2026
Copilot AI requested a review from 777arc April 29, 2026 22:12
@777arc 777arc requested a review from Copilot April 29, 2026 22:13
@777arc 777arc marked this pull request as ready for review April 29, 2026 22:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the advanced documentation’s SigMF Collection example to avoid shadowing the sigmf module and to place stream enumeration in a more relevant “loading” context.

Changes:

  • Removed unused streams / sigmf assignments from the collection creation example.
  • Added an example that enumerates stream names and loads all streams’ SigMFFile objects when loading a collection.
  • Updated the get_SigMFFile call to use the explicit stream_name= keyword in the new comprehension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/source/advanced.rst
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.

Collection example is confusing

3 participants