Skip to content

Filter warning for speasy import and remove unused providers - #172

Merged
jgieseler merged 1 commit into
soler-he:mainfrom
jgieseler:main
Aug 28, 2026
Merged

jgieseler merged 1 commit into
soler-he:mainfrom
jgieseler:main

Conversation

@jgieseler

Copy link
Copy Markdown
Member

This pull request introduces improvements to how the speasy library is imported in several modules. The main goal is to suppress unnecessary warnings and speed up the import process by disabling unused data providers. The changes also ensure that warnings about non-compliant ISTP files from speasy are ignored, resulting in cleaner logs and improved performance.

Improvements to speasy import and warning handling:

  • Disabled unused speasy data providers (sscweb, archive, csa) before importing speasy in multi_inst_plots/psp_tools.py, multi_inst_plots/solo_tools.py, and spatial_analysis/__init__.py to speed up the import process. [1] [2] [3]
  • Suppressed UserWarning messages about "Non compliant ISTP file" from speasy using a context manager with warnings.catch_warnings() in all affected modules, ensuring cleaner output. [1] [2] [3]

Code cleanup:

  • Removed redundant direct import of speasy in spatial_analysis/__init__.py and moved it into the new import block with warning suppression and provider disabling. [1] [2]
  • Added missing import warnings in multi_inst_plots/solo_tools.py to support the new warning suppression logic.

@jgieseler jgieseler added the enhancement New feature or request label Aug 28, 2026
@jgieseler
jgieseler merged commit b5a7b99 into soler-he:main Aug 28, 2026
47 of 51 checks passed
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 this pull request may close these issues.

1 participant