From ebc6f034c0a573e92fd720ef8679a165415d5bba Mon Sep 17 00:00:00 2001 From: Gibs Date: Fri, 22 Jul 2022 13:20:48 -0700 Subject: [PATCH] Update to v0.1.0 (#78) --- birdman/__init__.py | 2 ++ setup.py | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/birdman/__init__.py b/birdman/__init__.py index e59c7cb..15e2999 100644 --- a/birdman/__init__.py +++ b/birdman/__init__.py @@ -3,6 +3,8 @@ from .default_models import (NegativeBinomial, NegativeBinomialLME, NegativeBinomialSingle) +__version__ = "0.1.0" + __all__ = ["BaseModel", "TableModel", "SingleFeatureModel", "ModelIterator", "NegativeBinomial", "NegativeBinomialSingle", "NegativeBinomialLME"] diff --git a/setup.py b/setup.py index 45f2b6f..22a03e5 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,16 @@ # Inspired by the EMPress setup.py file +import ast +import re from setuptools import find_packages, setup -__version__ = "0.0.4" +# version parsing from __init__ pulled from Flask's setup.py +# https://github.com/mitsuhiko/flask/blob/master/setup.py +_version_re = re.compile(r"__version__\s+=\s+(.*)") + +with open("birdman/__init__.py", "rb") as f: + hit = _version_re.search(f.read().decode("utf-8")).group(1) + version = str(ast.literal_eval(hit)) + classifiers = """ Development Status :: 3 - Alpha @@ -19,7 +28,7 @@ "inference" ) -with open('README.md') as f: +with open("README.md") as f: long_description = f.read() setup( @@ -30,14 +39,15 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/gibsramen/BIRDMAn", - version=__version__, - license='BSD-3-Clause', + version=version, + license="BSD-3-Clause", packages=find_packages(), include_package_data=True, package_data={"": ["*.stan"]}, install_requires=[ "numpy", "cmdstanpy>=1.0.1", + "scipy", "biom-format", "patsy", "xarray",