earthkit icon indicating copy to clipboard operation
earthkit copied to clipboard

Improve earthkit import system

Open Oisin-M opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Inconsistent API depending on installation method

!pip install earthkit

import earthkit as ek
ek.data.from_source(...) #works
!pip install earthkit-data

import earthkit as ek
ek.data.from_source(...) #AttributeError

Describe the solution you'd like

This behaviour occurs because the earthkit/ folders in earthkit-data (and all other earthkit modules) don't have any __init__.py file. I was thinking potentially we could solve this by having the same __init__.py file in all the earthkit repos, which would dynamically try and load any available earthkit modules.

Describe alternatives you've considered

No response

Additional context

No response

Organisation

No response

Oisin-M avatar Mar 24 '25 09:03 Oisin-M