Skip to content

Commit

Permalink
Improve documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
theoforger committed Nov 21, 2024
1 parent 168b3f5 commit 0936011
Show file tree
Hide file tree
Showing 6 changed files with 2,513 additions and 27 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
22 changes: 10 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,25 @@ git clone https://github.com/theoforger/mastermind.git
cd mastermind
```

### Configure Environment Variables
### Build the Project

Make a copy of [`example.env`](example.env) and name it `.env`
Run the following command:

```bash
cp example.env .env
cargo build
```

Edit `.env` to add or modify:
- API key
- The base URL of an OpenAI-compatible API
- A default language model
### Configure Environment Variables

### Build the Project
See: https://github.com/theoforger/mastermind?tab=readme-ov-file#%EF%B8%8F-configure

Run the following command:
Alternatively, you can make use of the `.env` file. Simply make a copy of example.env and name it .env

```bash
cargo build
cp example.env .env
```

Then edit .env and provide you preferred configuration.

## ✒️ Linting / Code Formatting
Before you commit, make sure the following linting/formatting tools using the options below. Commit only when your code is error/warning free.
Expand All @@ -59,7 +57,7 @@ cargo fmt
```

### Clippy
If you don't have `clippy` installed already. Add it through `rustup`:
If you don't have `clippy` installed already (which is very unlikely). Add it through `rustup`:
```bash
rustup component add clippy
```
Expand All @@ -74,4 +72,4 @@ cargo clippy --all-features --all-targets -- -W clippy::all
We recommend [RustRover](https://www.jetbrains.com/rust/) for contributions to this project. It comes with first-party support for both `rustfmt` and `clippy`. To enable them:

- `rustfmt`: Open "Settings -> Rust -> Rustfmt". Enable "Use Rustfmt instead of the built-in formatter"
- `clippy`: Open "Settings -> Rust -> External Linters". Set "External tool" to `Clippy`. Set "Additional arguments" to `--all-features --all-targets -- -W clippy::all`
- `clippy`: Open "Settings -> Rust -> External Linters". Set "External tool" to `Clippy`. Set "Additional arguments" to `--all-features --all-targets -- -W clippy::all`
Loading

0 comments on commit 0936011

Please sign in to comment.