Skip to content

Commit ffbd7f0

Browse files
committed
refine import docstring with examples, notes, and interactive mode; exclude command from pydoclint checks
1 parent b6a6c2b commit ffbd7f0

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ style = "google"
145145
arg-type-hints-in-docstring = false
146146
check-return-types = false
147147
check-yield-types = false
148+
exclude = "src/mdio/commands/segy.py"
148149

149150
[tool.coverage.paths]
150151
source = ["src", "*/site-packages"]

src/mdio/commands/segy.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,25 @@ def segy_import( # noqa: PLR0913
191191
overwrite: OverwriteType = False,
192192
interactive: InteractiveType = False,
193193
) -> None:
194-
"""Import SEG-Y file to MDIO format."""
194+
"""Convert a SEG-Y file into an MDIO dataset.
195+
196+
In non-interactive mode you must provide both --mdio-template and --segy-spec.
197+
Use --interactive to be guided through selecting a template and building a SEG-Y spec.
198+
199+
\b
200+
Examples:
201+
- Non-interactive (local files):
202+
mdio segy import input.segy output.mdio --mdio-template PostStack3DTime --segy-spec segy_spec.json
203+
- Overwrite existing output:
204+
mdio segy import input.segy output.mdio --mdio-template PostStack3DDepth --segy-spec segy_spec.json --overwrite
205+
- Interactive (prompts for template and spec):
206+
mdio segy import input.segy output.mdio --interactive
207+
208+
\b
209+
Notes:
210+
- Storage options are fsspec-compatible JSON passed to --storage-input/--storage-output.
211+
- The command fails if output exists unless --overwrite is provided.
212+
"""
195213
if storage_input is not None:
196214
input_path = UPath(input_path, storage_options=storage_input)
197215

@@ -270,7 +288,7 @@ def segy_export( # noqa: PLR0913
270288
\b
271289
Example (will error until implemented):
272290
- mdio segy export input.mdio output.segy --segy-spec segy_spec.json
273-
""" # noqa: D301
291+
"""
274292
if storage_input is not None:
275293
input_path = UPath(input_path, storage_options=storage_input)
276294

0 commit comments

Comments
 (0)