Skip to content

Commit

Permalink
Merge pull request #1 from johanherman/new-service
Browse files Browse the repository at this point in the history
New service for verifying archive checksums
  • Loading branch information
Stephan Lohse authored Apr 4, 2018
2 parents 695d200 + 6280bcc commit 61672b0
Show file tree
Hide file tree
Showing 16 changed files with 833 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.log
__pycache__
*.swp
*.swo
17 changes: 17 additions & 0 deletions .travis.yml
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

21 changes: 21 additions & 0 deletions Pipfile
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 = "*"
251 changes: 251 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 37 additions & 2 deletions README.md
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>


11 changes: 11 additions & 0 deletions archive-verify-ws
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())
1 change: 1 addition & 0 deletions archive_verify/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.0.0"
Loading

0 comments on commit 61672b0

Please sign in to comment.