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

Collection example is confusing #63

Open
daniestevez opened this issue Jul 13, 2024 · 0 comments
Open

Collection example is confusing #63

daniestevez opened this issue Jul 13, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@daniestevez
Copy link

I was looking at the example about how to create a collection in the README and was confused by the following lines:

streams = collection.get_stream_names()
sigmf = [collection.get_SigMFFile(stream) for stream in streams]

The second line overwrites the sigmf identifier (which is how the Python module has been imported), which is not a great idea. This variable sigmf and also streams are not used later on, so it's not too clear why they are created. Given that the next example is how to load a SigMF collection, probably the collection.get_stream_names() call could be moved there to show how it's possible to list the files in the collection. Maybe even something like:

all_sigmffiles = [collection.get_SigMFFile(stream_name=stream_name)
                             for stream_name in collection.get_stream_names()]
@Teque5 Teque5 added the documentation Improvements or additions to documentation label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants