eurec4a / eurec4a-intake

Intake catalogue for EUREC4A field campaign datasets
17 stars 19 forks source link

Disallow python operators in catalog entries #144

Closed observingClouds closed 9 months ago

observingClouds commented 11 months ago

A few catalog entries, especially those of HALO, have hyphens in their names.

This disallows auto-completion and the usage of the following syntax:

ds = cat.HALO.Bahamas.PositionAttitude.HALO-0115.to_dask()

but rather needs to written as:

ds = cat.HALO.Bahamas.PositionAttitude['HALO-0115'].to_dask()

I would argue that we replace operators *,-,+,/ with e.g. _ so that both versions are possible. In this particular case I wonder if the prefix HALO- is at all necessary and we should rather use that space to write out the entire date e.g. 20200115.

observingClouds commented 11 months ago

@d70-t @RobertPincus any opinions?

d70-t commented 11 months ago

I totally agree, that those are annoing and HALO- is redundant at that scope.

I'd however pefer not to change them, because of two reasons:

RobertPincus commented 11 months ago

I defer to @d70-t. But I also agree with him - in retrospect this isn't the best naming but folks have figured out how to work around the inconvenience.

d70-t commented 9 months ago

Can we settle on the following:

We'll strongly recommend not to use those problematic characters, but if there's a strong reason for them (like putting an agreed-upon identifier), we still allow them?

@observingClouds could you add a corresponding paragraph (with more complete wording :-)) to CONTRIBUTING.md to move this forward ?

d70-t commented 9 months ago

This should be settled with #148.