diff --git a/crow/__init__.py b/crow/__init__.py index a581f13..72b4e73 100644 --- a/crow/__init__.py +++ b/crow/__init__.py @@ -8,4 +8,4 @@ from .recipes.binned_grid import GridBinnedClusterRecipe from .recipes.binned_parent import BinnedClusterRecipe -__version__ = "0.7.0" +__version__ = "1.0.0" diff --git a/crow/cluster_modules/shear_profile.py b/crow/cluster_modules/shear_profile.py index fc439e8..a886bde 100644 --- a/crow/cluster_modules/shear_profile.py +++ b/crow/cluster_modules/shear_profile.py @@ -87,7 +87,7 @@ def cluster_concentration(self): @cluster_concentration.setter def cluster_concentration(self, value): - if value < 0: + if value is not None and value < 0: value = None self.parameters["cluster_concentration"] = value diff --git a/pyproject.toml b/pyproject.toml index 1baf741..c9328f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "desc-crow" -version = "0.5.2" +dynamic = ["version"] description = "Cluster Reconstruction of Observables Workbench" readme = "README.md" license = "BSD-3-Clause" @@ -47,3 +47,6 @@ target-version = ['py310'] [tool.isort] profile = "black" + +[tool.setuptools.dynamic] +version = {attr = "crow.__version__"} diff --git a/tests/conftest.py b/tests/conftest.py index 8023f96..23132f1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,7 +10,6 @@ import pytest # Ensure we can import from the main crow/ package -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) def pytest_addoption(parser): diff --git a/tests/test_cluster_abundance.py b/tests/test_cluster_abundance.py index 3aba83f..953d200 100644 --- a/tests/test_cluster_abundance.py +++ b/tests/test_cluster_abundance.py @@ -7,8 +7,6 @@ import pyccl import pytest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow import ClusterAbundance _TEST_COSMO = pyccl.CosmologyVanillaLCDM() diff --git a/tests/test_cluster_integrators.py b/tests/test_cluster_integrators.py index 2f1d74a..0fa4e9f 100644 --- a/tests/test_cluster_integrators.py +++ b/tests/test_cluster_integrators.py @@ -7,8 +7,6 @@ import numpy.typing as npt import pytest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow.integrator.numcosmo_integrator import NumCosmoIntegrator from crow.integrator.scipy_integrator import ScipyIntegrator diff --git a/tests/test_cluster_kernels.py b/tests/test_cluster_kernels.py index b9253d5..75c89c5 100644 --- a/tests/test_cluster_kernels.py +++ b/tests/test_cluster_kernels.py @@ -6,8 +6,6 @@ import numpy as np import pytest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow import completeness_models, kernel, purity_models diff --git a/tests/test_cluster_mass_richness.py b/tests/test_cluster_mass_richness.py index b57a446..e14abe1 100644 --- a/tests/test_cluster_mass_richness.py +++ b/tests/test_cluster_mass_richness.py @@ -9,8 +9,6 @@ from hypothesis.strategies import floats from scipy.integrate import quad -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow import mass_proxy from crow.cluster_modules.mass_proxy.murata import MurataModel diff --git a/tests/test_cluster_parameters.py b/tests/test_cluster_parameters.py index 27b2073..a629c31 100644 --- a/tests/test_cluster_parameters.py +++ b/tests/test_cluster_parameters.py @@ -6,8 +6,6 @@ import numpy as np import pytest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow.cluster_modules.parameters import Parameters diff --git a/tests/test_cluster_shear_profile.py b/tests/test_cluster_shear_profile.py index 1d966b9..447e78f 100644 --- a/tests/test_cluster_shear_profile.py +++ b/tests/test_cluster_shear_profile.py @@ -8,8 +8,6 @@ import pytest from scipy.stats import norm -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow import ClusterShearProfile _TEST_COSMO = pyccl.CosmologyVanillaLCDM() diff --git a/tests/test_recipe_binned_counts.py b/tests/test_recipe_binned_counts.py index e657f5f..42138b1 100644 --- a/tests/test_recipe_binned_counts.py +++ b/tests/test_recipe_binned_counts.py @@ -10,9 +10,6 @@ from hypothesis.strategies import floats from scipy.integrate import dblquad, simpson -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - - from crow import ( ClusterAbundance, completeness_models, diff --git a/tests/test_recipe_binned_parent.py b/tests/test_recipe_binned_parent.py index 5f2677f..34be85b 100644 --- a/tests/test_recipe_binned_parent.py +++ b/tests/test_recipe_binned_parent.py @@ -9,9 +9,6 @@ from hypothesis import HealthCheck, given, settings from hypothesis.strategies import floats -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - - from crow import ClusterAbundance, kernel, mass_proxy, purity_models from crow.integrator.numcosmo_integrator import NumCosmoIntegrator from crow.properties import ClusterProperty diff --git a/tests/test_recipe_binned_shear_profile.py b/tests/test_recipe_binned_shear_profile.py index 2e4e559..7884905 100644 --- a/tests/test_recipe_binned_shear_profile.py +++ b/tests/test_recipe_binned_shear_profile.py @@ -7,8 +7,6 @@ import pyccl import pytest -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from crow import ( ClusterAbundance, ClusterShearProfile,