added new module and necessary refactorings
This PR adds a new module called _grib_idx.py with private functions and added necessary refactorings
How does this one relate to #499 ?
@martindurant I've made the changes as you asked. But the pre-commit is failing on the unused imports when I made the function as user facing in kerchunk.grib2 module.
the pre-commit is failing on the unused imports
You can fix this by including an __all__, which should be a list of strings to be considered as "public" in the module. Making this list has two effects:
- making the imports look like they are used
- defining what gets imported if you were to do
from kerchunk.grib import *.
Should I add the original functions like scan_grib, grib_tree etc to the list or only the indexing functions?
__all__ = ["build_idx_grib_mapping", "map_from_index"]
Yes please, add all the public functions, just incase some one does do a "*" import.
@martindurant made the changes