Package naming "conventions" for xarray extensions
See original GitHub issueI’m wondering what would be a good name for a package that primarily aims at providing an xarray extension (in the form of a DataArray and/or Dataset accessor).
I’m currently thinking about using a prefix like the scikit package family (e.g., scikit-learn, scikit-image).
For example, for a xarray extension for signal processing we would have:
package full name: xarray-signal
package import name: xrsignal (like sklearn)
accessor name: signal.
>>> import xarray as xr
>>> import xrsignal
>>> ds = xr.Dataset()
>>> ds.signal.process(...)
The main advantage is that we directly have an idea on what the package is about. It may be also good for the overall visibility of both xarray and its 3rd-party extensions. The downside is that there is three name variations: one for getting and installing the package, another one for importing the package and again another one for using the accessor. This may be annoying especially for new users who are not accustomed to this kind of naming convention.
Conversely, choosing a different, unrelated name like salem or pangaea has the advantage of using the same name everywhere and perhaps providing multiple accessors in the same package, but given that the number of xarray extensions is likely to grow in a next future (see, e.g., the pangeo-data project) it would become difficult to have a clear view of the whole xarray package ecosystem.
Any thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
One other thought for
xrather thanxr: to me at least, thex-prefixed package names just sound cool 😄@benbovy -
I don’t have really strong opinions here but I can tell you what I’ve done with xmap. I basically tried to keep it simple and use the same name for all three (package full name, package import name, and the accessor name). My thoughts on how to handle longer names are generally the same, the package-full name could be anything (I’d be okay switching to
xarray-mapping) and I like the idea of having an identifiable collection of extensions (+1 forxarrayprefix). My gut reaction toxrsignalis to drop ther(xsignal) and perhaps to usexsignalas the accessor name as well. Just some thoughts and like I said, no strong opinions here.