Document (or align) which clean_rawdata steps mutate their input

Open Beginner friendly
#541 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
documentation

Research direction

Read the docstrings for clean_drifts, clean_flatlines, clean_channels, clean_channels_nolocs, and clean_windows; the issue reports their input mutation and copy behavior. Check whether the existing documentation already states what happens to the input, then update each docstring to describe the observed behavior. Done when callers can tell from each docstring whether the input is mutated or copied.

Written by the indexing model from the issue text.

Description

Measured on eegprep 0.5.0 by comparing a hash of the data and the keys of etc before and after each call:

function behaviour
clean_drifts mutates its input in place (data and etc) and returns the same object
clean_flatlines returns the same object when nothing is removed, a new one otherwise
clean_channels, clean_channels_nolocs same as clean_flatlines
clean_windows deep-copies and leaves its input untouched
pop_eegfiltnew, pop_select copy

A caller that keeps the original around must know this.
Expected: state it in each docstring, ideally copy consistently.

Dominant language
Python
Stars
38
Forks
7
Avg merge
1d 3h
Merged PRs (30d)
65

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sccn/eegprep

All issues in sccn/eegprep

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.