diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..115105a --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg +# extint - function/variable name +ignore-words-list = extint diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..5768d7c --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v1 diff --git a/README.rst b/README.rst index 23cfcaf..aba7cb6 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ Features - 2 TTL output channels (3.3V) - 2 amplitude modulation channels - Microcontroller can be used standalone (c.f. `Standalone use` section in the docs) -- Stimulus pulse delivery with ms or μs accurary +- Stimulus pulse delivery with ms or μs accuracy - Random selection of a sequence from a sequence library - Piping of sequence file to the directory of the latest scan on the MRI computer - Error message forwarding to computer diff --git a/cosplay/dump_mem.py b/cosplay/dump_mem.py index 4035ee1..17ba7f5 100644 --- a/cosplay/dump_mem.py +++ b/cosplay/dump_mem.py @@ -12,12 +12,12 @@ def hexlify(buf): return ubinascii.hexlify(buf, ' ') else: def hexlify(buf): - # CPython's hexlify doesn't have the notion of a seperator character + # CPython's hexlify doesn't have the notion of a separator character # so we just do this the old fashioned way return bytes(' '.join(['{:02x}'.format(b) for b in buf]), 'ascii') except AttributeError: def hexlify(buf): - # CPython's hexlify doesn't have the notion of a seperator character + # CPython's hexlify doesn't have the notion of a separator character # so we just do this the old fashioned way return bytes(' '.join(['{:02x}'.format(b) for b in buf]), 'ascii') diff --git a/cosplay/server.py b/cosplay/server.py index a790a5d..f24863b 100755 --- a/cosplay/server.py +++ b/cosplay/server.py @@ -141,7 +141,7 @@ def listdir_nohidden(path): List all entries in `path` excluding hidden ones. This function implements the same functionality as `os.listdir` - but ignores hidden entires. + but ignores hidden entries. Parameters ---------- @@ -264,7 +264,7 @@ def connect(port_name=None): This function tries to connect to `port_name`. If `port_name` is None, tries to connect to the first serial port with a - maching VID:PID for the MicroPython Pyboard. + matching VID:PID for the MicroPython Pyboard. Parameters ---------- diff --git a/documentation/COSplay.rst b/documentation/COSplay.rst index f04822e..aed02d5 100644 --- a/documentation/COSplay.rst +++ b/documentation/COSplay.rst @@ -16,7 +16,7 @@ Features - 2 transistor channels (up to ~3.3V) - 2 TTL output channels with variable amplitude - Microcontroller can be used standalone (c.f. :ref:`pyboard`) -- Stimulus pulse delivery with :math:`ms` or :math:`\mu s` accurary +- Stimulus pulse delivery with :math:`ms` or :math:`\mu s` accuracy - Random selection of a sequence from a sequence library - Piping of sequence file to the directory of the latest scan on the MRI computer - Error message forwarding to computer diff --git a/documentation/pyboard.rst b/documentation/pyboard.rst index 5e52efc..e55fa40 100644 --- a/documentation/pyboard.rst +++ b/documentation/pyboard.rst @@ -90,7 +90,7 @@ Red: Warning! Do not unplug or reset the board in this state as files might be corrupted. Red/Green flashing: - An error occured while executing the scripts on the board. + An error occurred while executing the scripts on the board. Standalone use ============== @@ -117,7 +117,7 @@ for every reboot of the pyboard. Sequence Errors =============== -Before deliverying a sequence, the board checks its consistency. +Before delivering a sequence, the board checks its consistency. If the period is smaller than the pulse width or the values in the out_channel column are not integers between 1 and 6, a SequenceError is raised. In case the board misses a scheduled onset time or end time of a pulse, @@ -144,7 +144,7 @@ config.py Library path ------------ -If one copies sequences to the board manually, the path to the directory containing the sequences can be spcified in ``library_path``. +If one copies sequences to the board manually, the path to the directory containing the sequences can be specified in ``library_path``. Accuracy -------- diff --git a/pyboard/lib/tsv.py b/pyboard/lib/tsv.py index 65ceba6..829d3bc 100644 --- a/pyboard/lib/tsv.py +++ b/pyboard/lib/tsv.py @@ -82,7 +82,7 @@ def dumps(matrix): matrix : 2d array input matrix - Retruns + Returns ------- out : string tsv formatted string diff --git a/pyboard/main.py b/pyboard/main.py index 13b1931..6c952f2 100644 --- a/pyboard/main.py +++ b/pyboard/main.py @@ -30,7 +30,7 @@ def callback_trigger2(): def main(): - #keep the following lines close to the begining of main because laser is switched on until pin_out.value(1) + #keep the following lines close to the beginning of main because laser is switched on until pin_out.value(1) pin_out1 = pyb.Pin('Y1',pyb.Pin.OUT_PP,pull=pyb.Pin.PULL_UP) pin_out1.value(not cfg.on_value_out_channel1) pin_out2 = pyb.Pin('Y3',pyb.Pin.OUT_PP,pull=pyb.Pin.PULL_UP) @@ -175,7 +175,7 @@ def main(): eh = ErrorHandler(use_wo_server,pkt,storage_path) if cfg.accuracy == 'us': - ticks = utime.ticks_us #Function for utime.measurment + ticks = utime.ticks_us #Function for utime.measurement sleep = utime.sleep_us #Corresponding sleep function for ticks conversion_factor = 1000000 #converts seconds to the unit specified in cfg.accuracy elif cfg.accuracy == 'ms': diff --git a/scripts/remove_permissions_for_pyboard b/scripts/remove_permissions_for_pyboard index 4897671..988ee46 100755 --- a/scripts/remove_permissions_for_pyboard +++ b/scripts/remove_permissions_for_pyboard @@ -20,7 +20,7 @@ sudo rm -f /etc/udev/rules.d/$a-pyboard.rules echo "/etc/udev/rules.d/$a-pyboard.rules was removed." else echo $'\n\n' -echo "md5sum miss match! File was probably altered manually. Make sure there are no rules not related to the pyboard in /etc/udev/rules.d/$a-pyboard.rules and delet it manually." +echo "md5sum miss match! File was probably altered manually. Make sure there are no rules not related to the pyboard in /etc/udev/rules.d/$a-pyboard.rules and delete it manually." echo $'\n\n' echo "Lines added by the grant_permissions look as follows:" echo "# f055:9800, 9801, 9802 MicroPython pyboard