From 09bb894fabc01fad32a27a009502b03563233e35 Mon Sep 17 00:00:00 2001 From: Serge Masiutin Date: Wed, 30 Oct 2024 23:59:40 +0400 Subject: [PATCH] Update README and rename config file for Revus Expanded the README with installation, setup, and usage instructions for Revus. Renamed `config.toml` to `revus.toml` across the project, updated the configuration loading path, and added a new `model_name` parameter. --- README.md | 46 +++++++++++++++++++++++++++++++++++++-- config.toml => revus.toml | 3 ++- revus/app/config.py | 2 +- revus/app/llm_client.py | 2 +- 4 files changed, 48 insertions(+), 5 deletions(-) rename config.toml => revus.toml (67%) diff --git a/README.md b/README.md index a186cf4..2e9fdc0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,48 @@ ## What's Revus? -This application performs automatic reviews. +Revus is an automated pull request (PR) review application that uses large language models (LLMs) to streamline and standardize code reviews. -The README will be updated as the application is developed. \ No newline at end of file +## Install + +```bash +pipx install revus +``` + +## Setup + +Create a configuration file called `revus.toml` with the following parameters: + +- `OPENAI_API_KEY` - your OpenAI API key, available [here](https://platform.openai.com/). +- `model_name` - any available OpenAI model (default is gpt-4o-mini). +- `file_types` - specify file types for the application to read using an array of strings (default is [“.py”]). +- `language` - specify the language for review content (default is English). +- `exclude_paths` - files or paths the application should ignore. +- `custom_rules`- custom rules for review, if needed. + +## Usage + +To review changes with Revus, first add modified files to staging: +```bash +git add +``` +or add all files: +```bash +git add . +``` +Then, run the application in the project folder: +```bash +revus +``` + +**Important**: Revus reviews each file individually, simplifying context management. + +*New features will be added soon.* + +## Additional Notes + +This project is in active development, currently in alpha, and may have limited or experimental features. + +### Contacts + +For issues or suggestions, reach out on [Telegram](https://t.me/serge_masiutin) or [Linkedin](https://www.linkedin.com/in/serge-masiutin/). diff --git a/config.toml b/revus.toml similarity index 67% rename from config.toml rename to revus.toml index 1456883..97f52a1 100644 --- a/config.toml +++ b/revus.toml @@ -1,6 +1,7 @@ OPENAI_API_KEY = "" file_types = [".py"] -language = "russian" +model_name = "gpt-4o-mini" +language = "English" exclude_paths = [ "__init__.py" ] diff --git a/revus/app/config.py b/revus/app/config.py index 740a891..ce10791 100644 --- a/revus/app/config.py +++ b/revus/app/config.py @@ -8,7 +8,7 @@ def _load_config(): - config_path = os.path.join(os.getcwd(), "config.toml") + config_path = os.path.join(os.getcwd(), "revus.toml") if os.path.exists(config_path): try: with open(config_path, "r") as config_file: diff --git a/revus/app/llm_client.py b/revus/app/llm_client.py index 4a01fcf..49e21c0 100644 --- a/revus/app/llm_client.py +++ b/revus/app/llm_client.py @@ -14,7 +14,7 @@ def _initialize_llm(params=None): if not api_key: log_error( - "You need to create a config.toml file and add your OPENAI_API_KEY there." + "You need to create a revus.toml file and add your OPENAI_API_KEY there." ) sys.exit(1) model_name = get_config("model_name", "gpt-4o-mini")