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

Should we be importing indices at the top-level? #1448

Closed
1 task done
Zeitsperre opened this issue Aug 1, 2023 · 2 comments
Closed
1 task done

Should we be importing indices at the top-level? #1448

Zeitsperre opened this issue Aug 1, 2023 · 2 comments
Assignees
Labels
API Interfacing and User Concerns support Questions and help for users/developers

Comments

@Zeitsperre
Copy link
Collaborator

Setup Information

  • Xclim version: 0.44.0
  • Python version: Any
  • Operating System: All

Context

I've always noticed that when writing scripts dependent on xclim.indices, unless we explicitly import indices we'll get IDE warnings:

image

This is of course only a warning (I imagine that xclim.indices is implicitly imported via the indicators or Python allows for importing modules that are otherwise not listed within __init__.py).

What I'm wondering is if there is any reason not to import indices on import of xclim.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Zeitsperre Zeitsperre added API Interfacing and User Concerns support Questions and help for users/developers labels Aug 1, 2023
@Zeitsperre Zeitsperre self-assigned this Oct 10, 2023
@huard
Copy link
Collaborator

huard commented Nov 7, 2023

It's there anyway, so if we can remove warnings by importing it explicitly, I say go for it.

@Zeitsperre
Copy link
Collaborator Author

This issue was addressed in commit 37bfd50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Interfacing and User Concerns support Questions and help for users/developers
Projects
None yet
Development

No branches or pull requests

2 participants