Skip to content

Commit 8e4bd3a

Browse files
committed
Update running instructions
1 parent 749bd2a commit 8e4bd3a

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,23 @@ RATEACUITY_PASSWORD=...
4040
## Running the CLI
4141

4242
```bash
43-
uv run python -m tariff_fetch.cli [OPTIONS]
43+
python -m tariff-fetch.cli [OPTIONS]
44+
python -m tariff-fetch.cli_gas [OPTIONS]
4445
```
4546

46-
`just cli` runs the same command if you use the supplied Justfile.
47+
With uv:
48+
49+
```bash
50+
uv run tariff-fetch [OPTIONS]
51+
uv run tariff-fetch-gas [OPTIONS]
52+
```
53+
54+
With Just:
55+
56+
```bash
57+
just cli
58+
just cligas
59+
```
4760

4861
Options:
4962
- `--state` / `-s`: two-letter state abbreviation (default: prompt)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Repository = "https://github.com/switchbox-data/tariff_fetch"
3636
Documentation = "https://switchbox-data.github.io/tariff_fetch/"
3737

3838
[project.scripts]
39-
tariff-fetch="tariff_fetch.cli:main"
40-
tariff-fetch-gas="tariff_fetch.cli_gas:main"
39+
tariff-fetch="tariff_fetch.cli:main_cli"
40+
tariff-fetch-gas="tariff_fetch.cli_gas:main_cli"
4141

4242
[dependency-groups]
4343
dev = [

tariff_fetch/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,9 @@ def main(
149149
)
150150

151151

152-
if __name__ == "__main__":
152+
def main_cli():
153153
typer.run(main)
154+
155+
156+
if __name__ == "__main__":
157+
main_cli()

tariff_fetch/cli_gas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@ def main(
4242
)
4343

4444

45-
if __name__ == "__main__":
45+
def main_cli():
4646
typer.run(main)
47+
48+
49+
if __name__ == "__main__":
50+
main_cli()

0 commit comments

Comments
 (0)