Skip to content
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
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell
Comment thread
vanandrew marked this conversation as resolved.

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
- name: Codespell
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ repos:
language: script
stages: [commit-msg]
entry: scripts/check-gitmoji.sh

- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies:
- tomli; python_version<'3.11'
2 changes: 1 addition & 1 deletion include/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace py = pybind11;

/**
* @brief print sequnce
* @brief print sequence
*
* @tparam sequence
* @param seq
Expand Down
2 changes: 1 addition & 1 deletion include/warps.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ py::array_t<T, py::array::f_style> compute_jacobian_determinant(py::array_t<T, p
typename DisplacementFieldJacobianDeterminantFilterType::Pointer jacobian_filter =
DisplacementFieldJacobianDeterminantFilterType::New();

// Pass displacment fields into jacobian filters
// Pass displacement fields into jacobian filters
jacobian_filter->SetInput(field);
jacobian_filter->SetUseImageSpacingOff();

Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,15 @@ archs = ["auto"]
archs = ["universal2"]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
before-build = ["pip install delocate>=0.13.0"]

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = './.git*,*/.git-meta/*,*.pdf,*.lock,*include/romeo/*,*include/itk/*,*/build/*,*/.venv/*'
check-hidden = true
# ignore-words-list rationale:
# te,tes - MR-physics abbreviations (echo time / echo times); see CLAUDE.md
# nd - DICOM ImageType flag in BIDS test fixtures
# datas - PyInstaller Analysis() parameter name (packaging/pyinstaller/)
# framei - loop variable "frame i" in tests/test_distortion.py
# thirdparty - refers to ITK's ThirdParty/Eigen3 module in CMakeLists.txt comment
ignore-words-list = 'te,tes,nd,datas,framei,thirdparty'
2 changes: 1 addition & 1 deletion warpkit/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run_executor(
for future in as_completed(futures):
# get the index of the future
idx = futures[future]
# pass thre result of the future to the post_fn
# pass the result of the future to the post_fn
if post_fn is not None:
post_fn(idx, future.result())

Expand Down
6 changes: 3 additions & 3 deletions warpkit/unwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def unwrap_phase(
npt.NDArray[np.bool_], binary_dilation(combined_mask, strel, iterations=2)
)

# get a dilated verision of the mask
# get a dilated version of the mask
combined_mask_dilated = cast(
npt.NDArray[np.bool_],
binary_dilation(combined_mask, strel, iterations=automask_dilation),
Expand Down Expand Up @@ -533,7 +533,7 @@ def check_temporal_consistency_corr(
# get the correlation between the current frame and all other frames
corr = corr2_coeff(current_frame_data, unwrapped_echo_1[brain_mask, :]).ravel()

# threhold the RD
# threshold the RD
tmask = corr > threshold

# get indices of mask
Expand Down Expand Up @@ -653,7 +653,7 @@ def compute_offset(
# compute closest multiple of 2pi to the difference
int_map = np.round(y_diff / (2 * np.pi)).astype(int)

# compute the most often occuring multiple
# compute the most often occurring multiple
best_offset = mode(int_map, axis=0, keepdims=False).mode
best_offset = cast(int, best_offset)

Expand Down
2 changes: 1 addition & 1 deletion warpkit/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def field_maps_to_displacement_maps(
Returns
-------
nib.Nifti1Image
Displacment maps in mm
Displacement maps in mm
"""
voxel_size = _signed_pe_voxel_size(field_maps, phase_encoding_direction)

Expand Down
Loading