Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove python 3.7 #536

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8d40d7e
replace np.int with int in cell_assembly_detection.py
Jan 10, 2023
990b945
replace np.float32 with float in test_conversion.py
Jan 10, 2023
2cd7e2d
replace np.complex with complex in current_source_density.py
Jan 10, 2023
619df8b
replace np.complex with complex in KCSD.py
Jan 10, 2023
02c5079
replace np.complex with complex in utility_functions.py
Jan 10, 2023
8f8c69a
replace np.int, np. float, np. object standard types in gpfa_core.py,…
Jan 10, 2023
c4cf9f3
replace np.complex with complex in phase_analysis.py
Jan 10, 2023
5f201d3
replace np.float with float in signal_processing.py
Jan 10, 2023
adaf121
replace assert_array_equal with assert_equal in test_spade.py
Jan 10, 2023
0d72a95
fixed creation of arrays from ragged sequences
Jan 10, 2023
1591895
drop support for python 3.7
Jan 10, 2023
1a5c7ac
drop support for numpy 1.20 according to NEP 29
Jan 10, 2023
6222208
Merge branch 'fix/numpy_>1.24.0' into fix/remove_python_3.7
Jan 10, 2023
67ea4f0
remove python 3.11 from CI, since this requires release of h5py 3.8.0
Jan 10, 2023
c7e9fdb
drop support for numpy 1.18, numpy>=1.19.5
Jan 12, 2023
b662808
re-add python 3.11 to CI workflow, since h5py version 3.8.0 was released
Jan 24, 2023
8964576
update the libstd for the CI runner to fix bugs related to newer scip…
Feb 6, 2023
fc2df48
fix dtype error appearing with quantities 0.14.0
Feb 6, 2023
9da0e3c
Merge branch 'master' into fix/remove_python_3.7
Moritz-Alexander-Kern Feb 6, 2023
ba971a8
update pip cache
Feb 6, 2023
6bc0c24
Merge remote-tracking branch 'origin/fix/remove_python_3.7' into fix/…
Feb 6, 2023
f98e189
typo in file path
Feb 6, 2023
5a4db29
typo in file path fixed
Feb 6, 2023
18177dd
add apt-get update in docs runner
Feb 6, 2023
8bea215
add apt-get update in MPI runner
Feb 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will setup GitHub-hosted runners and install the required dependencies for elephant tests.
# This workflow will set up GitHub-hosted runners and install the required dependencies for elephant tests.
# On a pull requests and on pushes to master it will run different tests for elephant.

name: tests
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# python versions for elephant: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10"]
# python versions for elephant: [3.8, 3.9, "3.10", 3.11]
python-version: [3.8, 3.9, "3.10", 3.11]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
# do not cancel all in-progress jobs if any matrix job fails
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Cache test_env
uses: actions/cache@v3
with:
path: ~/test_env
path: /home/runner/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
# cache will be reset on changes to any requirements or every month
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-tests.txt') }}
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# python versions for elephant: [3.6, 3.7, 3.8, 3.9]
# python versions for elephant: [3.8, 3.9, 3.10, 3.11]
python-version: [3.8,]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# python versions for elephant: [3.6, 3.7, 3.8, 3.9]
# python versions for elephant: [3.8, 3.9, 3.10, 3.11]
python-version: [3.9]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
Expand Down Expand Up @@ -273,6 +273,7 @@ jobs:

- name: Setup environment
run: |
sudo apt-get update
sudo apt install -y libopenmpi-dev openmpi-bin

python -m pip install --upgrade pip
Expand Down Expand Up @@ -331,6 +332,7 @@ jobs:
run: |
conda config --add channels conda-forge # bugfix with scipy==1.8.1: libstdcxx-ng 12.1.0 required
conda update conda
conda install -c conda-forge libstdcxx-ng=12 # fix libstdc++.so.6: version for new scipy versions > 1.9.1
conda env update --file requirements/environment-tests.yml --name base
activate base
conda install -c conda-forge openmpi
Expand Down Expand Up @@ -387,6 +389,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y libopenmpi-dev openmpi-bin
python -m pip install --upgrade pip
pip install -r requirements/requirements-docs.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "cp27-* cp33-* cp34-* cp35-* cp36-* pp*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
CIBW_SKIP: "cp27-* cp33-* cp34-* cp35-* cp36-* cp37-* pp*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_ARCHS: "auto64"

- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Below is the explanation of how to proceed with these two steps.
Prerequisites
*************

Elephant requires `Python <http://python.org/>`_ 3.7, 3.8, 3.9 or 3.10.
Elephant requires `Python <http://python.org/>`_ 3.8, 3.9, 3.10 or 3.11.

.. tabs::

Expand All @@ -25,7 +25,7 @@ Elephant requires `Python <http://python.org/>`_ 3.7, 3.8, 3.9 or 3.10.

.. code-block:: sh

conda create --name elephant python=3.7 numpy scipy tqdm
conda create --name elephant python=3.8 numpy scipy tqdm

2. Activate your environment:

Expand Down
2 changes: 1 addition & 1 deletion elephant/cell_assembly_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def cell_assembly_detection(binned_spiketrain, max_lag, reference_lag=2,
times = np.where(pattern['times'] > 0)[0] * bin_size + t_start
pattern['times'] = times
pattern['lags'] = pattern['lags'] * bin_size
pattern['signature'] = np.array(pattern['signature'], dtype=np.int32)
pattern['signature'] = np.array(pattern['signature'], dtype=int)

# Give as output only the maximal groups
if verbose:
Expand Down
4 changes: 2 additions & 2 deletions elephant/test/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ def test_binned_spiketrain_n_bins_not_int(self):
def test_to_array(self):
x = cv.BinnedSpikeTrain(self.spiketrain_a, bin_size=1 * pq.s,
n_bins=10, t_stop=10. * pq.s)
arr_float = x.to_array(dtype=np.float32)
assert_array_equal(arr_float, x.to_array().astype(np.float32))
arr_float = x.to_array(dtype=float)
assert_array_equal(arr_float, x.to_array().astype(float))

# Test if error is raised when providing insufficient number of
# parameters
Expand Down
2 changes: 1 addition & 1 deletion elephant/test/test_spade.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def test_spade_raise_error(self):
corr='invalid_key')
# Test negative number of subset for stability
self.assertRaises(ValueError, spade.approximate_stability, (),
np.array([]), n_subsets=-3)
np.ndarray([]), n_subsets=-3)

def test_pattern_set_reduction(self):
winlen = 6
Expand Down
2 changes: 1 addition & 1 deletion elephant/test/test_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def setUp(self):
def test_lvr_with_quantities(self):
seq = pq.Quantity(self.test_seq, units='ms')
assert_array_almost_equal(statistics.lvr(seq), self.target, decimal=9)
seq = pq.Quantity(self.test_seq, units='ms').rescale('s')
seq = pq.Quantity(self.test_seq, units='ms').rescale('s', dtype=float)
assert_array_almost_equal(statistics.lvr(seq), self.target, decimal=9)

def test_lvr_with_plain_array(self):
Expand Down
2 changes: 2 additions & 0 deletions elephant/test/test_unitary_event_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def test__UE_surrogate(self):
item1))

def test_jointJ_window_analysis(self):

sts1 = self.sts1_neo
sts2 = self.sts2_neo

Expand Down Expand Up @@ -498,6 +499,7 @@ def test_Riehle_et_al_97_UE(self):

def test_multiple_neurons(self):
np.random.seed(12)

# Create a list of lists containing 3 Trials with 5 spiketrains
spiketrains = \
[StationaryPoissonProcess(
Expand Down
2 changes: 1 addition & 1 deletion requirements/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge # required for MPI

dependencies:
- python>=3.7
- python>=3.8

- mpi4py
- numpy>=1.19.5
Expand Down
2 changes: 1 addition & 1 deletion requirements/environment-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge # required for MPI

dependencies:
- python>=3.7
- python>=3.8

- mpi4py
- numpy>=1.19.5
Expand Down
2 changes: 1 addition & 1 deletion requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge # required for MPI

dependencies:
- python>=3.7
- python>=3.8
- mpi4py
- numpy>=1.19.5
- scipy
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@
"Documentation": "https://elephant.readthedocs.io/en/latest/",
"Source Code": "https://github.com/NeuralEnsemble/elephant",
},
"python_requires": ">=3.7",
"python_requires": ">=3.8",
"classifiers": [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Scientific/Engineering']
}
Expand Down