From 240f59dc44dcb97c622c95504f2faeb35a802b37 Mon Sep 17 00:00:00 2001 From: John ZuHone Date: Wed, 6 Mar 2024 10:20:02 +0900 Subject: [PATCH] 4.4.0 --- doc/source/changelog.rst | 3 ++- doc/source/conf.py | 4 ++-- doc/source/index.rst | 2 +- pyproject.toml | 13 +++++-------- pyxsim/utils.py | 8 ++++++++ 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 14229558..be562a56 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -3,12 +3,13 @@ ChangeLog ========= -Version 4.3.3 +Version 4.4.0 ------------- This version of pyXSIM contains a bugfix and updates compatibility with other packages. +* Support for Python 3.8 has been dropped. * The minimum required version of yt has been bumped up to 4.3.0. * Cython 3.0 is now supported as a compile-time dependency for those building pyXSIM from source. diff --git a/doc/source/conf.py b/doc/source/conf.py index 5be51b7c..aa6f91c1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -80,9 +80,9 @@ # built documents. # # The short X.Y version. -version = "4.3.3" +version = "4.4.0" # The full version, including alpha/beta/rc tags. -release = "4.3.3" +release = "4.4.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/index.rst b/doc/source/index.rst index 0ae902b1..69cfc89f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -44,7 +44,7 @@ pyXSIM is released under a Current Version --------------- -The current stable version is 4.3.3. See the :ref:`changelog` for details on +The current stable version is 4.4.0. See the :ref:`changelog` for details on changes from previous versions. Table of Contents diff --git a/pyproject.toml b/pyproject.toml index 1249c8dc..f944d18e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,20 +4,17 @@ requires = [ "setuptools_scm[toml]>=6.2", # see https://github.com/numpy/numpy/pull/18389 "wheel>=0.36.2", - - # cython version is imposed by that of numpy, see release notes - # https://github.com/numpy/numpy/releases/tag/v1.19.2 - # Cython 3.0 is the next version after 0.29, and a major change, - # we forbid it until we can properly test against it - "Cython>=0.29.21", - "oldest-supported-numpy", + "Cython>=0.29.21, <3.1", + "numpy>=1.25, <2.0", ] +requires-python = ">=3.9.2" + [tool.setuptools_scm] [tool.black] line-length = 88 -target-version = ['py38'] +target-version = ['py39'] include = '\.pyi?$' exclude = ''' /( diff --git a/pyxsim/utils.py b/pyxsim/utils.py index a859ff2a..7e7184b3 100644 --- a/pyxsim/utils.py +++ b/pyxsim/utils.py @@ -219,10 +219,18 @@ def _metal_field(field, data): def compute_H_abund(abund_table): + if abund_table not in abund_tables: + raise KeyError( + f"Abundance table {abund_table} not found! Options are: {list(abund_tables.keys())}" + ) return atomic_weights[1] / (atomic_weights * abund_tables[abund_table]).sum() def compute_zsolar(abund_table): + if abund_table not in abund_tables: + raise KeyError( + f"Abundance table {abund_table} not found! Options are: {list(abund_tables.keys())}" + ) elems = atomic_weights * abund_tables[abund_table] return elems[3:].sum() / elems.sum()