Skip to content

Commit 4fd577f

Browse files
authored
Merge pull request #448 from cbrnr/remove-version-caps
Remove version caps
2 parents 3c9796c + 09e7a36 commit 4fd577f

File tree

10 files changed

+13
-30
lines changed

10 files changed

+13
-30
lines changed

pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ documentation = "https://wfdb.readthedocs.io/"
1010
license = "MIT"
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.7"
14-
numpy = "^1.10.1"
15-
scipy = "^1.0.0"
13+
python = ">=3.7"
14+
numpy = ">=1.10.1"
15+
scipy = ">=1.0.0"
1616
pandas = ">=1.3.0"
17-
SoundFile = ">=0.10.0, <0.12.0"
18-
matplotlib = "^3.2.2"
19-
requests = "^2.8.1"
20-
pytest = {version = "^7.1.1", optional = true}
21-
pytest-xdist = {version = "^2.5.0", optional = true}
22-
pylint = {version = "^2.13.7", optional = true}
23-
black = {version = "^22.3.0", optional = true}
24-
Sphinx = {version = "^4.5.0", optional = true}
17+
SoundFile = ">=0.10.0"
18+
matplotlib = ">=3.2.2"
19+
requests = ">=2.8.1"
20+
pytest = {version = ">=7.1.1", optional = true}
21+
pytest-xdist = {version = ">=2.5.0", optional = true}
22+
pylint = {version = ">=2.13.7", optional = true}
23+
black = {version = ">=22.3.0", optional = true}
24+
Sphinx = {version = ">=4.5.0", optional = true}
2525

2626
[tool.poetry.extras]
2727
dev = ["pytest", "pytest-xdist", "pylint", "black", "Sphinx"]

tests/test_processing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def test_find_peaks_empty(self):
6363
assert sp.shape == (0,)
6464

