GithubHelp home page GithubHelp logo

Migrate to adsws-api about ads HOT 13 CLOSED

andycasey avatar andycasey commented on May 25, 2024
Migrate to adsws-api

from ads.

Comments (13)

andycasey avatar andycasey commented on May 25, 2024

Hi Vladimir,

There's a few open issues that have arisen lately on this repository, which
I have been meaning to find time to attend to.

I was planning to update the code base to the new version at the same time
as dealing with the recently raised issues. But I'm lacking infinite spare
time at the moment.. If you have time and are able to implement some of the
changes to the new API, that would be awesome! I will help wherever I can.

Andy

On Wed, Jun 24, 2015 at 5:33 PM, Vladimir Sudilovsky <
[email protected]> wrote:

Hi @andycasey https://github.com/andycasey and other contributors,

the ADS would like to update your client be compatible with the new
version of our api. The docs at https://github.com/adsabs/adsabs-dev-api
are still 80% accurate, but some fields are different and the
authentication mechanism will be slightly different. The docs will be
updated to reflect these changes.

I was planning on doing the implementation myself and issue a PR for your
review. Any concerns or objections to that?


Reply to this email directly or view it on GitHub
#18.

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Hey,

The async requests are a bit troubling to me. Aren't you potentially asking the api/solr to do a whole lot of work all at once in line https://github.com/andycasey/ads/blob/master/ads/core.py#L371 ?

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Hi,

I wanted to update you; I've refactored a significant portion of the code with the following points in mind:

  • No more pre-firing requests
  • Pagination continues to be handled automatically and behind the scenes, but with a default maximum of 3 pages. Users may set max_pages higher as desired to really return all documents, but it is a costly procedure and may consume all of their daily quota. Hence the "sane" default.
  • The user-facing API for search/query is unchanged, but the underlying code has been refactored with more class inheritance in mind.
  • Room for other ADS services (Metrics, Export, Visualization)
  • Tests against a local mocked server with stubdata

The work in progress can be found at https://github.com/adsabs/ads/tree/devel, and I'm very happy to hear comments and suggestions, especially considering that it has been a significant refactor :)

from ads.

andycasey avatar andycasey commented on May 25, 2024

Hi @vsudilov

This is great stuff! Do you want me to fork off your branch and add PRs to that?

from ads.

andycasey avatar andycasey commented on May 25, 2024

Is the new API accessible to muggles (e.g., me)? I'm getting

SolrResponseError: u'{\n  "error": "Unauthorized"\n}'

When trying to mess around with SearchQuery. I see that the API token is passed through the session now, but I thought it might be because the dev_key also needed to be supplied. But I still get unauthorized responses when I supply dev_key.

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Check out the devel docs for the new api; in essence the old dev_keys people have that were manually maintained are being replaced by a self maintained (oauth2) type system. The new api (api.adsabs.harvard.edu/v1) doesn't know anything about the old dev_keys.

https://github.com/adsabs/adsabs-dev-api/tree/devel

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Maybe make a new branch called devel on /andycasey/ads and I'll PR onto that?

from ads.

andycasey avatar andycasey commented on May 25, 2024

Thanks for the new API link!

devel branch created.

from ads.

andycasey avatar andycasey commented on May 25, 2024

I have my new API token now, but I may be busy (observing) over the next week. I will start playing around with the code on your branch as soon as I can.

from ads.

barentsen avatar barentsen commented on May 25, 2024

@vsudilov Is there any chance we can get the new API to provide some level of service without a key in place? (eg. using IP-based restrictions) It would make it sooooooo much easier to deploy an ADS-based application that makes (limited) use of the API, without forcing users through the user-unfriendly process of getting a key?

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

@barentsen we won't provide for IP whitelisting, but the foundation is in place to register applications in the oauth2 sense (e.g. travis/github). Though the backend components are (mostly) in place, we don't have a UX workflow and it isn't on our top priority at this time.

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

@andycasey could I ask you to please merge your lazy loading implementation into devel? I'd like to take a look into it today!

from ads.

vsudilov avatar vsudilov commented on May 25, 2024

Any news/thoughts on the PR, Andy?

from ads.

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.