-
Notifications
You must be signed in to change notification settings - Fork 1
Home
docker build -t isarest:latest .
docker run -d -p 5000:5000 isarest
With Python 3
*Requires: Python 3.4 or 3.5 and isatools
v0.8+ installed via pip
Basically to test directly, make sure you've got the right prerequisites installed:
Run pip install -r requirements.txt
In config.py
set UPLOAD_FOLDER
to somewhere sensible (e.g. /tmp/
- it stores just temporary files for the conversion.
then:
python isarest.py
to start flask's embedded server, and browse.
localhost:5000/api/spec.html
for swagger UI (Swagger documentation not yet complete)
localhost:5000/api/spec.json
for swagger JSON
For deployment to a production Web server, follow this documentation http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/
We have included a simple REST client to go with the service. You can find it in isarest_client
. To use it, you can do something like to convert a ZIP file containing ISA tab files into an ISA JSON file:
from isarest_client import IsaRestClient
client = IsaRestClient(dl_folder='tmp/')
returned_file_path = client.convert_tab_to_json(open('testdata/BII-S-3.zip', 'rb').read())
If all went well, this call should return an absolute path to the returned JSON file in your local file system (inside dl_folder
, in this case tmp/
).
You can also load the project directly into something like PyCharm and play with the tests.py
tests.
Consumes | Produces | Description |
---|---|---|
application/zip |
application/json |
Takes a zip file containing ISA-Tab .txt files, converts and returns a single ISA JSON. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/json |
application/zip |
Takes a ISA-JSON .json files, converts and returns a zip containing ISA-Tab .txt files. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/zip |
application/zip |
Takes a zip file containing ISA tab .txt files, converts and returns a zip containing SRA XML files. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/zip |
application/zip |
Takes a zip file containing ISA JSON file and data files, converts and returns a zip containing SRA XML files. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/zip |
application/json |
Takes a zip file containing a collection of ISA tab .txt files, converts and returns a single CEDAR JSON. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/zip |
application/json |
Takes a zip file containing a collection of ISA tab .txt files, runs the validator, and returns a validation report in JSON. Returns 200 OK if succeeded. |
Consumes | Produces | Description |
---|---|---|
application/json |
application/json |
Takes a ISA JSON file, runs the validator, and returns a validation report in JSON. Returns 200 OK if succeeded. |