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

[BBPBGLIB-1110] Error now raised when executeConfigure is returned with errors #120

Merged
merged 4 commits into from
Feb 13, 2024

Conversation

atemerev
Copy link
Contributor

@atemerev atemerev commented Feb 5, 2024

Context

In the simulation config, synapse_configure contains HOC code. Neurodamus should fail fast when there is an error in configuration, instead of passing it forward.

Scope

Error check is added to connection.py

Testing

TBD

Review

  • PR description is complete
  • Coding style (imports, function length, New functions, classes or files) are good
  • Unit/Scientific test added
  • [N/A] Updated Readme, in-code, developer documentation

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@atemerev atemerev changed the title BBPBGLIB-1110: Error now raised when executeConfigure is returned with errors [BBPBGLIB-1110] Error now raised when executeConfigure is returned with errors Feb 6, 2024
@bbpbuildbot

This comment has been minimized.

@atemerev atemerev requested a review from WeinaJi February 6, 2024 11:03
@atemerev atemerev marked this pull request as ready for review February 6, 2024 11:06
neurodamus/connection.py Outdated Show resolved Hide resolved
@jorblancoa
Copy link
Collaborator

Thanks for the PR!
Maybe this could be tackled in another PR, but since we are cleaning .hoc files whenever possible, maybe the ConnectionUtils.hoc could be removed and the executeConfigure() function ported to python.
At first glance it doesn't seem to be complicated. The only problematic call would be execute1(), and we could use Nd.execute1() from python.

What do you think? @WeinaJi

@WeinaJi
Copy link
Collaborator

WeinaJi commented Feb 6, 2024

Thanks for the PR! Maybe this could be tackled in another PR, but since we are cleaning .hoc files whenever possible, maybe the ConnectionUtils.hoc could be removed and the executeConfigure() function ported to python. At first glance it doesn't seem to be complicated. The only problematic call would be execute1(), and we could use Nd.execute1() from python.

What do you think? @WeinaJi

Yes, sounds good. There is already an example in https://github.com/BlueBrain/neurodamus/blob/main/neurodamus/node.py#L1152
Shall we add this python function directly in connection.py?

@jorblancoa
Copy link
Collaborator

Thanks for the PR! Maybe this could be tackled in another PR, but since we are cleaning .hoc files whenever possible, maybe the ConnectionUtils.hoc could be removed and the executeConfigure() function ported to python. At first glance it doesn't seem to be complicated. The only problematic call would be execute1(), and we could use Nd.execute1() from python.
What do you think? @WeinaJi

Yes, sounds good. There is already an example in https://github.com/BlueBrain/neurodamus/blob/main/neurodamus/node.py#L1152 Shall we add this python function directly in connection.py?

I think it makes sense yes

@atemerev
Copy link
Contributor Author

atemerev commented Feb 7, 2024

Thanks for the PR! Maybe this could be tackled in another PR, but since we are cleaning .hoc files whenever possible, maybe the ConnectionUtils.hoc could be removed and the executeConfigure() function ported to python. At first glance it doesn't seem to be complicated. The only problematic call would be execute1(), and we could use Nd.execute1() from python.
What do you think? @WeinaJi

Yes, sounds good. There is already an example in https://github.com/BlueBrain/neurodamus/blob/main/neurodamus/node.py#L1152 Shall we add this python function directly in connection.py?

I think it makes sense yes

OK, so, what's the resolution? I'll delete this PR and try to work on the python port instead?

@WeinaJi
Copy link
Collaborator

WeinaJi commented Feb 7, 2024

How about continuing in the same PR to convert ConnectionUtils.hoc to Python function? You can modify the PR title and description.

@jorblancoa
Copy link
Collaborator

After speaking with @ferdonline, he mentioned that porting this to python would be harder than I anticipated, so we can leave it for another time!
@atemerev Forget my last comment! I think we can merge this

@atemerev
Copy link
Contributor Author

@jorblancoa OK, let's merge then!

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot
Copy link

@atemerev atemerev merged commit 18b63e0 into main Feb 13, 2024
3 checks passed
@atemerev atemerev deleted the atemerev/hoc-config-error branch February 13, 2024 07:39
atemerev added a commit that referenced this pull request Feb 13, 2024
…th errors (#120)

## Context

In the simulation config, synapse_configure contains HOC code.
Neurodamus should fail fast when there is an error in configuration,
instead of passing it forward.

## Scope

Error check is added to connection.py

## Testing

TBD

## Review
* [X] PR description is complete
* [X] Coding style (imports, function length, New functions, classes or
files) are good
* [x] Unit/Scientific test added
* [N/A] Updated Readme, in-code, developer documentation
WeinaJi pushed a commit that referenced this pull request Oct 14, 2024
…th errors (#120)

## Context

In the simulation config, synapse_configure contains HOC code.
Neurodamus should fail fast when there is an error in configuration,
instead of passing it forward.

## Scope

Error check is added to connection.py

## Testing

TBD

## Review
* [X] PR description is complete
* [X] Coding style (imports, function length, New functions, classes or
files) are good
* [x] Unit/Scientific test added
* [N/A] Updated Readme, in-code, developer documentation
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.

4 participants