Skip to content

Conversation

@drammock
Copy link
Member

@drammock drammock commented Sep 26, 2025

PR Description

I encountered a case where the same helper function (_write_coordsystem_json) was being called twice in a row in write_raw_bids:

mne-bids/mne_bids/write.py

Lines 2035 to 2052 in 98cb9f5

_write_coordsystem_json(
raw=raw,
unit=unit,
hpi_coord_system=orient,
sensor_coord_system=sensor_coord_system,
fname=coordsystem_path.fpath,
datatype=bids_path.datatype,
overwrite=overwrite,
)
_write_coordsystem_json(
raw=raw,
unit=unit,
hpi_coord_system=orient,
sensor_coord_system=sensor_coord_system,
fname=coordsystem_path.fpath,
datatype=bids_path.datatype,
overwrite=overwrite,
)

Origin seems to be #980

This removes one of the duplicated calls.

Merge checklist

Maintainer, please confirm the following before merging.
If applicable:

  • All comments are resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • New contributors have been added to CITATION.cff
  • PR description includes phrase "closes <#issue-number>"

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.42%. Comparing base (98cb9f5) to head (367e658).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1445      +/-   ##
==========================================
- Coverage   97.42%   97.42%   -0.01%     
==========================================
  Files          40       40              
  Lines        9137     9136       -1     
==========================================
- Hits         8902     8901       -1     
  Misses        235      235              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sappelhoff sappelhoff merged commit a478527 into mne-tools:main Sep 27, 2025
24 checks passed
@sappelhoff
Copy link
Member

Thanks!

@drammock drammock deleted the dedup branch November 13, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants