Skip to content

Commit

Permalink
Update README and rename config file for Revus
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sudobooo committed Oct 30, 2024
1 parent f5cca05 commit 09bb894
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
## 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 <file_name>
```
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/).
3 changes: 2 additions & 1 deletion config.toml → revus.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
OPENAI_API_KEY = ""
file_types = [".py"]
language = "russian"
model_name = "gpt-4o-mini"
language = "English"
exclude_paths = [
"__init__.py"
]
Expand Down
2 changes: 1 addition & 1 deletion revus/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion revus/app/llm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 09bb894

Please sign in to comment.