# Contributing

# Commit Message Template

`crater.rs` uses [`git-cliff`](https://git-cliff.org/docs/) to generate changelogs based on commit messages. Please adhere to the syntax
defined in `./cliff.toml`.

e.g.,

```
feat: new feature added
```
or 
```
fix: bug squashed!
```

# Geogebra

The Geogebra repository of figures in the docs can be found [here](https://www.geogebra.org/u/clydehuibregtser).

Style:
- All SVGs should be rendered transparent. Colors should be unobtrusively dim. No glaring whites in dark mode.
- Post-cropped as needed.
- Theory diagrams should be checked into `assets/theory_diagrams`

# LaTeX

`cargo latex-doc` invokes the correct flag settings to enable the dynamic injection of the HTML header files for LaTeX.

# Building docs

Docs are bootstrapped with LaTeX and pre-configuration. Use the following:

```
> ./scripts/build_docs.sh
```

# Appendix: Maintainer Release Guide

`crater.rs` uses the wonderful `cargo-release` for automatic release. There is a `release` CI/CD job which accomplishes the following:

1. Configures `git` to allow for direct push-from-ci (via `oauth`)
2. Invokes `cargo-release`. This does the following automatically:
   1. Runs `./scripts/pre-release.sh` which:
      1. runs some end-to-end tests and generates artifacts in `./artifacts`
      2. runs `git-cliff` (config: `cliff.toml`) to generate a new changelog
   2. Updates version numbers in all known locations
   3. Publishes to `crates.io`
   4. Commits the new content as a "chore" (and skips ci), and adds the `git tag`
   5. Push (with tags) to the current branch (i.e., `main`)

As a Maintainer of this repo, when an MR lands, the `release` job should become available for manual action. Start this job with `BUMP_LEVEL=(patch|minor|major)` to officially release.