Skip to content

Remove version caps #448

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

Merged
merged 2 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ documentation = "https://wfdb.readthedocs.io/"
license = "MIT"

[tool.poetry.dependencies]
python = "^3.7"
numpy = "^1.10.1"
scipy = "^1.0.0"
python = ">=3.7"
numpy = ">=1.10.1"
scipy = ">=1.0.0"
pandas = ">=1.3.0"
SoundFile = ">=0.10.0, <0.12.0"
matplotlib = "^3.2.2"
requests = "^2.8.1"
pytest = {version = "^7.1.1", optional = true}
pytest-xdist = {version = "^2.5.0", optional = true}
pylint = {version = "^2.13.7", optional = true}
black = {version = "^22.3.0", optional = true}
Sphinx = {version = "^4.5.0", optional = true}
SoundFile = ">=0.10.0"
matplotlib = ">=3.2.2"
requests = ">=2.8.1"
pytest = {version = ">=7.1.1", optional = true}
pytest-xdist = {version = ">=2.5.0", optional = true}
pylint = {version = ">=2.13.7", optional = true}
black = {version = ">=22.3.0", optional = true}
Sphinx = {version = ">=4.5.0", optional = true}

[tool.poetry.extras]
dev = ["pytest", "pytest-xdist", "pylint", "black", "Sphinx"]
Expand Down
1 change: 0 additions & 1 deletion tests/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def test_find_peaks_empty(self):
assert sp.shape == (0,)

def test_gqrs(self):

record = wfdb.rdrecord(
"sample-data/100",
channels=[0],
Expand Down
2 changes: 0 additions & 2 deletions wfdb/io/_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ def set_default(self, field):
# Signal specification fields
# Setting entire list default, not filling in blanks in lists.
elif field in SIGNAL_SPECS.index:

# Specific dynamic case
if field == "file_name" and self.file_name is None:
self.file_name = self._auto_signal_file_names()
Expand Down Expand Up @@ -472,7 +471,6 @@ def check_field_cohesion(self, rec_write_fields, sig_write_fields):
"""
# If there are no signal specification fields, there is nothing to check.
if self.n_sig > 0:

# The length of all signal specification fields must match n_sig
# even if some of its elements are None.
for f in sig_write_fields:
Expand Down
1 change: 0 additions & 1 deletion wfdb/io/_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,6 @@ def _skew_sig(

"""
if max(skew) > 0:

# Expanded frame samples. List of arrays.
if isinstance(sig, list):
# Shift the channel samples
Expand Down
5 changes: 1 addition & 4 deletions wfdb/io/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def __init__(
custom_labels=None,
contained_labels=None,
):

self.record_name = record_name
self.extension = extension

Expand Down Expand Up @@ -1180,7 +1179,6 @@ def calc_core_bytes(self):

# Iterate across all fields one index at a time
for i in range(len(sampdiff)):

# Process the samp (difference) and sym items
data_bytes.append(
field2bytes(
Expand Down Expand Up @@ -2152,7 +2150,6 @@ def proc_ann_bytes(filebytes, sampto):
# - other pairs (if any)
# The last byte pair of the file is 0 indicating eof.
while bpi < filebytes.shape[0] - 1:

# Get the sample and label_store fields of the current annotation
sample_diff, current_label_store, bpi = proc_core_fields(filebytes, bpi)
sample_total = sample_total + sample_diff
Expand Down Expand Up @@ -3018,7 +3015,6 @@ class AnnotationClass(object):
"""

def __init__(self, extension, description, human_reviewed):

self.extension = extension
self.description = description
self.human_reviewed = human_reviewed
Expand Down Expand Up @@ -3054,6 +3050,7 @@ def __init__(self, extension, description, human_reviewed):
["extension", "description", "human_reviewed"]
]


# Individual annotation labels
class AnnotationLabel(object):
"""
Expand Down
2 changes: 0 additions & 2 deletions wfdb/io/convert/edf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def read_edf(

"""
if pn_dir is not None:

if "." not in pn_dir:
dir_list = pn_dir.split("/")
pn_dir = posixpath.join(
Expand Down Expand Up @@ -762,7 +761,6 @@ def wfdb_to_edf(
output_filename = record_name_out + ".edf"

with open(output_filename, "wb") as f:

print(
"Converting record {} to {} ({} mode)".format(
record_name, output_filename, "EDF+" if edf_plus else "EDF"
Expand Down
1 change: 0 additions & 1 deletion wfdb/io/convert/wav.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def read_wav(record_name, pn_dir=None, delete_file=True, record_only=False):
raise Exception("Name of the input file must end in .wav")

if pn_dir is not None:

if "." not in pn_dir:
dir_list = pn_dir.split("/")
pn_dir = posixpath.join(
Expand Down
7 changes: 1 addition & 6 deletions wfdb/io/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,6 @@ def __init__(
sig_name=None,
comments=None,
):

# Note the lack of the 'n_seg' field. Single segment records cannot
# have this field. Even n_seg = 1 makes the header a multi-segment
# header.
Expand Down Expand Up @@ -877,7 +876,6 @@ def __eq__(self, other, verbose=False):
return False

for k in att1.keys():

v1 = att1[k]
v2 = att2[k]

Expand All @@ -894,7 +892,7 @@ def __eq__(self, other, verbose=False):
and len(v1) == len(v2)
and all(isinstance(e, np.ndarray) for e in v1)
):
for (e1, e2) in zip(v1, v2):
for e1, e2 in zip(v1, v2):
np.testing.assert_array_equal(e1, e2)
else:
if v1 != v2:
Expand Down Expand Up @@ -988,7 +986,6 @@ def _arrange_fields(self, channels, sampfrom, smooth_frames):
# Checksum and init_value to be updated if present
# unless the whole signal length was input
if self.sig_len != self.d_signal.shape[0]:

if self.checksum is not None:
self.checksum = self.calc_checksum()
if self.init_value is not None:
Expand Down Expand Up @@ -1136,7 +1133,6 @@ def __init__(
sig_name=None,
sig_segments=None,
):

super(MultiRecord, self).__init__(
record_name=record_name,
n_sig=n_sig,
Expand Down Expand Up @@ -1203,7 +1199,6 @@ def _check_segment_cohesion(self):
raise ValueError("Length of segments must match the 'n_seg' field")

for seg_num, segment in enumerate(self.segments):

# If segment 0 is a layout specification record, check that its file names are all == '~''
if seg_num == 0 and self.seg_len[0] == 0:
for file_name in segment.file_name:
Expand Down
1 change: 0 additions & 1 deletion wfdb/processing/hr.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def ann2rr(
format=None,
as_array=True,
):

"""
Obtain RR interval series from ECG annotation files.

Expand Down
1 change: 0 additions & 1 deletion wfdb/processing/qrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ def _learn_init_params(self, n_calib_beats=8):

# Found enough calibration beats to initialize parameters
if len(qrs_inds) == n_calib_beats:

if self.verbose:
print(
"Found %d beats during learning." % n_calib_beats
Expand Down