Giter Site home page Giter Site logo

Comments (11)

derick-hess avatar derick-hess commented on August 12, 2024

I'll have this fixed soon. Working on it now.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

Okay thanks. I think shotline and shotid should also accept wildcards.

Just FYI, I can expand most of the wildcards in the web handler, but cannot handle shot-ids and shotlines since the ph5toexml.py program can currently only return all event info for one network. Eventually I think we will want to change the ph5toexml.py program to accept additional query arguments. Then I could expand all wildcards in a list of requests in the handler code and remove overlapping/duplicate requests, in order to add support for HTTP POST for the by Shot request type. This is what I do currently for the FDSN request type.

from ph5.

derick-hess avatar derick-hess commented on August 12, 2024

shotid will be easy to accept wildcards, shotline I'll have to work on a bit since you can only have a maximum of one shotline per request and wildcards could match multiple shotlines.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

In that case maybe we only support wildcards for shotid and not shotline. Do you think supporting wildcards for shotlines would be a useful feature?

from ph5.

derick-hess avatar derick-hess commented on August 12, 2024

What I'm going to do now is push code that fixes the array, station, and channel wildcards sicne that is done.

I think we should definitely support wildcards for shotlines and shotids as well as requesting multiple shotlines. I can fix this but it will take substantially more coding and probably more time than I have today to fix those wildcards and add the the ability for multiple shotlines. I will work on this and try to get that pushed by the end of the weekend.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

Okay that sounds good. Don't worry about working on it over the holiday weekend unless you want to. The FDSN request type still works fine since I expand wildcards in the web handler as I described above. I would say that proper error handling is equally, if not more, important as supporting wildcards for shotid and shotline.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

Can you add wildcard support for component-id easily to ph5tomsAPI.py?

from ph5.

derick-hess avatar derick-hess commented on August 12, 2024

Yeah I can add that no problem.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

As long as we are updating ph5tomsAPI could we also change the eventnumbers parameter in the constructor to take a List instead of a comma separated String so that it matches the other input parameters?

i.e. eventnumbers="" would be changed to eventnumbers=[] here:
https://github.com/PIC-IRIS/PH5/blob/master/webservices/ph5tomsAPI.py#L99

Update:
@derick-hess
Additionally, it looks like component, station, channel, doy_keep, and station_id are currently defaulting to empty Lists in the constructor, but are still treated like comma separated Strings in the code. For example, if you pass a List of stations (e.g. ['1001','1002']) to the station parameter, it will break on line 352 when it tries to split the List like a comma separated string.

e.g.

  File "ph5tomsAPI.py", line 352, in create_cut_list
    sta_patterns = self.station.split(',')
AttributeError: 'list' object has no attribute 'split'

from ph5.

derick-hess avatar derick-hess commented on August 12, 2024

i'll work on fixing all of those.

from ph5.

nick-falco avatar nick-falco commented on August 12, 2024

Thanks for pushing your fixes @derick-hess. All of the changes you made seem to be good, so I'm closing this issue.

from ph5.

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.