diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f46e176 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +models/test-model/empty.bin filter=lfs diff=lfs merge=lfs -text +models filter=lfs diff=lfs merge=lfs -text +models/** filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index f1abc2f..0000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python package - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.5, 3.6, 3.7, 3.8] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/.travis.yml b/.travis.yml index 8764ecd..e8b0c91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ install: - pip install requests invoke cache: pip script: - - true + - python emit.py git: depth: 3 deploy: diff --git a/emit.py b/emit.py new file mode 100644 index 0000000..bea8f07 --- /dev/null +++ b/emit.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +import time +import sys +import os + +from pprint import pprint +pprint(dict(os.environ)) +for i in range(3): + print('.', end='') + sys.stdout.flush() + time.sleep(5) + diff --git a/models/test-model/empty.bin b/models/test-model/empty.bin new file mode 100644 index 0000000..d7df7f8 --- /dev/null +++ b/models/test-model/empty.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13b896d551a100401b0d3982e0729efc2e8d7aeb09a36c0a51e48ec2bd15ea8b +size 5 diff --git a/models/test-model2/empty.bin b/models/test-model2/empty.bin new file mode 100644 index 0000000..d7df7f8 --- /dev/null +++ b/models/test-model2/empty.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13b896d551a100401b0d3982e0729efc2e8d7aeb09a36c0a51e48ec2bd15ea8b +size 5 diff --git a/models/test-model3/empty.bin b/models/test-model3/empty.bin new file mode 100644 index 0000000..d7df7f8 --- /dev/null +++ b/models/test-model3/empty.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13b896d551a100401b0d3982e0729efc2e8d7aeb09a36c0a51e48ec2bd15ea8b +size 5 diff --git a/requirements.txt b/requirements.txt index 43df9f0..4e6f797 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,8 +5,8 @@ gunicorn requests boto3 boto + invoke nose codecov - diff --git a/setup.py b/setup.py index 166bbcd..38daad4 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,17 @@ import subprocess -VERSION = '0.0.1' +git_tag_version = ( + subprocess.check_output("git describe --tags --exact-match", shell=True) + .decode("ascii") + .strip() +) + + +if not re.match(r'^[0-9]+\.[0-9]+\.[0-9]+', git_tag_version): + raise Exception("Invalid git tag version number: %s" % git_tag_version) + +VERSION = git_tag_version