Skip to content
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

codespell: add config and action to codespell the code to avoid known typos #126

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,*.pdf,*.svg
# some abbreviated citations etc
ignore-regex = .*Reson\. Ser.*
ignore-words-list = te,fo,nd,maked,datas,iten,itel,tread
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [dev]
pull_request:
branches: [dev]

permissions:
contents: read

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@v2
2 changes: 1 addition & 1 deletion pypulseq/Sequence/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def plot(

Parameters
----------
label : str, defualt=str()
label : str, default=str()
Plot label values for ADC events: in this example for LIN and REP labels; other valid labes are accepted as
a comma-separated list.
save : bool, default=False
Expand Down
2 changes: 1 addition & 1 deletion pypulseq/event_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class EventLibrary:
"""
Defines an event library ot maintain a list of events. Provides methods to insert new data and find existing data.
Defines an event library to maintain a list of events. Provides methods to insert new data and find existing data.

Sequence Properties:
- keys - A list of event IDs
Expand Down
2 changes: 1 addition & 1 deletion pypulseq/seq_examples/scripts/write_MPRAGE.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def main(plot: bool, write_seq: bool, seq_filename: str = "mprage_pypulseq.seq")

# Calculate timing of the fast loop. We will have two blocks in the inner loop:
# 1: spoilers/rewinders + RF
# 2: prewinder, phase enconding + readout
# 2: prewinder, phase encoding + readout
rf.delay = pp.calc_duration(gro_Sp, gpe1, gpe2)
gro_pre, _, _ = pp.align(right=[gro_pre, gpe1, gpe2])
gro1.delay = pp.calc_duration(gro_pre)
Expand Down