Closed vinisalazar closed 1 year ago
If we are going to expose them all at one spot, I'd rather expose them at erddapy.core
rather than at the top level.
I think it would help clarify to users that refactoring is going on, and allow them to make an explicit choice which world to live in. It also would decrease the amount that is in a single namespace.
import erddapy.core
url = erddapy.core.get_download_url(...)
Yep. I agreed with @abkfenris, putting them all at the root level would be a bit confusing for folks browsing the module. Having them into a .core
is probably the best place for them.
Done with https://github.com/ioos/erddapy/pull/281/commits/6fdb280abfc8dccce9f1f1c043723add642b33e6.
Users can run:
import erddapy
erddapy.core.get_download_url()
erddapy.servers
...
i.e. no need to import erddapy.core
.
Hi,
while working on the docs for the core interface, I realised that the URL parsing and interfaces methods would have to be directly imported from their respective modules, rather than being accessed from the
erddapy
module. This seemed a bit unintuitive, so I added public methods directly to theerddapy.__init__
module.Users can then run:
instead of
which seems much harder to do.
Summary of changes:
Add public methods to
erddapy.__init__
This allows using the URL parsing and interfaces methods directly from the erddapy module, without having to access the core.url and core.interfaces modules.