Skip to content

Commit

Permalink
Modify contributing md scripts to solve conflicts between doc and scr…
Browse files Browse the repository at this point in the history
…ipts (#2107)

* modified scripts comments and contributing.md to solve conflicts between them

* modified default value for checktypes and added NoArgs enum value

* added burn tch installation link

* Removed NoArgs enum value and use All as default
  • Loading branch information
tiruka authored Aug 5, 2024
1 parent 9405713 commit a53f459
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You may also want to enable debugging by creating a `.vscode/settings.json` file
On Unix systems, run `run-checks.sh` using this command

```
run-checks.sh environment
./run-checks.sh environment
```

On Windows systems, run `run-checks.ps1` using this command:
Expand All @@ -106,9 +106,12 @@ run-checks.ps1 environment
The `environment` argument can assume **ONLY** the following values:

- `std` to perform checks using `libstd`
- `no_std` to perform checks on an embedded environment using `libcore`
- `no-std` to perform checks on an embedded environment using `libcore`
- `typos` to check for typos in the codebase
- `examples` to check the examples compile

If no `environment` value has been passed, run both `std` and `no_std` checks.
If no `environment` value has been passed, run all checks except examples.
If you have an error related to `torch` installation, see [Burn Torch Backend Installation](./crates/burn-tch/README.md#Installation)

## Continuous Deployment

Expand Down
2 changes: 1 addition & 1 deletion run-checks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# where `environment` can assume **ONLY** the following values:
#
# - `std` to perform checks using `libstd`
# - `no_std` to perform checks on an embedded environment using `libcore`
# - `no-std` to perform checks on an embedded environment using `libcore`
# - `typos` to check for typos in the codebase
# - `examples` to check the examples compile
# If no `environment` value has been passed, run all checks except examples.
Expand Down
2 changes: 1 addition & 1 deletion run-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -e
# where `environment` can assume **ONLY** the following values:
#
# - `std` to perform checks using `libstd`
# - `no_std` to perform checks on an embedded environment using `libcore`
# - `no-std` to perform checks on an embedded environment using `libcore`
# - `typos` to check for typos in the codebase
# - `examples` to check the examples compile
#
Expand Down
1 change: 1 addition & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ enum Command {
/// Run the specified `burn` tests and checks locally.
RunChecks {
/// The environment to run checks against
#[clap(value_enum, default_value_t = runchecks::CheckType::default())]
env: runchecks::CheckType,
},
/// Run the specified vulnerability check locally. These commands must be called with 'cargo +nightly'.
Expand Down
5 changes: 2 additions & 3 deletions xtask/src/runchecks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ARM_TARGET: &str = "thumbv7m-none-eabi";

#[derive(clap::ValueEnum, Default, Copy, Clone, PartialEq, Eq)]
pub(crate) enum CheckType {
/// Run all checks.
/// Run all checks except examples
#[default]
All,
/// Run `std` environment checks
Expand All @@ -51,7 +51,7 @@ impl CheckType {
// Depending on the input argument, the respective environment checks
// are run.
//
// If no environment has been passed, run all checks.
// If no `environment` value has been passed, run all checks except examples.
match self {
Self::Std => std_checks(),
Self::NoStd => no_std_checks(),
Expand All @@ -62,7 +62,6 @@ impl CheckType {
check_typos();
std_checks();
no_std_checks();
check_examples();
}
}

Expand Down

0 comments on commit a53f459

Please sign in to comment.