Conversation
…en required fields are missing
…ng, and support storage options
…ling of storage options
…e mode and error handling improvements
…_input/output` for clarity
… tests for more specific error handling
…xclude command from pydoclint checks
Collaborator
BrianMichell
left a comment
There was a problem hiding this comment.
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() |
Collaborator
There was a problem hiding this comment.
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() |
Collaborator
There was a problem hiding this comment.
Do we want to pull the choices into a list similar to REVISION_MAP?
src/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(): |
Collaborator
There was a problem hiding this comment.
Suggested change
| if questionary.confirm("Done adding fields?", default=True).ask(): | |
| if questionary.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())] |
Collaborator
There was a problem hiding this comment.
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, |
Collaborator
There was a problem hiding this comment.
Suggested change
| input_path: SegyOutType, | |
| input_path: SegyInType, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.