From 16f6caaf0268dbf4325e56ecdcd582beb533c3af Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 24 Mar 2023 14:51:08 -0400 Subject: [PATCH 1/5] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/codespell.yml 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 From acf0db2e5b01f14a177932b75967b1773e8e3a1e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 24 Mar 2023 14:51:08 -0400 Subject: [PATCH 2/5] Add rudimentary .codespellrc --- .codespellrc | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..5aa4b5e --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,*.pdf,*.svg +# ignore-words-list = From 971b215916939c954185fbe61c0e1b53c493848e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 24 Mar 2023 14:52:12 -0400 Subject: [PATCH 3/5] ignore extint --- .codespellrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 5aa4b5e..115105a 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,4 @@ [codespell] skip = .git,*.pdf,*.svg -# ignore-words-list = +# extint - function/variable name +ignore-words-list = extint From 423be1c781f8343a95f8ae400b6264d062e7e8cd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 24 Mar 2023 14:57:08 -0400 Subject: [PATCH 4/5] resolving ambigous typos --- README.rst | 2 +- cosplay/server.py | 2 +- documentation/COSplay.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/server.py b/cosplay/server.py index a790a5d..962e339 100755 --- a/cosplay/server.py +++ b/cosplay/server.py @@ -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 From dad5cfab0775920ef87de8f41a55410e4225b7eb Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 24 Mar 2023 14:57:27 -0400 Subject: [PATCH 5/5] [DATALAD RUNCMD] run codespell throughout === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- cosplay/dump_mem.py | 4 ++-- cosplay/server.py | 2 +- documentation/pyboard.rst | 6 +++--- pyboard/lib/tsv.py | 2 +- pyboard/main.py | 4 ++-- scripts/remove_permissions_for_pyboard | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) 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 962e339..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 ---------- 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