Skip to content

Commit 0b2a1fd

Browse files
committed
fix: cli command
1 parent 6611687 commit 0b2a1fd

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,28 @@ pip install "sphinx-autodoc-vyper[dev]"
2525

2626
1. Generate documentation:
2727
```bash
28-
vyper-docs /path/to/contracts
28+
sphinx-autodoc-vyper /path/to/contracts
2929
```
3030

3131
2. Generate and serve documentation:
3232
```bash
33-
vyper-docs /path/to/contracts --serve
33+
sphinx-autodoc-vyper /path/to/contracts --serve
3434
```
3535

3636
## Usage
3737

3838
```bash
3939
# Basic usage
40-
vyper-docs /path/to/contracts
40+
sphinx-autodoc-vyper /path/to/contracts
4141

4242
# Specify custom output directory
43-
vyper-docs /path/to/contracts -o /path/to/output
43+
sphinx-autodoc-vyper /path/to/contracts -o /path/to/output
4444

4545
# Generate and serve documentation on port 8000
46-
vyper-docs /path/to/contracts --serve
46+
sphinx-autodoc-vyper /path/to/contracts --serve
4747

4848
# Specify custom port
49-
vyper-docs /path/to/contracts --serve --port 8080
49+
sphinx-autodoc-vyper /path/to/contracts --serve --port 8080
5050
```
5151

5252
## Example

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dev = [
4040
]
4141

4242
[project.scripts]
43-
vyper-docs = "sphinx_autodoc_vyper.cli:main"
43+
sphinx-autodoc-vyper = "sphinx_autodoc_vyper.cli:main"
4444

4545
[project.urls]
4646
Homepage = "https://github.com/BobTheBuidler/sphinx-autodoc-vyper"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"requests>=2.0.0", # For testing server
1515
]
1616
},
17-
entry_points={"console_scripts": ["vyper-docs=sphinx_autodoc_vyper.cli:main"]},
17+
entry_points={"console_scripts": ["sphinx-autodoc-vyper=sphinx_autodoc_vyper.cli:main"]},
1818
author="Vyper Developer",
1919
description="Sphinx documentation generator for Vyper smart contracts",
2020
long_description=open("README.md").read(),

sphinx_autodoc_vyper/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def serve_docs(build_dir: Path, port: int = 8000) -> NoReturn: # type: ignore [
1313

1414
if not build_dir.exists():
1515
raise FileNotFoundError(
16-
"Documentation not found. Run 'vyper-docs' first to generate the documentation."
16+
"Documentation not found. Run 'sphinx-autodoc-vyper' first to generate the documentation."
1717
)
1818

1919
os.chdir(build_dir)

tests/test_cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_cli_basic(contracts_dir: Path, output_dir: Path, monkeypatch, capsys) -
1212
# Mock sys.argv
1313
monkeypatch.setattr(
1414
"sys.argv",
15-
["vyper-docs", str(contracts_dir), "--output", str(output_dir)],
15+
["sphinx-autodoc-vyper", str(contracts_dir), "--output", str(output_dir)],
1616
)
1717

1818
# Run CLI
@@ -42,7 +42,7 @@ def test_cli_invalid_contracts_dir(tmp_path: Path, monkeypatch, capsys) -> None:
4242
invalid_dir = tmp_path / "nonexistent"
4343

4444
# Mock sys.argv
45-
monkeypatch.setattr("sys.argv", ["vyper-docs", str(invalid_dir)])
45+
monkeypatch.setattr("sys.argv", ["sphinx-autodoc-vyper", str(invalid_dir)])
4646

4747
# Run CLI and check for error
4848
with pytest.raises(FileNotFoundError) as e:

0 commit comments

Comments
 (0)