Skip to content

Fix confusing variable names in collection example docs - #149

Open
777arc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-collection-example-confusion
Open

Fix confusing variable names in collection example docs#149
777arc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-collection-example-confusion

Conversation

CopilotAI commented Apr 29, 2026

Copy link
Copy Markdown

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
  • Movedget_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) forstreaminstreams]
# After (in loading block — shows practical usage)all_sigmffiles= [collection.get_SigMFFile(stream_name=stream_name)
forstream_nameincollection.get_stream_names()]

CopilotAI linked an issue Apr 29, 2026 that may be closed by this pull request
CopilotAI changed the title [WIP] Fix confusing example in collection READMEFix confusing variable names in collection example docsApr 29, 2026
CopilotAI requested a review from 777arcApril 29, 2026 22:12
@777arc
777arc requested a review from CopilotApril 29, 2026 22:13
@777arc
777arc marked this pull request as ready for review April 29, 2026 22:14

CopilotAI left a comment

Copy link
Copy Markdown

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 threaddocs/source/advanced.rst
@Teque5

Copy link
Copy Markdown
Collaborator

Someone who uses collections should review this PR. I don't.

  • Someone needs to run blacken-docs docs/source/*.rst to ensure the python formatting is made correct.

Sign up for freeto 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

4 participants

@Teque5@777arc