-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from johanherman/new-service
New service for verifying archive checksums
- Loading branch information
Showing
16 changed files
with
833 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.log | ||
__pycache__ | ||
*.swp | ||
*.swo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
language: python | ||
|
||
python: | ||
- "3.5" | ||
|
||
before_install: | ||
- sudo python -m pip install pipenv | ||
|
||
install: | ||
- pipenv install --dev | ||
|
||
script: | ||
- pipenv run nosetests tests/ | ||
|
||
notifications: | ||
email: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
|
||
[packages] | ||
|
||
aiohttp = "==2.3.7" | ||
rq = "==0.10.0" | ||
aiodns = "==1.1.1" | ||
cchardet = "==2.1.1" | ||
pyyaml = "==3.12" | ||
yarl = "==0.18.0" | ||
|
||
|
||
[dev-packages] | ||
|
||
mock = "*" | ||
nose = "*" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
# snpseq-archive-verify | ||
REST service for verifying uploaded archives | ||
SNPSEQ Archive Verify | ||
================== | ||
|
||
A self contained (aiohttp) REST service that helps verify uploaded SNP&SEQ archives by first downloading the archive from PDC, and then compare the MD5 sums for all associated files. | ||
|
||
The web service enqueues certain job functions in the RQ/Redis queue, where they get picked up by the separate RQ worker process. | ||
|
||
Trying it out | ||
------------- | ||
|
||
python3 -m pip install pipenv | ||
pipenv install --deploy | ||
apt-get install redis-server | ||
|
||
Try running it: | ||
|
||
pipenv run ./archive-verify-ws -c=config/ | ||
pipenv run rq worker | ||
|
||
Running tests | ||
------------- | ||
|
||
pipenv install --dev | ||
pipenv run nosetests tests/ | ||
|
||
REST endpoints | ||
-------------- | ||
|
||
Enqueue a verification job of a specific archive: | ||
|
||
curl -i -X "POST" -d '{"host": "my-host", "description": "my-descr", "archive": "my_001XBC_archive"}' http://localhost:8989/api/1.0/verify | ||
|
||
Check the current status of an enqueued job: | ||
|
||
curl -i -X "GET" http://localhost:8989/api/1.0/status/<job-uuid-returned-from-verify-endpoint> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# -*- coding: utf-8 -*- | ||
import re | ||
import sys | ||
|
||
from archive_verify.app import start | ||
|
||
if __name__ == '__main__': | ||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) | ||
sys.exit(start()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "1.0.0" |
Oops, something went wrong.