Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify rest api #1853

Merged
merged 8 commits into from
Jun 1, 2016
Merged

Conversation

josenavas
Copy link
Contributor

First step for simplifying the REST api.

The current REST api for the artifacts was getting complex with a lot of endpoints. Right now, it has been reduced to a single endpoint to get all the information.

I've started modifying some of the plugins but not all of them. Doing the PR against a different branch given our last discussion in the Qiita meeting so we can get some discussion started about the API.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 83.631% when pulling 2a60bab on josenavas:simplify-rest-api into a9e4e03 on biocore:simplify-restAPI.


Returns
-------
dict
{'filepaths': list of (str, str)}
The filepaths attached to the artifact and their filepath types
{''}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove this?

@antgonza
Copy link
Member

One minor comment. @ElDeveloper or @squirrelo could you check this PR?

if artifact_type not in FILEPATH_TYPE_TO_NOT_SHOW_HEAD:
# we need to encapsulate the full for loop because gzip will
# not raise an error until you try to read
try:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing a try/except you could read in the magic number right? It would probably amount to the same lines of code in total, but at least there wouldn't be an except IOError (which can also be raised if the file doesn't exist IIRC).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed this was not code you really changed ... so yeah feel free to disregard that.

@ElDeveloper
Copy link
Member

Looks good.

@antgonza
Copy link
Member

antgonza commented Jun 1, 2016

The commits will not change the passing status, merging.

@antgonza antgonza merged commit a57e869 into qiita-spots:simplify-restAPI Jun 1, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 83.631% when pulling d8fd7c3 on josenavas:simplify-rest-api into a9e4e03 on biocore:simplify-restAPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants