question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package naming "conventions" for xarray extensions

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
spencerahillcommented, Jun 19, 2017

One other thought for x rather than xr: to me at least, the x-prefixed package names just sound cool 😄

1reaction
jhammancommented, Jun 15, 2017

@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 for xarray prefix). My gut reaction to xrsignal is to drop the r (xsignal) and perhaps to use xsignal as the accessor name as well. Just some thoughts and like I said, no strong opinions here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reading and writing files - Xarray
NetCDF files follow some conventions for encoding datetime arrays (as numbers with a “units” attribute) and for packing and unpacking data ...
Read more >
cf-xarray: Scale your analysis across datasets with less data ...
This notebook demonstrates how the cf-xarray Python package (Cherian et al, ... Inference of grid-cell coordinates and bounds using CF conventions.
Read more >
xugrid - PyPI
Xarray extension for unstructured grids. ... for data and topology stored according to UGRID conventions. ... Or from the Python Package Index:
Read more >
x:Array Markup Extension - XAML - Microsoft Learn
The name of the type that your x:Array will contain. typeName may be (and often is) prefixed for a XAML namespace that contains...
Read more >
xarray-dsp - possible merge with xr-scipy? - Google Groups
And that is just the package naming convention, the import-level name is often different, usually it's something like xrscipy or xarray_dsp.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found