Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
68f591a
migrate CLI from `click` to `typer` and redo SEG-Y import
tasansal Oct 19, 2025
867595e
add `version` command to CLI
tasansal Oct 19, 2025
acc3537
migrate CLI tests to `typer` and remove outdated test cases
tasansal Oct 19, 2025
0629151
add comments to per-file-ignores in Ruff configuration for clarity
tasansal Oct 19, 2025
3304b04
remove unused `click-params` dependency from pyproject.toml
tasansal Oct 19, 2025
05e4ed3
replace `sphinx-click` with `sphinxcontrib-typer` in dependencies
tasansal Oct 19, 2025
539daad
replace `sphinx_click` with `sphinxcontrib.typer` in docs configuration
tasansal Oct 19, 2025
00d9d5f
replace `sphinx-click` with `sphinxcontrib-typer` in documentation de…
tasansal Oct 19, 2025
df850bd
replace `sphinx-click` with `sphinxcontrib-typer` in nox documentatio…
tasansal Oct 19, 2025
b83b4f5
replace `sphinx-click` with `sphinxcontrib-typer` in CLI usage docume…
tasansal Oct 19, 2025
b9e39d0
remove `:nested: full` directive from CLI usage documentation
tasansal Oct 19, 2025
45ce6b7
add additional directives to CLI usage documentation for improved ren…
tasansal Oct 19, 2025
c7f0cfe
replace generic `ValueError` with specific `MDIOMissingFieldError` wh…
tasansal Oct 19, 2025
a76653d
improve SEG-Y CLI: add default values, enhance prompts, and handle ad…
tasansal Oct 19, 2025
5fa5386
extend SEG-Y CLI: add custom JSONParamType, improve UPathParam handli…
tasansal Oct 19, 2025
92f0ad6
reorder input path existence check in SEG-Y CLI to ensure proper hand…
tasansal Oct 19, 2025
81c3c3b
update docstring in SEG-Y CLI UPathParam to correctly describe conver…
tasansal Oct 19, 2025
dfe06b9
update docstring in SEG-Y CLI UPathParam to correctly describe conver…
tasansal Oct 19, 2025
2f659b1
enhance SEG-Y CLI: replace `print` with `typer.secho`, add interactiv…
tasansal Oct 19, 2025
b28fc94
update SEG-Y CLI: refine help text for interactive prompts to clarify…
tasansal Oct 19, 2025
0a56224
refactor SEG-Y CLI: rename `storage_options_input/output` to `storage…
tasansal Oct 19, 2025
1f90500
replace `ValueError` with `MDIOMissingFieldError` in SEG-Y validation…
tasansal Oct 20, 2025
5d32bad
add help text to segy subcommand
tasansal Oct 20, 2025
826b39a
add export subcommand skeleton
tasansal Oct 20, 2025
19976d9
refine docstring and help text
tasansal Oct 20, 2025
12afcb9
add example for export
tasansal Oct 20, 2025
b6a6c2b
update ruff config: allow D301 in CLI commands for raw string rules
tasansal Oct 20, 2025
ffbd7f0
refine import docstring with examples, notes, and interactive mode; e…
tasansal Oct 20, 2025
4fab9d6
update CLI usage doc and refine SEG-Y command examples
tasansal Oct 20, 2025
fc6ced3
update `typer` to version 0.20.0
tasansal Oct 20, 2025
8390f46
using `REVISION_MAP`: nicer user prompts
tasansal Oct 20, 2025
797083f
add minimal trace headers import option during SEG-Y spec creation
tasansal Oct 20, 2025
76d0c9c
refine logic and add txt header dump
tasansal Oct 21, 2025
3669de3
Merge branch 'main' into new-cli
tasansal Oct 25, 2025
2adf2af
Merge remote-tracking branch 'origin/new-cli' into new-cli
tasansal Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/cli_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ For each command / subcommand you can provide `--help` argument to
get information about usage.

```{eval-rst}
.. click:: mdio.__main__:main
.. typer:: mdio.cli:app
:prog: mdio
:nested: full
:theme: monokai
:width: 100
:show-nested:
:make-sections:
```
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinxcontrib.autodoc_pydantic",
"sphinxcontrib.typer",
"sphinx.ext.autosectionlabel",
"sphinx_click",
"sphinx_copybutton",
"myst_nb",
"sphinx_design",
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ linkify-it-py==2.0.3
matplotlib==3.10.6
myst-nb==1.3.0
sphinx==8.2.3
sphinx-click==6.1.0
sphinxcontrib-typer==0.6.2
sphinx-copybutton==0.5.2
sphinx-design==0.6.1
ipywidgets==8.1.7
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def docs_build(session: Session) -> None:
"matplotlib",
"myst-nb",
"sphinx",
"sphinx-click",
"sphinxcontrib-typer",
"sphinx-copybutton",
"sphinx-design",
"ipywidgets",
Expand Down Expand Up @@ -261,8 +261,8 @@ def docs(session: Session) -> None:
"matplotlib",
"myst-nb",
"sphinx",
"sphinxcontrib-typer",
"sphinx-autobuild",
"sphinx-click",
"sphinx-copybutton",
"sphinx-design",
"ipywidgets",
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ classifiers = [
]

dependencies = [
"click>=8.3.0",
"click-params>=0.5.0",
"typer>=0.20.0",
"dask>=2025.9.1",
"fsspec>=2025.9.0",
"pint>=0.25.0",
"psutil>=7.1.0",
"pydantic>=2.12.0",
"rich>=14.1.0",
"questionary>=2.1.1",
"segy>=0.5.3",
"tqdm>=4.67.1",
"universal-pathlib>=0.3.3",
Expand All @@ -44,7 +43,7 @@ repository = "https://github.com/TGSAI/mdio-python"
documentation = "https://mdio-python.readthedocs.io"

[project.scripts]
mdio = "mdio.__main__:main"
mdio = "mdio.cli:app"

[dependency-groups]
dev = [
Expand All @@ -68,8 +67,8 @@ docs = [
"matplotlib>=3.10.6",
"myst-nb>=1.3.0",
"sphinx>=8.2.3",
"sphinxcontrib-typer>=0.6.2",
"sphinx-autobuild>=2025.8.25",
"sphinx-click>=6.1.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.1",
"ipywidgets>=8.1.7",
Expand Down Expand Up @@ -123,9 +122,10 @@ ignore = [
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR2004"]
"tests/integration/test_segy_import_export_masked.py" = ["E501"]
"docs/tutorials/*.ipynb" = ["S101"]
"tests/*" = ["S101", "PLR2004"] # allow assertions and magic value comparison
"tests/integration/test_segy_import_export_masked.py" = ["E501"] # allow long lines for readibility
"docs/tutorials/*.ipynb" = ["S101"] # allow assertions
"src/mdio/commands/*.py" = ["PLC0415", "D301"] # allow delayed imports and \b without raw strings

[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
Expand All @@ -145,6 +145,7 @@ style = "google"
arg-type-hints-in-docstring = false
check-return-types = false
check-yield-types = false
exclude = "src/mdio/commands/segy.py"

[tool.coverage.paths]
source = ["src", "*/site-packages"]
Expand Down
88 changes: 0 additions & 88 deletions src/mdio/__main__.py

This file was deleted.

10 changes: 10 additions & 0 deletions src/mdio/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Entrypoint to the MDIO command line interface (CLI)."""

import typer

from mdio.commands import segy
from mdio.commands import version

app = typer.Typer(no_args_is_help=True)
app.add_typer(segy.app, name="segy")
app.add_typer(version.app)
Loading
Loading