Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically pick up earthkit modules #97

Open
Oisin-M opened this issue Mar 21, 2025 · 3 comments · May be fixed by #98
Open

Automatically pick up earthkit modules #97

Oisin-M opened this issue Mar 21, 2025 · 3 comments · May be fixed by #98
Labels
enhancement New feature or request

Comments

@Oisin-M
Copy link
Contributor

Oisin-M commented Mar 21, 2025

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

No dynamic pick-up of new modules

!pip install earthkit
!pip install earthkit-climate

import earthkit as ek
ek.data #works
ek.climate #fails

@JamesVarndell already started work on fixing this in #9

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Organisation

No response

@Oisin-M Oisin-M added the enhancement New feature or request label Mar 21, 2025
@Oisin-M Oisin-M changed the title Improve import behaviour Automatically pick up earthkit modules Mar 24, 2025
@sandorkertesz
Copy link
Collaborator

Hi @Oisin-M, thank you for the suggestion. The reason for the current solution is that only "verified" earthkit modules are imported under earthkit.

@Oisin-M
Copy link
Contributor Author

Oisin-M commented Mar 24, 2025

Thanks for the clarification @sandorkertesz. I am happy to close this issue and the associated PR then.

However, since I guess earthkit-climate is one of the verified packages even if it's not in the pip install earthkit bundle, to avoid the behaviour above occurring we could add a try-except for importing it in the __init__.py. Do you think it's a good idea, or better to leave as-is?

@sandorkertesz
Copy link
Collaborator

@tlmquintino , what do you think about relaxing the current policy and allowing earthkit to automatically pick up all earthkit-* modules available in the environment as this PR proposes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants