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

A minimal REST API for Qiita #2094

Merged
merged 46 commits into from Mar 30, 2017
Merged

Conversation

ElDeveloper
Copy link
Member

@ElDeveloper ElDeveloper commented Mar 28, 2017

A minimal API to support the functionality for the plate mapper. Whenever possible we've used JSON as the way to represent the transferred data. The endpoints are as follows:

action URI description
GET /api/v1/study/<int> get study details (title, contacts, abstract, description, alias and efo)
GET /api/v1/study/<int>/samples get samples associated with a study and the available metadata headers for these samples
GET /api/v1/study/<int>/samples?categories=foo,bar get metadata categories foo and bar for all samples in the study
GET /api/v1/study/<int>/status the status of a study (whether or not the study: is public, has sample information, sample information has warnings and a list of preparations
GET /api/v1/person?name=foo&affiliation=bar see if a person exists
POST /api/v1/study create a study (mirrors study creation on qiita UI with minimal requirements)
POST /api/v1/person?name=foo&affiliation=bar&email=address create a study person (ie lab person or PI)
POST /api/v1/study/<int>/preparation associate a prep with a study
POST /api/v1/study/<int>/preparation/<int>/artifact associate filepaths to a preparation, assuming this filepaths are present in the uploads folder

Open questions ( ¯\_(ツ)_/¯ )

  • How to properly document this for consumers and developers.
  • How should these handlers be name-spaced so they can be imported in webserver.py.
  • Per-user authentication.
  • What other information do we need to include in the study status.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 53b3803 on ElDeveloper:death-march into ** on biocore:master**.

@ElDeveloper
Copy link
Member Author

One very important thing I forgot to mention: @wasade and I pair-programmed everything in this PR. 🎉

Copy link
Member

@antgonza antgonza left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Some extra things:

  • Should the TODOs be issues?
  • Why v1? Do we really expect different versions? Should we just settle in one and say that is in development and it possibly change in the future? I'm worry we are deciding to support old versions of something we haven't even tested internally AKA I'm sure is gonna change.
  • I think adding the end points and inputs/outputs to the documentation will be the best. Now, this could be something we add manually, a pain in the long run, or something that is programmatically added, a pain right now. Either way, the documentation should go inside the doc folder in qiita_pet.
  • name-spaced: not sure what you mean?
  • authentication: I thought one option is to generate a unique "signature" (string) that you can obtain via the GUI (part of your user info page) and you use to create a valid connection. At this point, what ever is easy but secure at the same time.
  • extra study info: hard to predict until we actually start using and goes back to my v1 question.

efo = payload['efo']
contacts = payload['contacts']

if Study.exists(title):
Copy link
Member

Choose a reason for hiding this comment

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

Should all the errors/warnings be passed at once?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only means we could find to determine if a study already existed. Not sure what else can be passed back.

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking in getting the warnings like this, unknown principal investigator, lab person etc all at once vs. each test by itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

That would complicate the logic quite a bit as some checks can't be done if others fail

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @antgonza - it would be better to check the 3 things (study, PI and lab person) and return all errors at once - otherwise it becomes an iterative process to find all the errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

The awkward thing about this is that we would have to mix the error codes, and this is also the way that Study.create does things i.e. by raising one exception at a time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok - sounds good - I don't think is that critical here as it is during metadata addition.

pid = prep.id
art = prep.artifact is not None
# TODO: unclear how to test for warnings on the preparations as
# it requires knowledge of the preparation type. It is possible
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what this refers to? data_type, information_type, other?

Copy link
Contributor

Choose a reason for hiding this comment

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

The call to validate requires knowledge of what the preparation actually is, and we didn't want to replicate a bunch of functionality for this.

Copy link
Member

Choose a reason for hiding this comment

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

Got it! Depending on the data_type is how the validation happen. One simply option is to return all the validations avaialble? Not pretty but this will allow us to test and figure out a better solution. Other option will be to force the user to pass that, I guess a similar issue than artifact_type/id. BTW I think this is important cause the first use case will be either target gene or shotgun sequencing.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'd need to hardcode the variable names of all the prep template constants which can be passed to validate, unless there is a mapping somewhere already? It would also make the response from this API variable as different requirements are added in which could easily cause issue with consumers.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be englobed here: #2096

response = self.get('/api/v1/study/1.11111', headers=self.headers)
self.assertEqual(response.code, 404)
# not asserting the body content as this is not a valid URI according

Copy link
Member

Choose a reason for hiding this comment

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

I guess: "# to the regex associating the handler to the webserver" is missing ...

Copy link
Contributor

Choose a reason for hiding this comment

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

:)

prepid = json_decode(response.body)['id']

uri = '/api/v1/study/1/preparation/%d/artifact' % prepid
# 1 -> fwd or rev sequences in fastq
Copy link
Member

Choose a reason for hiding this comment

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

I guess this info needs to be added to the documentation too, right? Or will it need to be part of the API, something that returns the artifact_type, artifact_id?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not clear what the best direction here is. Accepting internal IDs like this sucks, so having an informative endpoint to get these names probably makes sense and then just pass in strings. But, we opted to consider this low priority right now since this API is scoped for internal use only at the moment.

Copy link
Member

Choose a reason for hiding this comment

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

Agree, perhaps next step if this is done? @josenavas, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think passing the ids is required. IIRC you can pass the actual string and the code internally will change to the ID. So instead of 3 you can pass 'raw_barcodes'

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right @josenavas, this works with either the identifier or the string value, we've modified a test to show that this works either with identifiers or with ids, should we do anything else?

Copy link
Contributor

Choose a reason for hiding this comment

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

no that I can think of here

@@ -164,7 +174,21 @@ def __init__(self):
CommandActivateHandler),
(r"/qiita_db/plugins/(.*)/(.*)/commands/(.*)/", CommandHandler),
(r"/qiita_db/plugins/(.*)/(.*)/commands/", CommandListHandler),
(r"/qiita_db/plugins/(.*)/(.*)/", PluginHandler)
(r"/qiita_db/plugins/(.*)/(.*)/", PluginHandler),
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment to separate the plugin handlers from the API?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

@wasade
Copy link
Contributor

wasade commented Mar 29, 2017

On the additional comments:

  • TODOs, no strong feelings
  • v1, it's fairly common to see use this convention but also no strong feelings
  • Docs, yup, no really great solution within the current qiita ecosystem as numpydoc doesn't lend itself properly and the endpoints are detached from the handler logic anyway. Would you be okay with docstrings off the handlers? @ElDeveloper and I came up with a possible solution which places the endpoint definition in proximity to the handler logic, but we opted to not include it in this PR as its scope really ought to be much larger than just these endpoints.
  • name-spaced: the names of the handlers on import in webserver.py, although we can keep them as is...
  • authentication: an API key mechanism would be fantastic. At this point, I do not believe qiita has privilege granularity over the keys though, so an API key I believe grants full access.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling e460390 on ElDeveloper:death-march into ** on biocore:master**.

Copy link
Member

@antgonza antgonza left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! I think it will be good for @josenavas to take a look.

  • I think issues for the TODOs will be good to add.
  • It makes me really nervous to see v1 cause in my head it means that we expect v2.
  • keys: right, it will give full access to that user, with their given privileges. In other words, I think this is fine as that specific key will give access to the user to those things that it has access to. We can always, regenerate keys based on user request or based on abuse(?)

efo = payload['efo']
contacts = payload['contacts']

if Study.exists(title):
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking in getting the warnings like this, unknown principal investigator, lab person etc all at once vs. each test by itself.

pid = prep.id
art = prep.artifact is not None
# TODO: unclear how to test for warnings on the preparations as
# it requires knowledge of the preparation type. It is possible
Copy link
Member

Choose a reason for hiding this comment

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

Got it! Depending on the data_type is how the validation happen. One simply option is to return all the validations avaialble? Not pretty but this will allow us to test and figure out a better solution. Other option will be to force the user to pass that, I guess a similar issue than artifact_type/id. BTW I think this is important cause the first use case will be either target gene or shotgun sequencing.

prepid = json_decode(response.body)['id']

uri = '/api/v1/study/1/preparation/%d/artifact' % prepid
# 1 -> fwd or rev sequences in fastq
Copy link
Member

Choose a reason for hiding this comment

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

Agree, perhaps next step if this is done? @josenavas, what do you think?

@wasade
Copy link
Contributor

wasade commented Mar 29, 2017 via email

@antgonza
Copy link
Member

Yes, that's how it currently is. Sorry for not being clear. When I said: "(part of your user info page)" I meant extend that functionality so each user has its own.

Copy link
Contributor

@josenavas josenavas left a comment

Choose a reason for hiding this comment

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

I thought I submitted my review earlier but apparently I never did! I have some comments in the code directly and some here in general:

  • I agree with @antgonza to add the TODO's as issues, and link to the issue in the code - in the past helped a lot to keep track on what to focus effort.
  • I agree on using v1 but it is not set in stone until we do the actual release of Qiita. We can use it as @antgonza is suggesting (i.e. development version) but it naturally help us to set a correct structure for the future in case that at some point we really need to change the interface. It doesn't harm anything right now and it has a lot of benefits.
  • Documentation: I think having what you currently put in the issue description as documentation is a great start. It is the simplest thing to do right now (you already have it written) and we can create an issue to improve/automatically generate it - but it shouldn't be a blocker right now.
  • Per-user authentication: it needs DB modifications to link a user with a specific client id/secret pair. Not hard to do, but time consuming and outside of the scope of this work. I would add an issue and fix later.
  • Re study status. Not sure either - but it can expanded as we use it until we decide to do a release.

