CartoDB / carto-python

CARTO Python client
https://carto.com
BSD 3-Clause "New" or "Revised" License
154 stars 62 forks source link

AuthAPIClient class #77

Closed juanignaciosl closed 6 years ago

juanignaciosl commented 6 years ago

This closes #69.

juanignaciosl commented 6 years ago

@alrocar (main recent commiter), @danicarrion (pyrestcli owner), @javitonino (Auth API watcher) could you CR this, please? Please troll my Python code as much as possible and let me know if you think that the approach is correct.

juanignaciosl commented 6 years ago

I just pushed a bunch of changes (all but @danicarrion 's "I'd rather go for a proper try/except block here to handle the case where res.json() doesn't have a result key" because I'm not sure about what he means, yet).

juanignaciosl commented 6 years ago

PS: when you make the ok to this, @danicarrion, let me know what I have to do to make the release available for pip, because I need it at CARTO Frames.

juanignaciosl commented 6 years ago

~@danicarrion ready for last CR after try..except. Please let me know how to release this if this' ok :-)~ checking failing tests... mocks... (🏛)

juanignaciosl commented 6 years ago

Ok, I've opted for a tradeoff here. As setting up a secure test configuration is far beyond the scope of this, I've kept using "user1" user for public tests. The one that needs a master key will be skipped if the configuration is the default one. This way, it's skipped at CI but it passes locally if you set up an actual API Key. Of course, the user must have Auth API enabled and ready for Auth API to work. Tests are passing 👍

alrocar commented 6 years ago

You need to be added as a maintainer in the carto pypi repo. It seems it only can be done by the owner (@danicarrion)

Once you have access, to release a new version:

juanignaciosl commented 6 years ago

Ok, I'll wait for @danicarrion final CR and previous steps for the release, thanks!

juanignaciosl commented 6 years ago

Got 🇪🇸 by @danicarrion , merging and releasing as soon as tests pass.