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

Remove some of OGGM's hard dependencies #420

Closed
fmaussion opened this issue Mar 5, 2018 · 2 comments

Comments

@fmaussion
Copy link
Member

commented Mar 5, 2018

Currently one needs to install a LOT of packages to get OGGM to be simply imported. Some users (e.g. #418) could use a much lighter version.

Very heavy packages (only useful for the operational workflow and traditionally hard to install) include:

  • rasterio
  • gdal
  • fiona

Getting those as an optional dependency would be very useful.

@fmaussion fmaussion changed the title Make a minimal OGGM version installable for flowline experiments Remove some of OGGM's hard dependencies Mar 5, 2018

@fmaussion

This comment has been minimized.

Copy link
Member Author

commented Mar 5, 2018

There are at least two ways to do this I know about:

  • keeping the import statements at the top of the module but put them in a try .. catch statement
  • put the imports in the function where there are used, thus raising an import error at runtime only

I think option 2 is better, and should not be too hard to implement.

@fmaussion fmaussion added this to the 2.x milestone Jun 14, 2018

@fmaussion

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2019

This becomes more and more important, now that OGGM-Edu is gaining momentum. For plenty of applications we don't need all the GDAL/RASTERIO things...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.