WHERE name = %s
AND affiliation = %s""".format(cls._table)
qdb.sql_connection.TRN.add(sql, [name, affiliation])
return cls(int(qdb.sql_connection.TRN.execute_fetchlast()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the specific cast to int needed? The object returned should be an int if the column study_person_id is a bigserial.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great point, not sure where this came from, fixed!



class RESTHandler(BaseHandler):
def fail(self, msg, status):
Copy link
Contributor

Choose a reason for hiding this comment

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

@wasade @ElDeveloper What about using this? It is still not in master but I think it would be easy to port here.

Basically, instead of calling fail, you raise an error and let the normal tornado error handling to return the value. The error message, instead of going in the body as it is going here, it will go in a header.

It also has the advantage that it will stop the execution of the handler, so you can remove these type of if statements.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds like a great idea! The reason why we had been putting the error message in the body is because we were modeling the API's etiquette after GitHub's API, where they always return either the data or a dictionary with just a message, and they even return a link to their API's documentation. So what about modifying QiitaHTTPError to write the message to the body?

Just for a reference, this is how it looks when you use curl to pull some data and the request fails:

(qiita)yoshikivazquezbaeza:qiita@death-march$ curl -ik 'https://127.0.0.1:21174/api/v1/person?name=LabDude&affiliation=knight%20lab2'
HTTP/1.1 404 Not Found
Date: Thu, 30 Mar 2017 17:59:45 GMT
Content-Length: 31
Content-Type: application/json; charset=UTF-8
Server: TornadoServer/3.1.1

{"message": "Person not found"}

Thinking more, should we be logging these errors into the database, or is the Tornado logging sufficient?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm unsure if you are going to be able to modify the QiitaHTTPError to write the message in the body (is not a handler class so I'm unsure on how tornado is handling that internally). It may be worth testing how the current status of the QiitaHTTPError shows when using curl.

I don't think registering these errors in the DB is needed as these are misuses of the API and generally user generated. That would be an easy way of blowing up the size of our database.

self.set_status(status)
self.finish()

def study_boilerplate(self, study_id):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a better name for this function? Something like safe_get_study or something like this? I can also foresee these type of functions appearing for other objects so it would be great to have a standard way of naming these functions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, I've renamed the method to safe_get_study.

'study_abstract': info['study_abstract'],
'study_description': info['study_description'],
'study_alias': info['study_alias'],
'efo': study.efo})
Copy link
Contributor

Choose a reason for hiding this comment

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

i will not expose the efo. We are not really using it and it should disappear. (It is not exposed anywhere else in the GUI for example)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, I've just removed this.

efo = payload['efo']
contacts = payload['contacts']

if Study.exists(title):
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @antgonza - it would be better to check the 3 things (study, PI and lab person) and return all errors at once - otherwise it becomes an iterative process to find all the errors.

categories = categories.split(',')

if study.sample_template is None:
self.fail('Category not found', 404)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this error be something like Study %s doesn't have sample information?

Copy link
Member Author

Choose a reason for hiding this comment

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

The ID is already implied in the URI itself, so it seems a bit redundant. Also, after modeling from GitHub's API, none of their messages seemed to imply any specific information about the requested resource, they were succinct and generic.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was just thinking on differentiating this error from the one below

Copy link
Member Author

Choose a reason for hiding this comment

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

Great point, fixed.


available_categories = set(study.sample_template.categories())
if not set(categories).issubset(available_categories):
self.fail('Category not found', 404)
Copy link
Contributor

Choose a reason for hiding this comment

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

What about sending back the categories that were not found?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe as an additional attribute? The response would be something like:

{'message': 'category not found', 'categories_not_found': ['foo', 'bar', 'baz']}

Copy link
Contributor

Choose a reason for hiding this comment

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

that sounds good!

Copy link
Member Author

Choose a reason for hiding this comment

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

Great, fixed!

prepid = json_decode(response.body)['id']

uri = '/api/v1/study/1/preparation/%d/artifact' % prepid
# 1 -> fwd or rev sequences in fastq
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think passing the ids is required. IIRC you can pass the actual string and the code internally will change to the ID. So instead of 3 you can pass 'raw_barcodes'

@@ -57,6 +57,16 @@
ReloadPluginAPItestHandler)
from qiita_pet import uimodules
from qiita_db.util import get_mountpoint
from qiita_pet.handlers.rest import (
StudyHandler as WeDontKnowWhatToCallThis,
Copy link
Contributor

Choose a reason for hiding this comment

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

What about prefixing all the handlers with API or REST? It will avoid collisions with anything else and it will be clear that is part of the rest api

Copy link
Member Author

Choose a reason for hiding this comment

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

We've put all these under a constant, this avoids the namespace collisions :) we think this is better.

Copy link
Contributor

Choose a reason for hiding this comment

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

🍻 I think that is an awesome solution! Never though about that and it is superclean!

class StudyCreatorHandler(RESTHandler):

@authenticate_oauth
def post(self, *args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we expecting any args/kwargs in here? If not, why having them here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed 👍

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9f528ea on ElDeveloper:death-march into ** on biocore:master**.

@ElDeveloper
Copy link
Member Author

I believe all comments should be addressed, we've added a minimal documentation block in the Qiita dev docs.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling e970392 on ElDeveloper:death-march into ** on biocore:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 133b9f8 on ElDeveloper:death-march into ** on biocore:master**.

@antgonza antgonza merged commit 8f6d193 into qiita-spots:master Mar 30, 2017
@ElDeveloper
Copy link
Member Author

ElDeveloper commented Mar 30, 2017 via email

antgonza pushed a commit that referenced this pull request Jun 1, 2017
* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1805

* adding button

* fix errors

* fix #1816

* fixing failures tests

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* init commit

* fixing errors

* fixing errors due to update

* Making the download work

* Fixing tests

* working status

* adding tags, the right way!

* fix error

* Addressing @antgonza's comments

* Adding missing test

* Ignoring tgz - thanks @antgonza

* addressing @josenavas comments

* list study tags

* fix error

* adding tags to public

* adding docs

* addressing @wasade comment

* addressing @josenavas and @wasade comments

* addressing @wasade request

* fix #2091

* option 2: @ElDeveloper and @josenavas

* A minimal REST API for Qiita (#2094)

* TST: Add initial test cases for study handler

* ENH: Add initial study rest api

* API: test if a study exists

* ENH: oauth2 forced

* Get back basic study deets

* TST: test for samples collection

* API: rest get sample IDs from a study

* ENH: samples/info handler

* broken routes

* API: request sample metadata

* ENH/API: Add methods to check for a study person

* ENH/API: Add POST methods for study person

* TST: Add tests for from_name_and_affiliation

* TST: study creation

* BUG: Add headers to tests

* ENH: create study

* Adjust GET on study description

* API: Add endpoints for preparation creation

* TST: 200 :D

* TST: Correctly verify study instantiation

* TST: prep artifact creation

* ENH/API: associate artifacts with a preparation

* TST: test study statys

* ENH: study status

* Removed trailing whitespace

* STY: PEP8

* MAINT: refactor, centralize setup boilerplate

* REFACTOR: Remove repeated code

* DOC: Remove unnecessary comments

* REFACTOR: Missing removal of pattern

* STY: Fix PEP8 errors

* BUG: Incorrectly changed error code

* BUG/TST: Fix typo in tests

* Addressing an @antgonza comment

* Another @antgonza comment

* RVW: Address review comments

* ENH: Cleanup webserver and name-spaces

* ENH: Improve error messages

* ENH: Add more descriptive error message

* TST: Exercise different argument types

* DOC: Add documentation for REST API

* ENH: Remove extra comma

* ENH/DOC: update/add samples to sample information via rest (#2097)

* Changing how artifact visibility works (#2098)

* changing how artifact visibility works

* fixing code

* fix errors

* fixing edit check access

* fix

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* download raw data

* adding missing empty files

* Adding endpoint to retrieve list of person (#2103)

* Adding missing endpoint

* Addressing @ElDeveloper comment

* fix #2086 (#2102)

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* addressing @wasade comments and fix errors

* fix error?

* rm vfabu + addressing @wasade and @josenavas comments + fix errors

* just being dumb!

* Deblur quality mention (#2107)

* Revised rst values used for section headers (#2108)

* Adding processing handlers

* Fixing latlongs (#2120)

* public studies are being shown in the user own studies

* fix #2069 - adding tests

* flake8

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Improving study list speed (#2123)

* init commit

* reading if ...

* fixing tests

* rethinking listint

* split SQL

* reseting sql

* ignoring prep_total_samples

* finishing changes

* adding comment: @ElDeveloper

* adding message: @josenavas

* addressing @ElDeveloper, @josenavas @jdereus comments

* fixing download buttons show (#2127)

* fixing download buttons show

* addressing @ElDeveloper comment

* connecting tutorials to CMI

* adding link in main page

* fixing prep getting-started

* mv complex designs

* fix idents

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* limiting number of jobs retrieved

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Enabling arbitrary htmls in the summary

* Prepping for merge hell

* Addressing @wasade's comments

* Addressing @antgonza's comment
antgonza pushed a commit that referenced this pull request Jun 1, 2017
* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1805

* adding button

* fix errors

* fix #1816

* fixing failures tests

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* fixing timestamp

* rm formats

* st -> pt

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* fixing private/public studies

* sanbox-to-sandbox

* flake8

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* init commit

* fixing errors

* fixing errors due to update

* Making the download work

* Fixing tests

* working status

* adding tags, the right way!

* fix error

* Addressing @antgonza's comments

* Adding missing test

* Ignoring tgz - thanks @antgonza

* addressing @josenavas comments

* list study tags

* fix error

* adding tags to public

* adding docs

* addressing @wasade comment

* addressing @josenavas and @wasade comments

* addressing @wasade request

* fix #2091

* option 2: @ElDeveloper and @josenavas

* A minimal REST API for Qiita (#2094)

* TST: Add initial test cases for study handler

* ENH: Add initial study rest api

* API: test if a study exists

* ENH: oauth2 forced

* Get back basic study deets

* TST: test for samples collection

* API: rest get sample IDs from a study

* ENH: samples/info handler

* broken routes

* API: request sample metadata

* ENH/API: Add methods to check for a study person

* ENH/API: Add POST methods for study person

* TST: Add tests for from_name_and_affiliation

* TST: study creation

* BUG: Add headers to tests

* ENH: create study

* Adjust GET on study description

* API: Add endpoints for preparation creation

* TST: 200 :D

* TST: Correctly verify study instantiation

* TST: prep artifact creation

* ENH/API: associate artifacts with a preparation

* TST: test study statys

* ENH: study status

* Removed trailing whitespace

* STY: PEP8

* MAINT: refactor, centralize setup boilerplate

* REFACTOR: Remove repeated code

* DOC: Remove unnecessary comments

* REFACTOR: Missing removal of pattern

* STY: Fix PEP8 errors

* BUG: Incorrectly changed error code

* BUG/TST: Fix typo in tests

* Addressing an @antgonza comment

* Another @antgonza comment

* RVW: Address review comments

* ENH: Cleanup webserver and name-spaces

* ENH: Improve error messages

* ENH: Add more descriptive error message

* TST: Exercise different argument types

* DOC: Add documentation for REST API

* ENH: Remove extra comma

* ENH/DOC: update/add samples to sample information via rest (#2097)

* Changing how artifact visibility works (#2098)

* changing how artifact visibility works

* fixing code

* fix errors

* fixing edit check access

* fix

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* download raw data

* adding missing empty files

* Adding endpoint to retrieve list of person (#2103)

* Adding missing endpoint

* Addressing @ElDeveloper comment

* fix #2086 (#2102)

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* addressing @wasade comments and fix errors

* fix error?

* rm vfabu + addressing @wasade and @josenavas comments + fix errors

* just being dumb!

* Deblur quality mention (#2107)

* Revised rst values used for section headers (#2108)

* Fixing latlongs (#2120)

* public studies are being shown in the user own studies

* fix #2069 - adding tests

* flake8

* Improving study list speed (#2123)

* init commit

* reading if ...

* fixing tests

* rethinking listint

* split SQL

* reseting sql

* ignoring prep_total_samples

* finishing changes

* adding comment: @ElDeveloper

* adding message: @josenavas

* addressing @ElDeveloper, @josenavas @jdereus comments

* fixing download buttons show (#2127)

* fixing download buttons show

* addressing @ElDeveloper comment

* connecting tutorials to CMI

* adding link in main page

* fixing prep getting-started

* mv complex designs

* fix idents

* limiting number of jobs retrieved
antgonza pushed a commit that referenced this pull request Jul 21, 2017
* Analysis refactor db (#2040)

* New DB structure

* Adding python patch

* Adding a biom so we can actually execute the patch

* Fixing the patch to correctly transfer the information from the old structure to the new one

* Fixing patch

* Fixing patch and a few other bits to make the patch run successfully

* These files are no longer needed

* Droping analysis status table

* Linking the analysis with all the artifacts

* Fixing typo

* Fixing HTML and dbschema files

* Adding analyisis jobs

* Adding logging column to the analysis

* Addressing @antgonza's comments

* Taking into account non-phylogenetic metrics in beta diversity

* Analysis refactor fix analysis (#2044)

* New DB structure

* Adding python patch

* Adding a biom so we can actually execute the patch

* Fixing the patch to correctly transfer the information from the old structure to the new one

* Fixing patch

* Fixing patch and a few other bits to make the patch run successfully

* These files are no longer needed

* Removing unused code

* Droping analysis status table

* Linking the analysis with all the artifacts

* Fixing typo

* Fixing HTML and dbschema files

* Adding analyisis jobs

* Extending the artifact to work with the analysis

* Allowing multiomics datatype

* Adding private_job_submitter and modifying proc job handler to use it

* Adding logging column to the analysis

* Adding datatype to the analysis-processing job table

* Adding REST endpoint to access the analysis metadata

* Adding private jobs to plugin

* Fixing typo

* Fixing the processing jobs complete

* Addressing @antgonza's comments

* Taking into account non-phylogenetic metrics in beta diversity

* Addressing @antgonza's comments

* Addressing @ElDeveloper's comments

* Remove old job code (#2045)

* New DB structure

* Adding python patch

* Adding a biom so we can actually execute the patch

* Fixing the patch to correctly transfer the information from the old structure to the new one

* Fixing patch

* Fixing patch and a few other bits to make the patch run successfully

* These files are no longer needed

* Removing unused code

* Droping analysis status table

* Linking the analysis with all the artifacts

* Fixing typo

* Fixing HTML and dbschema files

* Adding analyisis jobs

* Extending the artifact to work with the analysis

* Allowing multiomics datatype

* Adding private_job_submitter and modifying proc job handler to use it

* Adding logging column to the analysis

* Adding datatype to the analysis-processing job table

* Adding REST endpoint to access the analysis metadata

* Adding private jobs to plugin

* Fixing typo

* Fixing the processing jobs complete

* Removing the old job code

* Oops removed the wrong file

* Addressing @antgonza's comments

* Taking into account non-phylogenetic metrics in beta diversity

* Addressing @antgonza's comments

* Fixes Qiita db (#2046)

* New DB structure

* Adding python patch

* Adding a biom so we can actually execute the patch

* Fixing the patch to correctly transfer the information from the old structure to the new one

* Fixing patch

* Fixing patch and a few other bits to make the patch run successfully

* These files are no longer needed

* Removing unused code

* Droping analysis status table

* Linking the analysis with all the artifacts

* Fixing typo

* Fixing HTML and dbschema files

* Adding analyisis jobs

* Extending the artifact to work with the analysis

* Allowing multiomics datatype

* Adding private_job_submitter and modifying proc job handler to use it

* Adding logging column to the analysis

* Adding datatype to the analysis-processing job table

* Adding REST endpoint to access the analysis metadata

* Adding private jobs to plugin

* Fixing typo

* Fixing the processing jobs complete

* Removing the old job code

* Oops removed the wrong file

* Removing QiitaStatusObject because it is not used

* fixing metautil

* Fixing porntal, setup and sql tests

* Fixing user and util

* Fixing qiita_db

* Addressing @antgonza's comments

* Taking into account non-phylogenetic metrics in beta diversity

* Addressing @antgonza's comments

* Analysis refactor master (#2070)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* New DB structure

* Adding python patch

* Adding a biom so we can actually execute the patch

* Fixing the patch to correctly transfer the information from the old structure to the new one

* Fixing patch

* Fixing patch and a few other bits to make the patch run successfully

* These files are no longer needed

* Removing unused code

* Droping analysis status table

* Linking the analysis with all the artifacts

* Fixing typo

* Fixing HTML and dbschema files

* Adding analyisis jobs

* Extending the artifact to work with the analysis

* Allowing multiomics datatype

* Adding private_job_submitter and modifying proc job handler to use it

* Adding logging column to the analysis

* Adding datatype to the analysis-processing job table

* Adding REST endpoint to access the analysis metadata

* Adding private jobs to plugin

* Fixing typo

* Fixing the processing jobs complete

* Removing the old job code

* Oops removed the wrong file

* Removing QiitaStatusObject because it is not used

* fixing metautil

* Fixing porntal, setup and sql tests

* Fixing user and util

* Fixing qiita_db

* fix #1987

* Updating to master

* Addressing @antgonza's comments

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* Taking into account non-phylogenetic metrics in beta diversity

* fix #1959

* Addressing @antgonza's comments

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* Actually fixing merge conflicts

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* Sync-ing with master (again) (#2073)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Fix qiita ware (#2074)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* Analysis refactor GUI part1 (#2076)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Addressing @antgonza's comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* Analysis refactor GUI part2 (#2077)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Removing unused code

* Changing bdiv metrics to single choice

* Fixing patch

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* Analysis refactor gui part3 (#2078)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Fixing typo

* Addressing @antgonza's comments

* Addressing @antgonza's comments

* Analysis refactor gui part4 (#2079)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Analysis refactor gui part5 (#2115)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* Changing bdiv metrics to single choice

* Fixing patch

* Various small fixes to be able to run tests on the plugins

* Addressing @antgonza's comments

* Analysis refactor gui part6 (#2116)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Solving merge conflicts

* Adding processing handlers

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* Analysis refactor gui part7 (#2117)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* Adding processing handlers

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Enabling arbitrary htmls in the summary

* Prepping for merge hell

* Addressing @wasade's comments

* Fixing qiita_db tests

* Analysis refactor allow users change dflt params (#2136)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* Adding processing handlers

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Addressing @wasade's comments

* Addressing @antgonza's comment

* Solving a few more tests

* Arbitrary summary HTML (#2138)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1816

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* Adding processing handlers

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Enabling arbitrary htmls in the summary

* Addressing @wasade's comments

* Addressing @antgonza's comment

* Analysis refactor sync with master - DEPENDS ON #2138 (#2139)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1805

* adding button

* fix errors

* fix #1816

* fixing failures tests

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* fixing timestamp

* rm formats

* st -> pt

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* fixing private/public studies

* Changing bdiv metrics to single choice

* sanbox-to-sandbox

* flake8

* Fixing patch

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* init commit

* fixing errors

* fixing errors due to update

* Making the download work

* Fixing tests

* working status

* adding tags, the right way!

* fix error

* Addressing @antgonza's comments

* Adding missing test

* Ignoring tgz - thanks @antgonza

* addressing @josenavas comments

* list study tags

* fix error

* adding tags to public

* adding docs

* addressing @wasade comment

* addressing @josenavas and @wasade comments

* addressing @wasade request

* fix #2091

* option 2: @ElDeveloper and @josenavas

* A minimal REST API for Qiita (#2094)

* TST: Add initial test cases for study handler

* ENH: Add initial study rest api

* API: test if a study exists

* ENH: oauth2 forced

* Get back basic study deets

* TST: test for samples collection

* API: rest get sample IDs from a study

* ENH: samples/info handler

* broken routes

* API: request sample metadata

* ENH/API: Add methods to check for a study person

* ENH/API: Add POST methods for study person

* TST: Add tests for from_name_and_affiliation

* TST: study creation

* BUG: Add headers to tests

* ENH: create study

* Adjust GET on study description

* API: Add endpoints for preparation creation

* TST: 200 :D

* TST: Correctly verify study instantiation

* TST: prep artifact creation

* ENH/API: associate artifacts with a preparation

* TST: test study statys

* ENH: study status

* Removed trailing whitespace

* STY: PEP8

* MAINT: refactor, centralize setup boilerplate

* REFACTOR: Remove repeated code

* DOC: Remove unnecessary comments

* REFACTOR: Missing removal of pattern

* STY: Fix PEP8 errors

* BUG: Incorrectly changed error code

* BUG/TST: Fix typo in tests

* Addressing an @antgonza comment

* Another @antgonza comment

* RVW: Address review comments

* ENH: Cleanup webserver and name-spaces

* ENH: Improve error messages

* ENH: Add more descriptive error message

* TST: Exercise different argument types

* DOC: Add documentation for REST API

* ENH: Remove extra comma

* ENH/DOC: update/add samples to sample information via rest (#2097)

* Changing how artifact visibility works (#2098)

* changing how artifact visibility works

* fixing code

* fix errors

* fixing edit check access

* fix

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* download raw data

* adding missing empty files

* Adding endpoint to retrieve list of person (#2103)

* Adding missing endpoint

* Addressing @ElDeveloper comment

* fix #2086 (#2102)

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* addressing @wasade comments and fix errors

* fix error?

* rm vfabu + addressing @wasade and @josenavas comments + fix errors

* just being dumb!

* Deblur quality mention (#2107)

* Revised rst values used for section headers (#2108)

* Adding processing handlers

* Fixing latlongs (#2120)

* public studies are being shown in the user own studies

* fix #2069 - adding tests

* flake8

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Improving study list speed (#2123)

* init commit

* reading if ...

* fixing tests

* rethinking listint

* split SQL

* reseting sql

* ignoring prep_total_samples

* finishing changes

* adding comment: @ElDeveloper

* adding message: @josenavas

* addressing @ElDeveloper, @josenavas @jdereus comments

* fixing download buttons show (#2127)

* fixing download buttons show

* addressing @ElDeveloper comment

* connecting tutorials to CMI

* adding link in main page

* fixing prep getting-started

* mv complex designs

* fix idents

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* limiting number of jobs retrieved

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Enabling arbitrary htmls in the summary

* Prepping for merge hell

* Addressing @wasade's comments

* Addressing @antgonza's comment

* Moving tests around and deleting unused code

* Analysis refactor sync w master 2 (#2141)

* fix #1505

* improving some GUI stuff

* improving some GUI stuff - missing lines

* addressing all comments

* ready for review

* fix #1987

* initial commit

* requested changes

* fix filter job list

* Fixing server cert (#2051)

* fix get_studies

* flake8

* fix #503

* fix #2010

* fix #1913

* fix errors

* addressing @josenavas comment

* flake8

* fix #1010

* fix #1066 (#2058)

* addressing @josenavas comments

* fix #1961

* fix #1837

* Automatic jobs & new stats (#2057)

* fix #814, fix #1636

* fixing error in test-env

* fixing stats.html call

* adding img

* addressing @josenavas comments

* rm for loops

* addresssing @ElDeveloper comments

* generalizing this functionality

* fix #1805

* adding button

* fix errors

* fix #1816

* fixing failures tests

* fix #1959

* addressing @josenavas comments

* addressing @josenavas comments

* fixing error

* fixed?

* addressing @josenavas comments

* addressing @wasade comments

* fix flake8

* generate biom and metadata release (#2066)

* initial commit

* adding portal

* addressing @josenavas comments

* pid -> qiita_artifact_id

* addressing @josenavas comments

* addressing @ElDeveloper comments

* rm 50.sql

* database changes to fix 969

* adding delete

* addressing @josenavas comments

* addressing @ElDeveloper comments

* duh!

* fix generate_biom_and_metadata_release (#2072)

* fix generate_biom_and_metadata_release

* addressing @ElDeveloper comment

* fixing timestamp

* rm formats

* st -> pt

* moving to ISO 8601 - wow :'(

* fix errors

* addressing @wasade comments

* fixing private/public studies

* sanbox-to-sandbox

* flake8

* fixing other issues

* adding share documentation

* psycopg2 <= 2.7

* psycopg2 < 2.7

* init commit

* fixing errors

* fixing errors due to update

* Making the download work

* Fixing tests

* working status

* adding tags, the right way!

* fix error

* Addressing @antgonza's comments

* Adding missing test

* Ignoring tgz - thanks @antgonza

* addressing @josenavas comments

* list study tags

* fix error

* adding tags to public

* adding docs

* addressing @wasade comment

* addressing @josenavas and @wasade comments

* addressing @wasade request

* fix #2091

* option 2: @ElDeveloper and @josenavas

* A minimal REST API for Qiita (#2094)

* TST: Add initial test cases for study handler

* ENH: Add initial study rest api

* API: test if a study exists

* ENH: oauth2 forced

* Get back basic study deets

* TST: test for samples collection

* API: rest get sample IDs from a study

* ENH: samples/info handler

* broken routes

* API: request sample metadata

* ENH/API: Add methods to check for a study person

* ENH/API: Add POST methods for study person

* TST: Add tests for from_name_and_affiliation

* TST: study creation

* BUG: Add headers to tests

* ENH: create study

* Adjust GET on study description

* API: Add endpoints for preparation creation

* TST: 200 :D

* TST: Correctly verify study instantiation

* TST: prep artifact creation

* ENH/API: associate artifacts with a preparation

* TST: test study statys

* ENH: study status

* Removed trailing whitespace

* STY: PEP8

* MAINT: refactor, centralize setup boilerplate

* REFACTOR: Remove repeated code

* DOC: Remove unnecessary comments

* REFACTOR: Missing removal of pattern

* STY: Fix PEP8 errors

* BUG: Incorrectly changed error code

* BUG/TST: Fix typo in tests

* Addressing an @antgonza comment

* Another @antgonza comment

* RVW: Address review comments

* ENH: Cleanup webserver and name-spaces

* ENH: Improve error messages

* ENH: Add more descriptive error message

* TST: Exercise different argument types

* DOC: Add documentation for REST API

* ENH: Remove extra comma

* ENH/DOC: update/add samples to sample information via rest (#2097)

* Changing how artifact visibility works (#2098)

* changing how artifact visibility works

* fixing code

* fix errors

* fixing edit check access

* fix

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* download raw data

* adding missing empty files

* Adding endpoint to retrieve list of person (#2103)

* Adding missing endpoint

* Addressing @ElDeveloper comment

* fix #2086 (#2102)

* fix #2086

* flak8

* addressing @ElDeveloper comments + fixes

* adding the final changes

* fix failures

* get_qiita_version -> generate_biom_and_metadata_release

* addressing @wasade comments and fix errors

* fix error?

* rm vfabu + addressing @wasade and @josenavas comments + fix errors

* just being dumb!

* Deblur quality mention (#2107)

* Revised rst values used for section headers (#2108)

* Fixing latlongs (#2120)

* public studies are being shown in the user own studies

* fix #2069 - adding tests

* flake8

* Improving study list speed (#2123)

* init commit

* reading if ...

* fixing tests

* rethinking listint

* split SQL

* reseting sql

* ignoring prep_total_samples

* finishing changes

* adding comment: @ElDeveloper

* adding message: @josenavas

* addressing @ElDeveloper, @josenavas @jdereus comments

* fixing download buttons show (#2127)

* fixing download buttons show

* addressing @ElDeveloper comment

* connecting tutorials to CMI

* adding link in main page

* fixing prep getting-started

* mv complex designs

* fix idents

* limiting number of jobs retrieved

* Deleting unused code

* Fixing travis

* Flake8-ing

* Fixing travis

* Removing unused code

* Trying one thing on travis

* Trying one thing on travis

* Trying to debug

* Still debugging

* ...

* Config biom plugin

* Creating the dir

* Speed up server by not building the docs

* More playing with travis

* Fixing config file

* Trying with a diff conf file

* Fixing path

* Adding a print to see the error

* Adding another print

* Removing debugging bits

* Runnning webserver only if running tests

* Fixing last failing errors

* Removing debugging bits

* Fixing tests

* fixing config

* Fixing stochastic tests

* Fixing tests (#2142)

* Removing qiita ware code that will not be used anymore

* Organizing the handlers and new analysis description page

* Connecting the analysis creation and making interface responsive

* Addressing @antgonza's comments

* Initial artifact GUI refactor

* Removing unused code

* Adding can_edit call to the analysis

* Fixing artifact rest API since not all artifacts have study

* Adding can_be_publicized call to analysis

* Adding QiitaHTTPError to handle errors gracefully

* Adding safe_execution contextmanager

* Fixing typo

* Adding qiita test checker

* Adapting some artifact handlers

* Abstracting the graph reloading and adding some documentation

* Fixing typo

* Fixing changing artifact visibility

* Fixing delete

* Fixing artifact deletion

* Adding default parameters to the commands

* Fixing processing page

* Fixing variable name

* Changing bdiv metrics to single choice

* Fixing patch

* Various small fixes to be able to run tests on the plugins

* Adding private module

* Fixing processing job completion

* Fixing patch 52

* Fixing call

* Fixing complete

* small fixes

* Adding processing handlers

* Fixing url and bug on processing job workflow

* Adding the private script runner

* Adding is_analysis column to the command

* Adding retrieval of commands excluding analysis commands

* Addressing bug on retrieving information from redis

* Enabling the command register endpoint to provide if the command is analysis only

* Addressing @antgonza's comments

* Addressing @wasade's comments

* Supporting multiple choice

* Adding documentation

* Modifying handler to pass allow_change_optionals

* returning optional parameters

* Addressing bug found by @antgonza

* Enabling changing the default parameters

* Adding correct class

* Allowing user to change default parameters

* Fixing bug with commands listing

* Enabling arbitrary htmls in the summary

* Prepping for merge hell

* Addressing @wasade's comments

* Fixing qiita_db tests

* Addressing @antgonza's comment

* Solving a few more tests

* Moving tests around and deleting unused code

* Deleting unused code

* Fixing travis

* Flake8-ing

* Fixing travis

* Removing unused code

* Trying one thing on travis

* Trying one thing on travis

* Trying to debug

* Still debugging

* ...

* Config biom plugin

* Creating the dir

* Speed up server by not building the docs

* More playing with travis

* Fixing config file

* Trying with a diff conf file

* Fixing path

* Adding a print to see the error

* Adding another print

* Removing debugging bits

* Runnning webserver only if running tests

* Fixing last failing errors

* Removing debugging bits

* Fixing tests

* fixing config

* Fixing stochastic tests

* Extending post test call to accept analysis

* Extending post test call to accept analysis (#2144)

* some minor fixes

* adding timer

* nose-timer to pip command

* nose-timer to pip command

* active_children test

* improving study listing // artifact info

* adding code to both list

* fix js length

* 300000

* multiprocessing->active_children

* 2400000

* 600000

* Trying to fix the tests

* Submit the job on commit

* Reverting last change

* improving sql and display

* improving sql

* adding some of the requested improvements

* addressing comments

* addressing @ElDeveloper and @wasade comments

* Registering commands after updating plugins (#2156)

* Adding codecov (#2157)

* Testing codecov for speeding up tests

* Fixing test

* Fixing ware test

* Adding codecov badge

* Removing coveralls

* Trying to fix the failing test

* Expand html summary setter (#2150)

* Changing the HTML setter to add support dirs

* Extending the patch operation

* Fixing remaining calls to html_summary_fp set

* Fixing test

* Deleting unused function

* Removing unused import

* Fixing tests

* Fixing failing test

* Fix artifact type creation (#2158)

* Changing the HTML setter to add support dirs

* Extending the patch operation

* Fixing remaining calls to html_summary_fp set

* Fixing test

* Deleting unused function

* Removing unused import

* Fixing tests

* Fixing failing test

* Creating the mountpoint of the new type

* Cleaning up patch and fixing bug

* Fixing tests

* Adding analysis to the list of acceptable parameter types

* Adding the provenance parameter automatically

* Adding qzv fileapth type (#2159)

* Adding qzv fileapth type

* Fixing test

* fixing tests

* adding ORDER

* to debug

* splitting the plugin registration

* Analysis refactor misc (#2161)

* Fixing race condition

* Removing unused code and fixing typo

* Hiding job step if success

* Showing loading gif and fixing typo

* fix tests

* to debug

* improving delete speed (#2165)

* improving delete speed

* more sleep!

* fix artifact summary issue (#2163)

* fix artifact summary issue

* sleep

* fixing errors 1

* missing ]

* fix error

* barcode_type 8, defaults

* WIP: using new info to merge bioms (#2167)

* using new info to merge bioms

* fix errors

* flake8

* fix 55.py (#2168)

* fix 55.py

* fixing small bug in test env

* addressing @ElDeveloper comments

* config_test.cfg

* rm /test_data/ from folders

* fixing

* releases

* working_dir/releases

* working_dir/

* Fix analysis artifact name (#2169)

* fix analysis artifact name

* fix analysis artifact name

* params -> md5

* ignoring params and target subfragment

* flake8

* remonving parent_processing

* Improving analysis listing (#2170)

* improving analysis listing

* addressing @ElDeveloper comments

* Improving analysis listing b (#2175)

* improving analysis listing

* addressing @ElDeveloper comments

* adding list artifacts

* changing names

* fixing . -> ,

* only_biom

* actually using only_biom

* sleep

* moving sleep

* import sleep

* sleep(0.8)

* sleep(1)

* addressing @ElDeveloper comments

* flake8

* is_qiita_job

* job_info -> ji

* addressing @ElDeveloper comments

* Fix branch (#2176)

* improving analysis listing

* addressing @ElDeveloper comments

* adding list artifacts

* changing names

* fixing . -> ,

* only_biom

* actually using only_biom

* sleep

* moving sleep

* import sleep

* sleep(0.8)

* sleep(1)

* addressing @ElDeveloper comments

* flake8

* is_qiita_job

* job_info -> ji

* addressing @ElDeveloper comments

* fixing branch
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

5 participants