Coder Social home page Coder Social logo

Comments (7)

dopplershift avatar dopplershift commented on June 6, 2024

Actually, the current examples are using a 'Best' dataset, so this doesn't help. @lesserwhirls is there something I'm missing?

from siphon.

dopplershift avatar dopplershift commented on June 6, 2024

Part of our catalog API enhancement should probably make it easy to find best, latest, etc.

from siphon.

dopplershift avatar dopplershift commented on June 6, 2024

@lesserwhirls ping?

from siphon.

lesserwhirls avatar lesserwhirls commented on June 6, 2024

Wow, not sure how I missed your pings on this...sorry about that!

Since latest is a service, and best and full collection (2D time) are virtual datasets, their endpoint will always be known, so adding those should be easy.

Now, the big question is how do we make it easy to do. One idea is that we could add some methods the TDSCatalog Class like this:

get_latest_access_url(access_type)
get_best_access_url(access_type)
get_2D_time_access_url(access_type)

For each of those methods, we could check to see:

  1. Is there a the latest, best, or 2D time dataset in the catalog?
  2. If so, pick a default access:
  • Is cdmremote enabled? If yes, use it.
  • is OPENDAP enabled? if yes, use it.
  • if no cdmremote or OPENDAP access method...profit? Yeah, not sure. Maybe return empty string a use a warnings.warn message that includes the access methods that are enabled on the dataset?.
    1. If not: more profit? Return an empty string?

from siphon.

dopplershift avatar dopplershift commented on June 6, 2024

What about making best, twod, and latest attributes/properties that are dictionaries (just like access_urls)? The more I look at it, get_foo_access_url is really verbose and long.

Properties would allow resolving it lazily. Attribute-like access seems like the API I'd like to use.

On Jul 3, 2015, at 11:27, Sean Arms [email protected] wrote:

Wow, not sure how I missed your pings on this...sorry about that!

Since latest is a service, and best and full collection (2D time) are virtual datasets, their endpoint will always be known, so adding those should be easy.

Now, the big question is how do we make it easy to do. One idea is that we could add some methods the TDSCatalog Class like this:

get_latest_access_url(access_type)
get_best_access_url(access_type)
get_2D_time_access_url(access_type)
For each of those methods, we could check to see:

  1. Is there a the latest, best, or 2D time dataset in the catalog?
  2. If so, pick a default access:

Is cdmremote enabled? If yes, use it.
is OPENDAP enabled? if yes, use it.
if no cdmremote or OPENDAP access method...profit? Yeah, not sure. Maybe return empty string a use a warnings.warn message that includes the access methods that are enabled on the dataset?.
If not: more profit? Return an empty string?

Reply to this email directly or view it on GitHub.

from siphon.

lesserwhirls avatar lesserwhirls commented on June 6, 2024

That works too. I'm not against using attributes.

from siphon.

dopplershift avatar dopplershift commented on June 6, 2024

I think the ideas in here are supplanted by #137.

from siphon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.