From 7eb0cb1ec071b1442926e6d1a4c0bc7d29c3fa2d Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 17 Jul 2023 18:45:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Improve=20README=20and=20help=20?= =?UTF-8?q?command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++++++-- bump_pydantic/main.py | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3e05594..8fbfcf8 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,19 @@ pip install bump-pydantic `bump-pydantic` is a CLI tool, hence you can use it from your terminal. -To see the available options, you can run: +It's easy to use. If your project structure is: ```bash -bump-pydantic --help +repository/ +└── my_package/ + └── +``` + +Then you'll want to do: + +```bash +cd /path/to/repository +bump-pydantic my_package ``` ### Check diff before applying changes diff --git a/bump_pydantic/main.py b/bump_pydantic/main.py index 8cc83ae..7f1c282 100644 --- a/bump_pydantic/main.py +++ b/bump_pydantic/main.py @@ -20,11 +20,7 @@ from bump_pydantic.codemods import Rule, gather_codemods from bump_pydantic.codemods.class_def_visitor import ClassDefVisitor -app = Typer( - help="Convert Pydantic from V1 to V2 ♻️", - invoke_without_command=True, - add_completion=False, -) +app = Typer(invoke_without_command=True, add_completion=False) P = ParamSpec("P") T = TypeVar("T") @@ -50,6 +46,10 @@ def main( help="Show the version and exit.", ), ): + """Convert Pydantic from V1 to V2 ♻️ + + Check the README for more information: https://github.com/pydantic/bump-pydantic. + """ console = Console(log_time=True) console.log("Start bump-pydantic.") # NOTE: LIBCST_PARSER_TYPE=native is required according to https://github.com/Instagram/LibCST/issues/487.