-
Notifications
You must be signed in to change notification settings - Fork 15
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
[pyos][question] How do the operators work? #429
Comments
You seem to be getting the rough idea correct I think. Thanks for thinking out loud!
The
I'm not sure I follow. What do you mean "that is how they care called"? Calling e.g.
Yeah, that's currently where things get initialized, which populates the operator namespaces. Perhaps it would be clearer to move the initialization data and methods off of the classes and into e.g. Did you read my super-short description from #410 (comment)?
I may have mentioned this before, but our team discussed this and we would like for data about operators to be declared upstream in Adding module docstrings, class docstrings, code comments, etc. to make the code more navigable and understandable is high on my priority list, because right now I'm uniquely position to do so (I believe the rest of the team could also do so, but I can probably do so better and more completely) and this will help future contributors (or users trying to understand/debug something), which is super-important for long-term viability of the project. I will focus on this and refactoring as appropriate to make things clearer before I focus on high-level documentation, and I'm super-grateful that the rest of the team has done the vast majority of high-level documentation thus far. Keep your questions and streams-of-thoughts coming! :) |
OK I see the Yes upstream metadata would be nice. I pieced through this myself, wondering how much could be inferred from the cffi imports themselves, and it doesn't look like much - I see why a lot is hardcoded here, it's otherwise impossible to tell which method/function goes with what. getting started reading again and hoping to finish today |
I am trying to piece my way through the code and I figured it would probably be easier to just ask.
Perhaps related to : #427
graphblas.binary
__init__.py
file that seems to be roughly duplicated between operators. They seem to be populated as a side effect of importingfrom ..core import operator
andimport .numpy
.numpy
module within each operator type seems to be the place where the operators are actually listed along with a mapping between graphblas and numpy__all__
and maybe from there that is how they are called, but I am not sure how/where that lookup is actually madecore.operator.utils
that initializes each of the op classes?I'm probably missing a lot but that's where I have reached so far. I think this would be a really good thing to have in the docs since it also relates to a few other questions eg. how to document each of the different operator types so someone using the package can discover them and how the code is structured generally. A decent amount of this seems to happen in side effects and by dynamically modifying the modules on/after import. It seems to work fine, which is awesome, so i believe y'all understand how this works but it seems like a lot of cognitive overhead for someone who might be interested in being a contributor.
I was thinking it might be a good think to think out loud about, and i'm happy to be a novice reader/fresh eyes/however you want to call it that can help point out where i get lost when trying to follow the thread.
Part of: pyOpenSci/software-submission#81
The text was updated successfully, but these errors were encountered: