-
Notifications
You must be signed in to change notification settings - Fork 1
CompartmentSets #4
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
Conversation
Pull Request Test Coverage Report for Build 15489697657Details
💛 - Coveralls |
|
I still think this is necessary. I get this error if I try to run the command |
|
looks like the license identifier format has just been updated; so may as well fix that too |
|
|
is this correct? @mgeplf |
I think so?
|
and why leave them in the general h5 folder but circuit_config and simulation_config are not orthogonal? I was grouping by extension (json). In addition, to me nodesets are an optional addition of the configuration. I mean, ususally I find all these files together while the others h5 are in another folder |
It's a generic |
|
you can also see it as: that folder contains all the h5 files from |
|
I don't think it's worth spending this much time over; it's been there since 2021, it doesn't fit under config, so can it just be left in its original place? We're not dealing w/ that many different data files here that a big reorganization is necessary. |
|
@mgeplf I am implementing I was considering a get_compartment_set function. Do we need |
|
So I don't think it's needed. However, what will be needed, I think, is a way to easily extract compartment_set by name from the |
| ~CompartmentSetFilteredIterator(); | ||
|
|
||
| /// Dereference operator. It makes a copy! | ||
| CompartmentLocation operator*() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CompartmentLocation has a unique_ptr to the implementation
Ah, right, we're running into the the pimpl problem.
I think some of this could be simplified if CompartmentLocation was a public Plain Old Data struct, what do you think?
|
@mgeplf somehow I cannot answer to this directly so I will answer here:
That would be a break of encapsulation (that is everywhere in the code): exposing the detail to python and the public api. However, I think Selection is the same. That would work, yes. I am just slightly afraid that the garbage collector may destroy stuff that is used somewhere else. I just have never faced the problem so I do not know how the garbage collector works in detail. Another solution is to use shared_ptr. However, with shared_ptr then I need a vector of shared_ptrs in CompartmentSet which breaks locality |
6ff7760 to
ed789f6
Compare
Which is fine; the contents of
pybind will handle the copy/conversion of the |
ok, I can do that. The only questions/modifications remaining (IMHO) are this and the naming:
do you have an opinion on this? |
done! The code is much simpler now. Sometimes breaking the rules is just simpler than enforcing paradigms |
at -> getCompartmentSet
mgeplf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a lot nicer!
If you can remove the commented code, I think it's good to go.
|
oh I forgot. yes, done |
mgeplf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks a lot!
install -ework (again?) #3API
CompartmentLocation
CompartmentSet
CompartmentSets
Additional changes
3 in Selection([0, 1, 2, 3]) == Truepython testsI cannot find python tests for Selection at all. I will not add a full test suite just to test the pybinds of this function