Skip to content

New CLI for MDIO v1 with lots of interactivity - #728

Draft
tasansal wants to merge 35 commits into
mainfrom
new-cli
Draft

New CLI for MDIO v1 with lots of interactivity#728
tasansal wants to merge 35 commits into
mainfrom
new-cli

Conversation

@tasansal

Copy link
Copy Markdown
Contributor

No description provided.

@tasansaltasansal self-assigned this Oct 19, 2025
@tasansaltasansal added the enhancement New feature or request label Oct 19, 2025

@BrianMichellBrianMichell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just took a quick pass over this

def prompt_for_segy_standard() -> SegyStandard:
"""Prompt user to select a SEG-Y standard."""
choices = list(REVISION_MAP.keys())
standard_str = questionary.select("Select SEG-Y standard:", choices=choices, default="rev 1").ask()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
standard_str=questionary.select("Select SEG-Y standard:", choices=choices, default="rev 1").ask()
standard_str=questionary.select("Select SEG-Y standard:", choices=choices, default=str(SegyStandard.REV1)).ask()


def prompt_for_text_encoding() -> str:
"""Prompt user for text header encoding."""
return questionary.select("Select text header encoding:", choices=["ebcdic", "ascii"], default="ebcdic").ask()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to pull the choices into a list similar to REVISION_MAP?

Comment threadsrc/mdio/commands/segy.py Outdated
except ValueError:
print(f"Invalid {field_type} field spec '{custom_field}'. Use format: name,byte,format")
continue
if questionary.confirm("Done adding fields?", default=True).ask():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ifquestionary.confirm("Done adding fields?", default=True).ask():
ifquestionary.confirm("Done adding fields?", default=False).ask():

User is likely to add more than one field.

raise typer.Abort from None


SegyOutType = Annotated[UPath, typer.Argument(help="Path to the input SEG-Y file.", click_type=UPathParamType())]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SegyOutType=Annotated[UPath, typer.Argument(help="Path to the input SEG-Y file.", click_type=UPathParamType())]
SegyInType=Annotated[UPath, typer.Argument(help="Path to the input SEG-Y file.", click_type=UPathParamType())]

storage_options_output: dict[str, Any],
overwrite: bool,
grid_overrides: dict[str, Any],
input_path: SegyOutType,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
input_path: SegyOutType,
input_path: SegyInType,

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@tasansal@BrianMichell