From 5cde5b449a86c1f26cd3c1917ee679f929aaab28 Mon Sep 17 00:00:00 2001 From: Will LeVine Date: Wed, 14 Oct 2020 15:34:28 -0400 Subject: [PATCH 1/3] Added travis auto PyPi upload on change to main --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index ce134c5db0..dff413f6e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,3 +33,10 @@ script: after_success: - codecov + +deploy: + provider: pypi + username: "__token__" + password: "pypi-AgEIcHlwaS5vcmcCJGExMGU2ZDIwLWZjZjItNDE2OC1hMTAwLTBjMjcwODk0NmVhNgACOnsicGVybWlzc2lvbnMiOiB7InByb2plY3RzIjogWyJwcm9nbGVhcm4iXX0sICJ2ZXJzaW9uIjogMX0AAAYg4-9xmR2nprlOAV7X-Nv6Dkvi6N-WkTBEyTe8WvrWUC0" + on: + branch: main From 1488678dafe8533967a06043f5336614e18460b2 Mon Sep 17 00:00:00 2001 From: Will LeVine Date: Wed, 14 Oct 2020 22:51:22 -0400 Subject: [PATCH 2/3] Update setup.py to look for version --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index 9aa056d51f..6488df4c32 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup, find_packages +import os requirements = [ "keras", @@ -8,6 +9,12 @@ "joblib", ] +# Find mgc version. +PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) +for line in open(os.path.join(PROJECT_PATH, "proglearn", "__init__.py")): + if line.startswith("__version__ = "): + VERSION = line.strip().split()[2][1:-1] + with open("README.md", mode="r", encoding = "utf8") as f: LONG_DESCRIPTION = f.read() From 9e006b031c807bc1aa245bf7e5d6a8e339e04daf Mon Sep 17 00:00:00 2001 From: Will LeVine Date: Wed, 14 Oct 2020 22:51:55 -0400 Subject: [PATCH 3/3] Update __init__ to include version --- proglearn/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proglearn/__init__.py b/proglearn/__init__.py index a97a483d48..1b1275e534 100755 --- a/proglearn/__init__.py +++ b/proglearn/__init__.py @@ -2,3 +2,5 @@ from .transformers import * from .voters import * from .deciders import * + +__version__ = "0.0.1"