From f9561c893c735373f7f32acdcf3f627fec82826c Mon Sep 17 00:00:00 2001 From: Benoit Coste Date: Thu, 26 Nov 2020 10:26:02 +0100 Subject: [PATCH] Relax h5py constraint (#857) and remove the deprecated fst/ files --- benchmarks/benchmarks.py | 4 +-- neurom/fst/__init__.py | 12 +++---- neurom/fst/_bifurcationfunc.py | 35 ------------------- neurom/fst/_neuritefunc.py | 34 ------------------- neurom/fst/_neuronfunc.py | 34 ------------------- neurom/fst/sectionfunc.py | 34 ------------------- neurom/fst/tests/test_bifurcationfunc.py | 43 ------------------------ neurom/fst/tests/test_feature_compat.py | 34 ------------------- neurom/fst/tests/test_get_features.py | 36 -------------------- neurom/fst/tests/test_neuritefunc.py | 43 ------------------------ neurom/fst/tests/test_neuronfunc.py | 43 ------------------------ neurom/fst/tests/test_sectionfunc.py | 43 ------------------------ neurom/geom/tests/test_transform.py | 2 +- neurom/io/tests/test_utils.py | 2 +- setup.py | 2 +- 15 files changed, 9 insertions(+), 392 deletions(-) delete mode 100644 neurom/fst/_bifurcationfunc.py delete mode 100644 neurom/fst/_neuritefunc.py delete mode 100644 neurom/fst/_neuronfunc.py delete mode 100644 neurom/fst/sectionfunc.py delete mode 100644 neurom/fst/tests/test_bifurcationfunc.py delete mode 100644 neurom/fst/tests/test_feature_compat.py delete mode 100644 neurom/fst/tests/test_get_features.py delete mode 100644 neurom/fst/tests/test_neuritefunc.py delete mode 100644 neurom/fst/tests/test_neuronfunc.py delete mode 100644 neurom/fst/tests/test_sectionfunc.py diff --git a/benchmarks/benchmarks.py b/benchmarks/benchmarks.py index 7953684ca..6ca234b62 100644 --- a/benchmarks/benchmarks.py +++ b/benchmarks/benchmarks.py @@ -2,7 +2,7 @@ import neurom as nm import neurom.io -import neurom.fst._core +from neurom.fst._core import FstNeuron from neurom.check import neuron_checks as nc from neurom.check import structural_checks as sc @@ -114,7 +114,7 @@ class TimeChecks: def setup(self): path = Path(DATA_DIR, 'h5/v1/bio_neuron-000.h5') self.data_wrapper = neurom.io.load_data(path) - self.neuron = neurom.fst._core.FstNeuron(self.data_wrapper) + self.neuron = FstNeuron(self.data_wrapper) def time_has_sequential_ids(self): sc.has_sequential_ids(self.data_wrapper) diff --git a/neurom/fst/__init__.py b/neurom/fst/__init__.py index cef040a1b..fe2773a04 100644 --- a/neurom/fst/__init__.py +++ b/neurom/fst/__init__.py @@ -1,9 +1,5 @@ -"""Legacy module, replaced by neurom.features.""" -from warnings import warn -from neurom.features import neuritefunc as _neuritefunc -from neurom.features import neuronfunc as _neuronfunc -from neurom.features import sectionfunc +"""This module used to have all fst related function that were deprecated and now removed. -from neurom.features import NEURITEFEATURES, NEURONFEATURES, get, register_neurite_feature -warn('neurom.fst is being deprecated and will be removed in NeuroM v1.5.0,' - ' replace it by neurom.features', DeprecationWarning) +The class FstNeuron is still here and has not been moved to a better +suited plane since moving it would imply a breaking change. +""" diff --git a/neurom/fst/_bifurcationfunc.py b/neurom/fst/_bifurcationfunc.py deleted file mode 100644 index 2848b7f04..000000000 --- a/neurom/fst/_bifurcationfunc.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Legacy module, replaced by neurom.features.bifurcationfunc.""" -# pylint: disable=wildcard-import,unused-wildcard-import -from warnings import warn -from neurom.features.bifurcationfunc import * - -warn('neurom.fst._bifurcationfunc is being deprecated and will be removed in NeuroM v1.5.0,' - ' replace it by neurom.features.bifurcationfunc', DeprecationWarning) diff --git a/neurom/fst/_neuritefunc.py b/neurom/fst/_neuritefunc.py deleted file mode 100644 index 8285d0fec..000000000 --- a/neurom/fst/_neuritefunc.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Legacy module, replaced by neurom.features.neuritefunc.""" -# pylint: disable=wildcard-import,unused-wildcard-import -from warnings import warn -from neurom.features.neuritefunc import * -warn('neurom.fst._neuritefunc is being deprecated and will be removed in NeuroM v1.5.0,' - ' replace it by neurom.features.neuritefunc', DeprecationWarning) diff --git a/neurom/fst/_neuronfunc.py b/neurom/fst/_neuronfunc.py deleted file mode 100644 index 720ee4228..000000000 --- a/neurom/fst/_neuronfunc.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Legacy module, replaced by neurom.features.neuronfunc.""" -# pylint: disable=wildcard-import,unused-wildcard-import -from warnings import warn -from neurom.features.neuronfunc import * -warn('neurom.fst._neuronfunc is being deprecated and will be removed in NeuroM v1.5.0,' - ' replace it by neurom.features.neuronfunc', DeprecationWarning) diff --git a/neurom/fst/sectionfunc.py b/neurom/fst/sectionfunc.py deleted file mode 100644 index a9f87d924..000000000 --- a/neurom/fst/sectionfunc.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Legacy module, replaced by neurom.features.sectionfunc.""" -# pylint: disable=wildcard-import,unused-wildcard-import -from warnings import warn -from neurom.features.sectionfunc import * -warn('neurom.fst.sectionfunc is being deprecated and will be removed in NeuroM v1.5.0,' - ' replace it by neurom.features.sectionfunc', DeprecationWarning) diff --git a/neurom/fst/tests/test_bifurcationfunc.py b/neurom/fst/tests/test_bifurcationfunc.py deleted file mode 100644 index 02662cfde..000000000 --- a/neurom/fst/tests/test_bifurcationfunc.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""This module runs the feature tests in the neurom/features/tests folder - -but as if the user had used the old calling conversion to get the feature. -It is here to check that the retro-compatibility is preserved. - -It works by importing the feature tests and then overriding -the module from which they are taken (features -> fst) -""" - -from neurom.features.tests.test_bifurcationfunc import * - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/fst/tests/test_feature_compat.py b/neurom/fst/tests/test_feature_compat.py deleted file mode 100644 index b02b1122e..000000000 --- a/neurom/fst/tests/test_feature_compat.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Test neurom._neuritefunc functionality.""" - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/fst/tests/test_get_features.py b/neurom/fst/tests/test_get_features.py deleted file mode 100644 index 7dcd869d7..000000000 --- a/neurom/fst/tests/test_get_features.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Test neurom._neuritefunc functionality.""" - -from neurom.features.tests.test_get_features import * - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/fst/tests/test_neuritefunc.py b/neurom/fst/tests/test_neuritefunc.py deleted file mode 100644 index 7cf8f6717..000000000 --- a/neurom/fst/tests/test_neuritefunc.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""This module runs the feature tests in the neurom/features/tests folder - -but as if the user had used the old calling conversion to get the feature. -It is here to check that the retro-compatibility is preserved. - -It works by importing the feature tests and then overriding -the module from which they are taken (features -> fst) -""" - -from neurom.features.tests.test_neuritefunc import * - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/fst/tests/test_neuronfunc.py b/neurom/fst/tests/test_neuronfunc.py deleted file mode 100644 index dc69b1049..000000000 --- a/neurom/fst/tests/test_neuronfunc.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""This module runs the feature tests in the neurom/features/tests folder - -but as if the user had used the old calling conversion to get the feature. -It is here to check that the retro-compatibility is preserved. - -It works by importing the feature tests and then overriding -the module from which they are taken (features -> fst) -""" - -from neurom.features.tests.test_neuronfunc import * - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/fst/tests/test_sectionfunc.py b/neurom/fst/tests/test_sectionfunc.py deleted file mode 100644 index c4c5451ea..000000000 --- a/neurom/fst/tests/test_sectionfunc.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project -# All rights reserved. -# -# This file is part of NeuroM -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of -# its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""This module runs the feature tests in the neurom/features/tests folder - -but as if the user had used the old calling conversion to get the feature. -It is here to check that the retro-compatibility is preserved. - -It works by importing the feature tests and then overriding -the module from which they are taken (features -> fst) -""" - -from neurom.features.tests.test_sectionfunc import * - -from neurom.fst import _bifurcationfunc as bifurcation -from neurom.fst import _neuronfunc as neuronfunc -from neurom.fst import _neuritefunc as _nf -from neurom.fst import sectionfunc diff --git a/neurom/geom/tests/test_transform.py b/neurom/geom/tests/test_transform.py index 7f21c684a..64b8b3bfd 100644 --- a/neurom/geom/tests/test_transform.py +++ b/neurom/geom/tests/test_transform.py @@ -32,7 +32,7 @@ import neurom.geom.transform as gtr import numpy as np from neurom import load_neuron -from neurom.fst import _neuritefunc as _nf +from neurom.features import neuritefunc as _nf from nose import tools as nt TEST_UVEC = np.array([0.01856633, 0.37132666, 0.92831665]) diff --git a/neurom/io/tests/test_utils.py b/neurom/io/tests/test_utils.py index 1e9ddd3c7..defe98517 100644 --- a/neurom/io/tests/test_utils.py +++ b/neurom/io/tests/test_utils.py @@ -39,7 +39,7 @@ from neurom import get from neurom.core import Neuron, SomaError from neurom.exceptions import NeuroMError, RawDataError, SomaError -from neurom.fst import _neuritefunc as _nf +from neurom.features import neuritefunc as _nf from neurom.io import utils DATA_PATH = Path(__file__).parent.parent.parent.parent / 'test_data' diff --git a/setup.py b/setup.py index 810db102f..5b11e5b65 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ url='http://https://github.com/BlueBrain/NeuroM', install_requires=[ 'click>=7.0', - 'h5py>=2.7.1,<3.0.0', + 'h5py>=3.1.0', 'matplotlib>=3.2.1', 'numpy>=1.8.0', 'pandas>=1.0.5',