From 71f60ac1afd5942e0981fc98cd3e534c3dc24a78 Mon Sep 17 00:00:00 2001 From: Yue Zhao Date: Mon, 26 Nov 2018 19:51:36 -0500 Subject: [PATCH] Refactor version file --- pyod/version.py | 25 +++++++++++++++++++++++-- setup.py | 7 ++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/pyod/version.py b/pyod/version.py index 2075af889..8fb149d39 100644 --- a/pyod/version.py +++ b/pyod/version.py @@ -1,2 +1,23 @@ -# -*- coding: utf-8 -*- -__version__ = '0.6.3' # pragma: no cover +""" +``pyod`` is a python toolbox for scalable outlier detection +""" +# Based on NiLearn package +# License: simplified BSD + +# PEP0440 compatible formatted version, see: +# https://www.python.org/dev/peps/pep-0440/ +# +# Generic release markers: +# X.Y +# X.Y.Z # For bugfix releases +# +# Admissible pre-release markers: +# X.YaN # Alpha release +# X.YbN # Beta release +# X.YrcN # Release Candidate +# X.Y # Final release +# +# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer. +# 'X.Y.dev0' is the canonical version of 'X.Y.dev' +# +__version__ = '0.6.4' # pragma: no cover diff --git a/setup.py b/setup.py index 8b468c91f..9143eedef 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,14 @@ from os import path from io import open # for Python 2 and 3 compatibility -exec(open(path.join('pyod', 'version.py')).read()) +# get __version__ from _version.py +ver_file = path.join('pyod', 'version.py') +with open(ver_file) as f: + exec(f.read()) + this_directory = path.abspath(path.dirname(__file__)) + def readme(): with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f: return f.read()