Describe the problem
write_raw_bids() creates a generic boilerplate README file ("This dataset was created with...") that contains no useful dataset-specific information. If a user has already created a comprehensive README with dataset-specific documentation, write_raw_bids() overwrites it.
Related: #1042
Describe your solution
Two possible approaches:
- Don't overwrite existing README: If a README file already exists with content beyond the boilerplate, skip writing it.
- Accept a
readme parameter: Add an optional readme string parameter to write_raw_bids() that, when provided, is used instead of the boilerplate.
Option 1 is the least disruptive change and most backwards-compatible.
Describe possible alternatives
The current workaround is to write the README after all write_raw_bids() calls, overwriting the boilerplate. This works but requires careful ordering of operations.
Current downstream workaround (MOABB)
# After all write_raw_bids calls, overwrite the boilerplate README
readme_path = Path(root) / "README"
readme_path.write_text(_build_readme(dataset), encoding="utf-8")
Where _build_readme() generates a comprehensive document with paradigm info, channel setup, references, license, etc.
Additional context
Describe the problem
write_raw_bids()creates a generic boilerplate README file ("This dataset was created with...") that contains no useful dataset-specific information. If a user has already created a comprehensive README with dataset-specific documentation,write_raw_bids()overwrites it.Related: #1042
Describe your solution
Two possible approaches:
readmeparameter: Add an optionalreadmestring parameter towrite_raw_bids()that, when provided, is used instead of the boilerplate.Option 1 is the least disruptive change and most backwards-compatible.
Describe possible alternatives
The current workaround is to write the README after all
write_raw_bids()calls, overwriting the boilerplate. This works but requires careful ordering of operations.Current downstream workaround (MOABB)
Where
_build_readme()generates a comprehensive document with paradigm info, channel setup, references, license, etc.Additional context