-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make View
behave more like Module
#351
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng module / view such view behaves like module, but only within its scope.
move_to method #320 was just merged :) |
This was referenced Apr 24, 2024
michaeldeistler
force-pushed
the
main
branch
8 times, most recently
from
August 22, 2024 14:35
a1b70d8
to
fddb19a
Compare
Merged
Much better implementation in #447 |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have added a bunch of attrs that can be accessed in
Module
as properties ofView
. CallingView.attr
behaves similar toModule.attr
, but only considers whatever parts of the network, cell, etc. are currently in view. This could potentially allow to runintegrate
onView
, i.e. if one just wants to look at thesoma
of a cell or a single cell in a network. This would also make it easier to add ato_module
util, that can take aView
and turn it into a standalone module, which was suggested in #249.Also added a
groups
attr, that just lists group names.Open questions and todos are:
_ensure_view_is_connected
?View.nodes
of unused parametersCellView
etc. level?dev.ipynb
In the long term, it would be nice to make
View
behave more likeModule
without all of these properties essentially just indexing intoView.pointer
in some way. Imo most methods should be part of module if possible and only passed through to view, with view only showing what's in scope. While a method in module acts on the entire thing, in view it only acts on whatever is in view. This could be done by having aself.viewed_indexes
/self.in_scope
attr inModule
, that decides what isset
, where things areinsert
ed etc. This would get rid of a lot of complexity and duplicate methods. For example would this make many hidden methods, like_record
inModule
obsolete. Additionallyview
can just be a property that returnsView.nodes
.