html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/7348#issuecomment-1398017683,https://api.github.com/repos/pydata/xarray/issues/7348,1398017683,IC_kwDOAMm_X85TVA6T,1386642,2023-01-20T07:37:12Z,2023-01-20T07:41:06Z,CONTRIBUTOR,"I see your point, but xarray could do both, and most accessors I've used come in a pip installable package and we can make that workflow a bit smoother with entry points. IMO it is an advantage of entrypoints that they don't require editing source code, just a 1 line change to a setup.py, setup.cfg, or pyproject.toml.
I wonder how often ""users"" define their own accessors...I use python functions and modules. The ""black magic"" you mention breaks most static analysis tooling (type checking, linting, completion) and saves at most a couple of characters, so I never felt the need, but that's a discussion for another day.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1473152374
https://github.com/pydata/xarray/issues/7348#issuecomment-1382233446,https://api.github.com/repos/pydata/xarray/issues/7348,1382233446,IC_kwDOAMm_X85SYzVm,35968931,2023-01-13T18:34:51Z,2023-01-13T18:34:51Z,MEMBER,"Thanks for the suggestion @nbren12 !
Whilst I agree that this would be a more ""correct"" way of providing accessor functionality, I think there is a big downside in that Entrypoints are quite a lot harder for users to use than the accessors are.
Whilst the way the accessors actually add the method is kind of black magic, all the user has to do is copy-paste [the example from the docs](https://docs.xarray.dev/en/stable/internals/extending-xarray.html#extending-xarray) and change the methods and accessor name to what they want, and it will immediately work.
Adding an entrypoint requires going into your setup.py (which you wouldn't even have if you're running a script or notebook), and it's conceptually complicated. The accessors stuff is useful even for relatively novice users, so I don't really want to make it harder to understand...
Interested in what other people think though?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1473152374