From 78cb93df9a7325d762806a406eb675c38fe59770 Mon Sep 17 00:00:00 2001 From: Eric Denovellis Date: Thu, 8 Dec 2022 19:53:05 -0500 Subject: [PATCH] Bump version number --- CITATION.cff | 6 +++--- docs/conf.py | 12 +++++++++--- setup.py | 23 +++++++++++++++++++++-- spectral_connectivity/__init__.py | 2 ++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 6e11c0b..5e3c112 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,7 +1,7 @@ cff-version: 1.1.0 message: "If you use this software, please cite it as below." title: 'Eden-Kramer-Lab/spectral_connectivity' -doi: 10.5281/zenodo.4088934 +doi: 10.5281/zenodo.1011052 authors: - family-names: Eric given-names: Denovellis @@ -19,7 +19,7 @@ authors: orcid: https://orcid.org/0000-0003-1978-9622 title: Eden-Kramer-Lab/spectral_connectivity -version: v1.0.3 -date-released: 2022-09-14 +version: v1.1.0 +date-released: 2022-12-08 repository-code: https://github.com/Eden-Kramer-Lab/spectral_connectivity license: GPL-3.0 diff --git a/docs/conf.py b/docs/conf.py index f15d363..4f5789a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,8 @@ import os import shutil +import re +import spectral_connectivity # -- Project information ----------------------------------------------------- @@ -13,10 +15,14 @@ copyright = "2022, Eric L. Denovellis" author = "Eric L. Denovellis" -# The short X.Y version. -version = "1..0" +# The full version, including alpha/beta/rc tags + +# The short X.Y version (including .devXXXX, rcX, b1 suffixes if present) +version = re.sub(r"(\d+\.\d+)\.\d+(.*)", r"\1\2", spectral_connectivity.__version__) +version = re.sub(r"(\.dev\d+).*?$", r"\1", version) # The full version, including alpha/beta/rc tags. -release = "1.0.4" +release = spectral_connectivity.__version__ +print("%s %s" % (version, release)) # -- General configuration ------------------------------------------------ diff --git a/setup.py b/setup.py index 1689485..3582041 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +import codecs +import os.path + from setuptools import find_packages, setup INSTALL_REQUIRES = [ @@ -10,9 +13,25 @@ ] TESTS_REQUIRE = ["pytest >= 2.7.1", "nitime"] + +def read(rel_path): + here = os.path.abspath(os.path.dirname(__file__)) + with codecs.open(os.path.join(here, rel_path), "r") as fp: + return fp.read() + + +def get_version(rel_path): + for line in read(rel_path).splitlines(): + if line.startswith("__version__"): + delim = '"' if '"' in line else "'" + return line.split(delim)[1] + else: + raise RuntimeError("Unable to find version string.") + + setup( name="spectral_connectivity", - version="1.0.4", + version=get_version("spectral_connectivity/__init__.py"), license="GPL-3.0", description=( "Frequency domain functional and directed" @@ -20,7 +39,7 @@ "data" ), author="Eric Denovellis", - author_email="edeno@bu.edu", + author_email="eric.denovellis@ucsf.edu", url="https://github.com/Eden-Kramer-Lab/spectral_connectivity", # long_description=open("README.md").read(), long_description_content_type="text/x-rst", diff --git a/spectral_connectivity/__init__.py b/spectral_connectivity/__init__.py index 1938606..fbdce46 100644 --- a/spectral_connectivity/__init__.py +++ b/spectral_connectivity/__init__.py @@ -2,3 +2,5 @@ from spectral_connectivity.connectivity import Connectivity from spectral_connectivity.transforms import Multitaper from spectral_connectivity.wrapper import multitaper_connectivity + +__version__ = "1.1.0"