Skip to content

Commit

Permalink
Merge pull request #65 from kbase/develop
Browse files Browse the repository at this point in the history
Merge to release version 1.0.0
  • Loading branch information
briehl authored Feb 19, 2019
2 parents f7cbdd8 + 8dffc2f commit 91889c8
Show file tree
Hide file tree
Showing 137 changed files with 22,586 additions and 37 deletions.
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[run]
omit =
test/*
feeds/biokbase/*
source = feeds

[report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
node_modules/
bower_components/
deploy.cfg
.DS_Store
feeds/gitcommit.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
dist: trusty
sudo: required
language: python
python:
- 3.6
services:
- docker

env:
# - MONGODB_VER=mongodb-linux-x86_64-2.6.12
# - MONGODB_VER=mongodb-linux-x86_64-3.4.16
- MONGODB_VER=mongodb-linux-x86_64-3.6.2

before_install:
- sudo apt-get -qq update
- pip install coveralls

install:
- pip install -r requirements.txt
- pip install -r dev-requirements.txt

script:
- wget https://fastdl.mongodb.org/linux/$MONGODB_VER.tgz
- tar xfz $MONGODB_VER.tgz
- export MONGOD=`pwd`/$MONGODB_VER/bin/mongod
- sed -i "s#^mongo-exe.*#mongo-exe=$MONGOD#" test/test.cfg
- cat test/test.cfg
- make test

after_script:
- coveralls
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM kbase/kb_python:python3

ARG BUILD_DATE
ARG VCS_REF
ARG BRANCH=develop

COPY ./ /kb/module
WORKDIR /kb/module

RUN pip install --upgrade pip setuptools wheel
RUN while read requirement; do conda install --yes $requirement || pip install $requirement; done < /kb/module/requirements.txt

LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/feeds.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1" \
us.kbase.vcs-branch=$BRANCH \
maintainer="Steve Chan sychan@lbl.gov"

ENV KB_DEPLOYMENT_CONFIG=/kb/module/deploy.cfg

ENTRYPOINT [ "/kb/deployment/bin/dockerize" ]
CMD [ "--template", \
"/kb/module/deployment/conf/.templates/deploy.cfg.templ:/kb/module/deploy.cfg" \
"make start" ]
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
GITCOMMIT = $(shell git rev-parse HEAD)

all:
echo "# Don't check this file into git please" > feeds/gitcommit.py
echo 'commit = "$(GITCOMMIT)"' >> feeds/gitcommit.py

install:
pip install -r requirements.txt
pip install -r dev-requirements.txt

docs:
-rm -r docs
-rm -r docsource/internal_apis
mkdir -p docs
sphinx-apidoc --separate -o docsource/internal_apis feeds

test: all
flake8 feeds
# flake8 test
pytest --verbose test --cov=feeds --cov-report html feeds -s

start: all
gunicorn --worker-class gevent --timeout 300 --workers 5 --bind :5000 feeds.server:app

.PHONY: test docs
Loading

0 comments on commit 91889c8

Please sign in to comment.