Skip to content

Fix/run checks #3118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[alias]
bb = "run --release --bin burnbench --"
xtask = "run --target-dir target/xtask --color always --package xtask --bin xtask --"
xtask = "run --target-dir target/xtask --color always --package xtask --bin xtask --"
run-checks = "xtask -E all validate"
10 changes: 9 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

### Checklist

- [ ] Confirmed that `run-checks all` script has been executed.
- [ ] Confirmed that `cargo run-checks` command has been executed.
- [ ] Made sure the book is up to date with changes in this PR.


> [!TIP]
> Want more detailed macro error diagnostics? This is especially useful for debugging tensor-related tests:
>
> ```bash
> RUSTC_BOOTSTRAP=1 RUSTFLAGS="-Zmacro-backtrace" cargo run-checks
> ```

### Related Issues/PRs

_Provide links to relevant issues and dependent PRs._
Expand Down
15 changes: 11 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@ Be sure to follow the coding standards and guidelines used in the rest of the pr

### Step 6: Validate code before opening a Pull Request

Before you open a pull request, please run [`./run-checks.sh all`](/run-checks.sh). This
Before you open a pull request, please run [`cargo run-checks`]. This
will ensure that your changes are in line with our project's standards and guidelines. You can run
this script by opening a terminal, navigating to your local project directory, and typing
`./run-checks`.
the validation checks by opening a terminal, navigating to your local project directory, and typing
`cargo run-checks`.

> [!TIP]
> Want more detailed macro error diagnostics? This is especially useful for debugging tensor-related tests:
>
> ```bash
> RUSTC_BOOTSTRAP=1 RUSTFLAGS="-Zmacro-backtrace" cargo run-checks
> ```

Note that under the hood `run-checks` runs the `cargo xtask validate` command which is powered by
the [tracel-xtask crate](https://github.com/tracel-ai/xtask). It is recommended to get familiar with
Expand Down Expand Up @@ -99,7 +106,7 @@ You may also want to enable debugging by creating a `.vscode/settings.json` file

We believe in clean and efficient code. While we don't enforce strict coding guidelines, we trust
and use tools like `cargo fmt` and `cargo clippy` to maintain code quality. These are integrated
into our `run-checks` script, ensuring consistency across our codebase.
into the `run-checks` command, ensuring consistency across our codebase.

### Writing Expect Messages

Expand Down
23 changes: 15 additions & 8 deletions contributor-book/src/getting-started/setting-up-the-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ There are a few commands you will want to run prior to any commit for a non-draf
2. `cargo clippy --fix` will run [Clippy](https://github.com/rust-lang/rust-clippy) and fix any
coding issues it can. Clippy necessitates to be in a clean Git state, but this can be
circumvented by adding the `--allow-dirty` flag.
3. `cargo xtask check all` is a script located in the project root that builds and tests the
project. It is required to run successfully prior to merging a PR. Fair warning, running these
tests can take a while[^linux_mem_note].
3. `cargo run-checks` is a command used to test the project. It is required to run successfully
prior to merging a PR. Fair warning, running these tests can take a while[^linux_mem_note].

> Want more detailed macro error diagnostics? This is especially useful for debugging tensor-related tests:
>
> ```bash
> RUSTC_BOOTSTRAP=1 RUSTFLAGS="-Zmacro-backtrace" cargo run-checks
> ```

## Updating the burn semver version

Expand All @@ -34,14 +39,16 @@ Alternatively, if you want to install mdbook directly, run the following command
cargo install mdbook
```

Also instead of running `cargo xtask check all`, you can run `cargo xtask check typos` to
only check for misspellings. This will install [typo](https://crates.io/crates/typos-cli), and if
any are encountered you should be able to run `typo -w /path/to/book` to fix them.
Also instead of running `cargo run-checks`, you can run `cargo xtask check typos` to only check
for misspellings. This will install [typo](https://crates.io/crates/typos-cli), and if any are
encountered you should be able to run `typo -w /path/to/book` to fix them.

[^linux_mem_note]: If your system is running into issues with memory and you are on linux, you may want to switch
[^linux_mem_note]:
If your system is running into issues with memory and you are on linux, you may want to switch
to a [virtual console](https://wiki.archlinux.org/title/Linux_console#Virtual_consoles) to run
the tests. To do this, press `ctrl+alt+f3` to switch to a virtual console (and log in), and
either `ctrl+alt+f1` or `ctrl+alt+f2` to switch back to your graphical session.

[^update_note]: You might also want to install [cargo-update](https://github.com/nabijaczleweli/cargo-update) to
[^update_note]:
You might also want to install [cargo-update](https://github.com/nabijaczleweli/cargo-update) to
easily keep your tools up to date, though it is in no way required.
23 changes: 0 additions & 23 deletions run-checks.ps1

This file was deleted.

22 changes: 0 additions & 22 deletions run-checks.sh

This file was deleted.