Skip to content

Commit

Permalink
fixed min requirements (NeuralEnsemble#235)
Browse files Browse the repository at this point in the history
* fixed min requirements

* travis install libopenmpi-dev

* added .coveragerc omit=elephant/test* rule not to count test files as source code
  • Loading branch information
dizcza authored and mdenker committed Aug 1, 2019
1 parent 36e6096 commit 19d3c7b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .coveragerc to control coverage.py
[report]
omit = elephant/test/*
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ matrix:
python: 3.7
env: DISTRIB="conda"

exclude:
- name: "pip 3.6 requirements min version"
# excluded due to unmet dependencies in neo, quantities, and scipy
- name: "pip 3.6 requirements-extras min version"
python: 3.6
env: DISTRIB="pip"
before_install:
- sudo apt install libblas-dev liblapack-dev libatlas-base-dev gfortran
- sed -i 's/>=/==/g' requirements.txt
- sudo apt install -y libopenmpi-dev openmpi-bin
- sudo apt install -y libblas-dev liblapack-dev libatlas-base-dev gfortran
- sed -i 's/>=/==/g' requirements*.txt
before_script: pip install -r requirements-extras.txt


install:
Expand Down
2 changes: 1 addition & 1 deletion elephant/current_source_density_src/KCSD.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate(self, ele_pos, pots):
if ele_pos.shape[0] < 1+ele_pos.shape[1]: #Dim+1
raise Exception("Number of electrodes must be at least :",
1+ele_pos.shape[1])
if utils.check_for_duplicated_electrodes(ele_pos) is False:
if utils.contains_duplicated_electrodes(ele_pos):
raise Exception("Error! Duplicated electrode!")

def sanity(self, true_csd, pos_csd):
Expand Down
8 changes: 5 additions & 3 deletions elephant/current_source_density_src/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ def patch_quantities():
lastdefinition = definition
return

def check_for_duplicated_electrodes(elec_pos):

def contains_duplicated_electrodes(elec_pos):
"""Checks for duplicate electrodes
Parameters
----------
elec_pos : np.array
Returns
-------
has_duplicated_elec : Boolean
"""
unique_elec_pos = np.unique(elec_pos, axis=0)
has_duplicated_elec = unique_elec_pos.shape == elec_pos.shape
unique_elec_pos = set(map(tuple, elec_pos))
has_duplicated_elec = len(unique_elec_pos) < len(elec_pos)
return has_duplicated_elec


Expand Down
4 changes: 2 additions & 2 deletions requirements-extras.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pandas>=0.14.1
scikit-learn
pandas>=0.18.0
scikit-learn>=0.19.0
mpi4py>=3.0.1
tqdm
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
neo>=0.7.1,<0.8.0
numpy>=1.8.2
quantities>=0.10.1
scipy>=0.14.0
numpy>=1.10.1
quantities>=0.12.1
scipy>=0.17.0
six>=1.10.0

0 comments on commit 19d3c7b

Please sign in to comment.