Title: [EXPERIMENTAL] Add "onchange" hook by eriknw · Pull Request #262 · python-graphblas/python-graphblas · GitHub
Open Graph Title: [EXPERIMENTAL] Add "onchange" hook by eriknw · Pull Request #262 · python-graphblas/python-graphblas
X Title: [EXPERIMENTAL] Add "onchange" hook by eriknw · Pull Request #262 · python-graphblas/python-graphblas
Description: This is a PoC to see how invasive it is to add "onchange" hooks. There may be two uses for this from graphblas-algorithms: Automatically invalidate the cache when the graph is modified. This allows us to more safely expose the adjacency matrix A to the user. Make cached values read-only. Overall, I'd say this isn't very invasive all things considered. The number of places hooks are in each file is: expr.py: 2 base.py: 4 scalar.py: 2 vector.py: 3 matrix.py: 3 _ss/matrix.py and _ss/vector.py: a bunch due to pack methods This hook system is pretty simple for now. It only has one hook, "onchange", and it only passes the object that would be changed to the function. Other hooks and arguments to pass to the callbacks are possible (hence our use of **kwargs in the callback for future compatibility). This also doesn't try to manage having multiple callbacks, which is fine for our current use cases where the objects with hooks will be managed by graphblas-algorithms. We may want to add a simple API to manage hooks such as _add_hook, _has_hook, _call_hook, etc. to make it easier to evolve. We can let this stew for a bit.
Open Graph Description: This is a PoC to see how invasive it is to add "onchange" hooks. There may be two uses for this from graphblas-algorithms: Automatically invalidate the cache when the graph is modified. ...
X Description: This is a PoC to see how invasive it is to add "onchange" hooks. There may be two uses for this from graphblas-algorithms: Automatically invalidate the cache when the graph is mo...
Opengraph URL: https://github.com/python-graphblas/python-graphblas/pull/262
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:684b7592-d03e-7659-d7b7-aeac4db4f875 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B718:AB6C5:742C11:9A0882:698EDA2F |
| html-safe-nonce | 39be554ac3947a8bb3e2dd47fbedf2fa66a1a7d9a3bd7c3ebeaafd895f5904a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzE4OkFCNkM1Ojc0MkMxMTo5QTA4ODI6Njk4RURBMkYiLCJ2aXNpdG9yX2lkIjoiNTcxODg2OTAxNzkxMDc2MjAzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 83cc021a729f4e53738652b16d2330738f2b4a6586592f2984e3f8fe29be983b |
| hovercard-subject-tag | pull_request:965033858 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-graphblas/python-graphblas/pull/262/checks |
| twitter:image | https://avatars.githubusercontent.com/u/2058401?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2058401?s=400&v=4 |
| og:image:alt | This is a PoC to see how invasive it is to add "onchange" hooks. There may be two uses for this from graphblas-algorithms: Automatically invalidate the cache when the graph is modified. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/python-graphblas/python-graphblas git https://github.com/python-graphblas/python-graphblas.git |
| octolytics-dimension-user_id | 103965858 |
| octolytics-dimension-user_login | python-graphblas |
| octolytics-dimension-repository_id | 221014819 |
| octolytics-dimension-repository_nwo | python-graphblas/python-graphblas |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 221014819 |
| octolytics-dimension-repository_network_root_nwo | python-graphblas/python-graphblas |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width