-
Notifications
You must be signed in to change notification settings - Fork 321
Description
Feature Request
Is your feature request related to a problem? Please describe.
I have a project that uses Satpy but does not need most of the "usual" functionality that Satpy provides. Specifically I need to read ABI and AHI input data, no resampling, no compositing, and write to a NetCDF file using the "awips_tiled" writer. This project involves creating a docker image so reducing the number of unnecessary dependencies installed can make a huge difference on the size of the docker image.
Additionally, the more imports needed to do basic functionality in Satpy means longer import times overall when the functionality using those imports isn't needed.
Describe the solution you'd like
I'd like to refactor a few key modules in Satpy into a series of submodules. As part of that I'd also like to remove "alias" imports as much as possible. I started this with the "satpy.writers" sub-package in #3122, but naming still needs to be finalized. Other modules that should be looked at:
-
satpy/tests/utils.py- This one maybe doesn't make sense if we think that public users should not be importing stuff from tests. In my case I wanted to use themake_dataidfunction but theutilsmodule was importing a lot of stuff that wasn't necessary. -
satpy/readers/__init__.py- Hopefully not as difficult as the others described here since most of the functionality is using builtin python features. Refactor reader imports #3127 and Refactor resampler module to submodules #3124 -
satpy/composites/__init__.py- We have a ton of composite classes here. They should really be divided up. Refactor composites to separate modules #3157 -
satpy/enhancements/__init__.py- All the generic builtin enhancements are in here and require too many imports (trollimage) that most don't use. Refactor enhancements #3155 -
satpy/multiscene/__init__.py: These are all alias imports when I refactormultiscene.pyinto separate modules. They should be removed. Additionally_blend_funcs.pyshould be made public. Switch MultiScene blend functions to a public satpy.multiscene.blend_funcs module #3236 -
satpy/writers/- Refactor satpy.writers to separate modules #3122 - I'm sure others, but these are the ones I've been bumping into.
After these are refactored the __init__.py modules could get a __getattr__ function that produces a warning when someone tries to access the old import.
Describe any changes to existing user workflow
Users will need to change their imports.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status