fortyninemaps / karta

A tidy Python package for geospatial computation
https://karta.fortyninemaps.com
MIT License
100 stars 11 forks source link

installing namespace packages makes toplevel names inaccessible #33

Closed njwilson23 closed 8 years ago

njwilson23 commented 8 years ago

With only karta installed, can do:

karta.read_shapefile(...)
karta.read_gtiff(...)

but when the karta.mapping namespace package is installed these need to be

karta.vector.read_shapefile(...)
karta.raster.read_gtiff(...)

Need to search for workarounds, or decide that the convenience of the first version is worth it.

njwilson23 commented 8 years ago

This looks unfixable. Either names can't be defined in __init__, or karta shouldn't be treated as a namespace package. Since removing code from __init__ would break a lot of existing code, it's probably better to just give packages like karta.mapping a unique name.