Skip to content

Commit

Permalink
Merge pull request #191 from DimitriPapadopoulos/codespell
Browse files Browse the repository at this point in the history
Fix typos found by codespell
  • Loading branch information
skjerns authored Mar 22, 2023
2 parents f200c4c + 14857b7 commit 65fb44f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README-edflib.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Each "generator" example creates an EDF+ or BDF+ file with sample signals.
`test_generator` shows how to use most of the functions provided by the library and generates an
EDF+ or BDF+ testfile with several sample signals.

`sine_generator` creates a BDF+ file containing the signal "sine", a 1 Hz sinoidal waveform with a
`sine_generator` creates a BDF+ file containing the signal "sine", a 1 Hz sinusoidal waveform with a
sample frequency of 2048 Hz.

`sweep_generator` creates a linear or logarithmic sweep through a range of frequencies in EDF+ or
Expand Down Expand Up @@ -74,4 +74,4 @@ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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.
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 3 additions & 3 deletions doc/source/dev/how_to_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Guidelines for new releases for pyedflib
========================================
vX.X.X refers to the release number

Tag the release and trigger bulding of wheels in appvoyer
---------------------------------------------------------
Tag the release and trigger building of wheels in appvoyer
----------------------------------------------------------
Change ISRELEASED in setup.py to True and commit.

Appveyor will now build wheels for windows.

Tag the relase with
Tag the release with

```git tag -s vX.X.X```

Expand Down
12 changes: 6 additions & 6 deletions pyedflib/_extensions/_pyedflib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ open_errors = {
EDFLIB_FILE_READ_ERROR : "a read error occurred",
EDFLIB_FILE_ALREADY_OPENED : "file has already been opened",
EDFLIB_FILETYPE_ERROR : "Wrong file type",
EDFLIB_FILE_WRITE_ERROR : "a write error occured",
EDFLIB_FILE_WRITE_ERROR : "a write error occurred",
EDFLIB_NUMBER_OF_SIGNALS_INVALID : "The number of signals is invalid",
EDFLIB_FILE_IS_DISCONTINUOUS : "The file is discontinous and cannot be read",
EDFLIB_FILE_IS_DISCONTINUOUS : "The file is discontinuous and cannot be read",
EDFLIB_INVALID_READ_ANNOTS_VALUE : "an annotation value could not be read",
EDFLIB_FILE_ERRORS_STARTDATE : "the file is not EDF(+) or BDF(+) compliant, the startdate is incorrect, it might contain incorrect characters, such as ':' instead of '.'",
EDFLIB_FILE_ERRORS_STARTTIME : "the file is not EDF(+) or BDF(+) compliant, the starttime is incorrect, it might contain incorrect characters, such as ':' instead of '.'",
Expand Down Expand Up @@ -70,7 +70,7 @@ write_errors = {
EDFLIB_MAXFILES_REACHED : "to many files opened",
EDFLIB_FILE_ALREADY_OPENED : "file has already been opened",
EDFLIB_FILETYPE_ERROR : "Wrong file type",
EDFLIB_FILE_WRITE_ERROR : "a write error occured",
EDFLIB_FILE_WRITE_ERROR : "a write error occurred",
EDFLIB_NUMBER_OF_SIGNALS_INVALID : "The number of signals is invalid",
EDFLIB_NO_SIGNALS : "no signals to write",
EDFLIB_TOO_MANY_SIGNALS : "too many signals",
Expand Down Expand Up @@ -183,7 +183,7 @@ cdef class CyEdfReader:

def make_buffer(self):
"""
utilty function to make a buffer that can hold a single datarecord. This will
utility function to make a buffer that can hold a single datarecord. This will
hold the physical samples for a single data record as a numpy tensor.
- might extend to provide for N datarecord size
Expand All @@ -194,7 +194,7 @@ cdef class CyEdfReader:
for ii in range(self.signals_in_file):
tmp += self.samples_in_datarecord(ii)
self.nsamples_per_record = tmp
dbuffer = np.zeros(tmp, dtype='float64') # will get physical samples, not the orignal digital samples
dbuffer = np.zeros(tmp, dtype='float64') # will get physical samples, not the original digital samples
return dbuffer

def open(self, file_name, annotations_mode=EDFLIB_READ_ALL_ANNOTATIONS, check_file_size=EDFLIB_CHECK_FILE_SIZE):
Expand Down Expand Up @@ -668,4 +668,4 @@ def set_datarecord_duration(handle, duration):

def set_number_of_annotation_signals(handle, annot_signals):
"""int edf_set_number_of_annotation_signals(int handle, int annot_signals)"""
return c_edf.edf_set_number_of_annotation_signals(handle, annot_signals)
return c_edf.edf_set_number_of_annotation_signals(handle, annot_signals)
4 changes: 2 additions & 2 deletions pyedflib/edfwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def setPatientAdditional(self, patient_additional):

def setEquipment(self, equipment):
"""
Sets the name of the param equipment used during the aquisition.
Sets the name of the param equipment used during the acquisition.
This function is optional and can be called only after opening a file in writemode and before the first sample write action.
Parameters
Expand Down Expand Up @@ -946,4 +946,4 @@ def _get_sample_frequency(self, channelIndex):
Please use `sample_frequency` instead", DeprecationWarning)
return (self.channels[channelIndex]['sample_rate']
if self.channels[channelIndex].get('sample_frequency') is None
else self.channels[channelIndex]['sample_frequency'])
else self.channels[channelIndex]['sample_frequency'])
12 changes: 6 additions & 6 deletions pyedflib/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def _get_sample_frequency(signal_header):
else signal_header['sample_frequency'])


