From 38d0481d13e9c1a5904f924e46cfff6ac91840e9 Mon Sep 17 00:00:00 2001 From: Joris Vos Date: Wed, 19 Apr 2023 11:02:59 +0200 Subject: [PATCH] New release: v0.2.4 Bugfixes: - fixed the "FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated" issue in interpol.create_pixeltypegrid(). - updated the nonposx and nonposy keyword arguments in plt.set_xscale/plt.set_yscale to nonpositive to match the new versions of matplotlib. - The newest version of corner plot can't display more than 3 quantiles. So If no quantiles are set, we show the default 0.16, 0.5, 0.84 quantiles instead of [0.025, 0.16, 0.5, 0.84, 0.975]. Feature: - More work on batch fits: added support for constraints and code improvements. Not completely finished yet. --- setup.py | 36 ++++++++++++++++++++++++++++++++---- speedyfit/__init__.py | 5 +++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 66f34ac..5d33610 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,32 @@ from setuptools import setup, find_packages +import codecs +import os +import re + + +def read_meta(): + """ + Read the meta information from the nowcast.__init__.py file. Assume UTF-8 encoding. + """ + meta_path = os.path.join("speedyfit", "__init__.py") + with codecs.open(os.path.join(os.path.abspath(os.path.dirname(__file__)), meta_path), "rb", "utf-8") as f: + return f.read() + + +def find_meta(meta): + """ + Extract __*meta*__ from META_FILE. + """ + meta_match = re.search( + r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), + META_FILE, re.M + ) + if meta_match: + return meta_match.group(1) + raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) + + +META_FILE = read_meta() with open("README.md", "r") as fh: long_description = fh.read() @@ -20,10 +48,10 @@ ] setup( name="speedyfit", - version="0.2.3", - author="Joris Vos", - author_email="joris.vos@uv.cl", - description="MC approach to fit photometric SEDs", + version=find_meta("version"), + author=find_meta("author"), + author_email=find_meta("email"), + description=find_meta("description"), long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/vosjo/speedyfit", diff --git a/speedyfit/__init__.py b/speedyfit/__init__.py index e69de29..b0680c4 100644 --- a/speedyfit/__init__.py +++ b/speedyfit/__init__.py @@ -0,0 +1,5 @@ +__version__ = "0.2.4" +__title__ = "speedyfit" +__description__ = "MC approach to fit photometric SEDs" +__author__ = "Joris Vos" +__email__ = "joris.vos@uv.cl" \ No newline at end of file