6565
def test_gqrs(self):
66-
6766
record = wfdb.rdrecord(
6867
"sample-data/100",
6968
channels=[0],

wfdb/io/_header.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ def set_default(self, field):
426426
# Signal specification fields
427427
# Setting entire list default, not filling in blanks in lists.
428428
elif field in SIGNAL_SPECS.index:
429-
430429
# Specific dynamic case
431430
if field == "file_name" and self.file_name is None:
432431
self.file_name = self._auto_signal_file_names()
@@ -472,7 +471,6 @@ def check_field_cohesion(self, rec_write_fields, sig_write_fields):
472471
"""
473472
# If there are no signal specification fields, there is nothing to check.
474473
if self.n_sig > 0:
475-
476474
# The length of all signal specification fields must match n_sig
477475
# even if some of its elements are None.
478476
for f in sig_write_fields:

wfdb/io/_signal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,6 @@ def _skew_sig(
19851985
19861986
"""
19871987
if max(skew) > 0:
1988-
19891988
# Expanded frame samples. List of arrays.
19901989
if isinstance(sig, list):
19911990
# Shift the channel samples

wfdb/io/annotation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def __init__(
156156
custom_labels=None,
157157
contained_labels=None,
158158
):
159-
160159
self.record_name = record_name
161160
self.extension = extension
162161

@@ -1180,7 +1179,6 @@ def calc_core_bytes(self):
11801179

11811180
# Iterate across all fields one index at a time
11821181
for i in range(len(sampdiff)):
1183-
11841182
# Process the samp (difference) and sym items
11851183
data_bytes.append(
11861184
field2bytes(
@@ -2152,7 +2150,6 @@ def proc_ann_bytes(filebytes, sampto):
21522150
# - other pairs (if any)
21532151
# The last byte pair of the file is 0 indicating eof.
21542152
while bpi < filebytes.shape[0] - 1:
2155-
21562153
# Get the sample and label_store fields of the current annotation
21572154
sample_diff, current_label_store, bpi = proc_core_fields(filebytes, bpi)
21582155
sample_total = sample_total + sample_diff
@@ -3018,7 +3015,6 @@ class AnnotationClass(object):
30183015
"""
30193016

30203017
def __init__(self, extension, description, human_reviewed):
3021-
30223018
self.extension = extension
30233019
self.description = description
30243020
self.human_reviewed = human_reviewed
@@ -3054,6 +3050,7 @@ def __init__(self, extension, description, human_reviewed):
30543050
["extension", "description", "human_reviewed"]
30553051
]
30563052

3053+
30573054
# Individual annotation labels
30583055
class AnnotationLabel(object):
30593056
"""

wfdb/io/convert/edf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def read_edf(
126126
127127
"""
128128
if pn_dir is not None:
129-
130129
if "." not in pn_dir:
131130
dir_list = pn_dir.split("/")
132131
pn_dir = posixpath.join(
@@ -762,7 +761,6 @@ def wfdb_to_edf(
762761
output_filename = record_name_out + ".edf"
763762

764763
with open(output_filename, "wb") as f:
765-
766764
print(
767765
"Converting record {} to {} ({} mode)".format(
768766
record_name, output_filename, "EDF+" if edf_plus else "EDF"

wfdb/io/convert/wav.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ def read_wav(record_name, pn_dir=None, delete_file=True, record_only=False):
225225
raise Exception("Name of the input file must end in .wav")
226226

227227
if pn_dir is not None:
228-
229228
if "." not in pn_dir:
230229
dir_list = pn_dir.split("/")
231230
pn_dir = posixpath.join(

wfdb/io/record.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,6 @@ def __init__(
813813
sig_name=None,
814814
comments=None,
815815
):
816-
817816
# Note the lack of the 'n_seg' field. Single segment records cannot
818817
# have this field. Even n_seg = 1 makes the header a multi-segment
819818
# header.
@@ -877,7 +876,6 @@ def __eq__(self, other, verbose=False):
877876
return False
878877

879878
for k in att1.keys():
880-
881879
v1 = att1[k]
882880
v2 = att2[k]
883881

@@ -894,7 +892,7 @@ def __eq__(self, other, verbose=False):
894892
and len(v1) == len(v2)
895893
and all(isinstance(e, np.ndarray) for e in v1)
896894
):
897-
for (e1, e2) in zip(v1, v2):
895+
for e1, e2 in zip(v1, v2):
898896
np.testing.assert_array_equal(e1, e2)
899897
else:
900898
if v1 != v2:
@@ -988,7 +986,6 @@ def _arrange_fields(self, channels, sampfrom, smooth_frames):
988986
# Checksum and init_value to be updated if present
989987
# unless the whole signal length was input
990988
if self.sig_len != self.d_signal.shape[0]:
991-
992989
if self.checksum is not None:
993990
self.checksum = self.calc_checksum()
994991
if self.init_value is not None:
@@ -1136,7 +1133,6 @@ def __init__(
11361133
sig_name=None,
11371134
sig_segments=None,
11381135
):
1139-
11401136
super(MultiRecord, self).__init__(
11411137
record_name=record_name,
11421138
n_sig=n_sig,
@@ -1203,7 +1199,6 @@ def _check_segment_cohesion(self):
12031199
raise ValueError("Length of segments must match the 'n_seg' field")
12041200

12051201
for seg_num, segment in enumerate(self.segments):
1206-
12071202
# If segment 0 is a layout specification record, check that its file names are all == '~''
12081203
if seg_num == 0 and self.seg_len[0] == 0:
12091204
for file_name in segment.file_name:

wfdb/processing/hr.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def ann2rr(
162162
format=None,
163163
as_array=True,
164164
):
165-
166165
"""
167166
Obtain RR interval series from ECG annotation files.
168167

wfdb/processing/qrs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ def _learn_init_params(self, n_calib_beats=8):
323323

324324
# Found enough calibration beats to initialize parameters
325325
if len(qrs_inds) == n_calib_beats:
326-
327326
if self.verbose:
328327
print(
329328
"Found %d beats during learning." % n_calib_beats

0 commit comments

Comments
 (0)