def tqdm(iteratable, *args, **kwargs):
def tqdm(iterable, *args, **kwargs):
"""
These is an optional dependecies that shows a progress bar for some
These is an optional dependency that shows a progress bar for some
of the functions, e.g. loading.
install this dependency with `pip install tqdm`
Expand All @@ -51,9 +51,9 @@ def tqdm(iteratable, *args, **kwargs):
"""
try:
from tqdm import tqdm as iterator
return iterator(iteratable, *args, **kwargs)
return iterator(iterable, *args, **kwargs)
except:
return iteratable
return iterable


def _parse_date(string):
Expand Down Expand Up @@ -435,7 +435,7 @@ def write_edf(edf_file, signals, signal_headers, header=None, digital=False,
assert file_type in [-1, 0, 1, 2, 3], \
'file_type must be in range -1, 3'

# copy objects to prevent accidential changes to mutable objects
# copy objects to prevent accidental changes to mutable objects
header = deepcopy(header)
signal_headers = deepcopy(signal_headers)

Expand Down Expand Up @@ -844,4 +844,4 @@ def change_polarity(edf_file, channels, new_file=None, verify=True,
write_edf(new_file, signals, signal_headers, header,
digital=True, correct=False, verbose=verbose)
if verify: compare_edf(edf_file, new_file)
return True
return True
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def install_for_development(self):

if __name__ == '__main__':

# Rewrite the version file everytime
# Rewrite the version file every time
write_version_py()
if USE_CYTHON:
ext_modules = cythonize(ext_modules, compiler_directives=cythonize_opts)
Expand Down Expand Up @@ -301,4 +301,4 @@ def install_for_development(self):
libraries=[c_lib],
cmdclass={'develop': develop_build_clib},
install_requires=[REQUIRED_NUMPY],
)
)
4 changes: 2 additions & 2 deletions util/refguide_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def check_output(self, want, got, optionflags):

def _do_check(self, want, got):
# This should be done exactly as written to correctly handle all of
# numpy-comparable objects, strings, and heterogenous tuples
# numpy-comparable objects, strings, and heterogeneous tuples
try:
if want == got:
return True
Expand Down Expand Up @@ -855,4 +855,4 @@ def scratch(): pass # stub out a "module", see below


if __name__ == '__main__':
main(argv=sys.argv[1:])
main(argv=sys.argv[1:])

0 comments on commit 65fb44f

Please sign in to comment.