Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions concore_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ A command-line interface for managing concore neuromodulation workflows.
pip install -e .
```

If the `concore` command is not on your `PATH`, the same CLI runs as a module:

```bash
python3 -m concore_cli --help
```

## Quick Start

```bash
Expand Down
4 changes: 4 additions & 0 deletions concore_cli/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .cli import cli

if __name__ == "__main__":
cli(prog_name="concore")
27 changes: 27 additions & 0 deletions tests/test_cli_main_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import subprocess
import sys
from pathlib import Path

REPO = Path(__file__).resolve().parent.parent


def _run(*args):
return subprocess.run(
[sys.executable, "-m", "concore_cli", *args],
cwd=REPO,
capture_output=True,
text=True,
)


def test_python_dash_m_runs_the_cli():
result = _run("--version")
assert result.returncode == 0, result.stderr
assert result.stdout.startswith("concore, version ")


def test_python_dash_m_shows_commands_under_the_concore_name():
result = _run("--help")
assert result.returncode == 0, result.stderr
assert "Usage: concore" in result.stdout
assert "validate" in result.stdout
Loading