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

refactor modules/base.py to make View behave like Module #354

Closed
jnsbck opened this issue Apr 24, 2024 · 1 comment
Closed

refactor modules/base.py to make View behave like Module #354

jnsbck opened this issue Apr 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jnsbck
Copy link
Contributor

jnsbck commented Apr 24, 2024

In the long term, it would be nice to make View behave more like Module without all of these properties essentially just indexing into View.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 a self.viewed_indexes / self.in_scope attr in Module, that decides what is set, where things are inserted etc. This would get rid of a lot of complexity and duplicate methods. For example would this make many hidden methods, like _record in Module obsolete. Additionally view can just be a property that returns View.nodes.

As suggested in #351

@jnsbck jnsbck added the enhancement New feature or request label Apr 24, 2024
@jnsbck jnsbck changed the title make View behave like Module more naturally. refactor to make View behave like Module Apr 24, 2024
@jnsbck jnsbck changed the title refactor to make View behave like Module refactor modules/base.py to make View behave like Module Apr 24, 2024
@jnsbck jnsbck mentioned this issue Oct 10, 2024
@jnsbck
Copy link
Contributor Author

jnsbck commented Oct 23, 2024

This was adressed with #447

@jnsbck jnsbck closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant