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

Access to process name during initialization for all AbstractProcess children #804

Open
ngr-francesco opened this issue Oct 24, 2023 · 2 comments
Assignees
Labels
1-feature New feature request

Comments

@ngr-francesco
Copy link

ngr-francesco commented Oct 24, 2023

User story

I am currently working on the Brian2Lava project to bring together the UX of Brian with the backend of Lava. For debugging purposes we name every process we create with the same naming convention used in Brian. While implementing a new feature which requires the initialization of a RingBuffer, I noticed that the RingBuffer __init__ method does not accept a name argument. I suspect this might be the case for other AbstractProcesses , too.
At the same time by printing ring_buffer.name returns a name using the convention Process_N, which implies that as expected the attribute is present, but the user is simply not allowed to set it at initialization.
Even though a workaround is easily implemented, I believe adding this feature should be relatively straightforward, and it would be useful for our team.
As a separate small question/comment, why are there two versions of RingBuffer (in the io.source and io.sink modules) with different use cases and not two classes with different names, since they have different jobs?

Conditions of satisfaction

  • All children of AbstractProcess (unless a special exception applies) can be initialized with a name argument.

Acceptance tests

  • A simple initialization with this argument should be sufficient to test its functionality
@ngr-francesco ngr-francesco added the 1-feature New feature request label Oct 24, 2023
@github-actions github-actions bot added the 0-needs-review For all new issues label Oct 24, 2023
@PhilippPlank PhilippPlank removed the 0-needs-review For all new issues label Nov 14, 2023
@PhilippPlank
Copy link
Contributor

Thank you for pointing that inconsistencies out. I guess nothing speaks against adding a name parameter to the RingBuffer and setting it for the AbstractProcess which always has it anyways.
If you want that feature, feel free to start a PR.

@ngr-francesco
Copy link
Author

Okay, I'll get to it in the next days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature New feature request
Projects
None yet
Development

No branches or pull requests

3 participants