VirtualiZarr icon indicating copy to clipboard operation
VirtualiZarr copied to clipboard

A better name for the ".virtualize" accessor?

Open TomNicholas opened this issue 1 year ago • 4 comments

I'm not super happy with the vds.virtualize.to_<format> accessor name. It's confusing - really the "virtualize" accessor doesn't "virtualize" anything, the references are already virtual, it just allows you to write them out somewhere.

A better name might be .serialize.to_<format> or even just .write.to_<format> (as these methods correspond to virtualizarr "writers"). The problem with those names is that they don't really indicate that you're about to enter a virtualizarr-specific namespace. But then again if you attempt to call ds.virtualize.to_<format>() on a non-virtual dataset you will get a clear error anyway.

See also #239. This is also a manifestation of #171.

TomNicholas avatar Sep 25 '24 18:09 TomNicholas

I wonder whether we should try to instead find a summarizing name (virtualizarr, for example) instead of more specific ones like serialize or write? That way, we don't have to try to describe what is in the namespace (you probably won't find a name for the writers that, at the same time, fits the rename_paths method).

keewis avatar Sep 25 '24 18:09 keewis

That's a very good point @keewis - I forgot about the rename_paths method. Yeah having virtualizarr instead of virtualize would be a minor improvement, as the verb virtualize is misleading and unneccessary here.

TomNicholas avatar Sep 25 '24 18:09 TomNicholas

We could also just use .vz as a shorthand for virtualizarr, to correspond with a convention of importing top-level functions via import virtualizarr as vz.

TomNicholas avatar Jan 25 '25 19:01 TomNicholas

I like vz as the accessor name since it doesn't try to create a one word description for what virtualizarr does since we now have readers and writers and may have loaders in the future.

As a meta note, I think we should try to make a decision while we're working on the develop branch, if it seems likely that will be pushed out as a v2.0.

maxrjones avatar Mar 18 '25 17:03 maxrjones