Skip to content

Commit

Permalink
Do not display generate_doc command in help
Browse files Browse the repository at this point in the history
  • Loading branch information
sfauvel committed Feb 21, 2024
1 parent 28f5ca5 commit ae747bd
Show file tree
Hide file tree
Showing 12 changed files with 1,385 additions and 6 deletions.
83 changes: 83 additions & 0 deletions demo/protocol-demo/mithrildemo-command-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@


### mithrildemo

Simple demonstration of the Mithril protocol
```bash
Simple demonstration of the Mithril protocol

Usage: mithrildemo [OPTIONS]

Options:
-m, --m <M>
Security parameter, upper bound on indices

[default: 200]

-k, --k <K>
Quorum parameter

[default: 5]

--phi-f <PHI_F>
f in phi(w) = 1 - (1 - f)^w, where w is the stake of a participant

[default: 0.2]

--nparties <NPARTIES>
Number of parties

[default: 5]

--nmessages <NMESSAGES>
Number of messages to sign

[default: 1]

-h, --help
Print help

```
| Subcommand | Performed action |
|------------|------------------|
| **generate-doc** | Generate documentation |
| **help** | Print this message or the help of the given subcommand(s) |

The configuration parameters can be set in either of the following ways:

1. In a configuration file, depending on the `--run-mode` parameter. If the runtime mode is `testnet`, the file is located in `./conf/testnet.json`.

2. The value can be overridden by an environment variable with the parameter name in uppercase.

| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
|-----------|---------------------|:--------------------:|----------------------|-------------|---------------|---------|:---------:|
| `m` | `--m` | `-m` | - | Security parameter, upper bound on indices | `200` | - | - |
| `k` | `--k` | `-k` | - | Quorum parameter | `5` | - | - |
| `phi_f` | `--phi-f` | - | - | f in phi(w) = 1 - (1 - f)^w, where w is the stake of a participant | `0.2` | - | - |
| `nparties` | `--nparties` | - | - | Number of parties | `5` | - | - |
| `nmessages` | `--nmessages` | - | - | Number of messages to sign | `1` | - | - |
| `help` | `--help` | `-h` | - | Print help | - | - | - |
#### mithrildemo generate-doc

Generate documentation
```bash
Generate documentation

Usage: generate-doc [OPTIONS]

Options:
--output <OUTPUT>
Generated documentation file

[default: "[PROGRAM NAME]-command-line.md"]

-h, --help
Print help

```


| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
|-----------|---------------------|:--------------------:|----------------------|-------------|---------------|---------|:---------:|
| `output` | `--output` | - | - | Generated documentation file | `[PROGRAM NAME]-command-line.md` | - | - |
| `help` | `--help` | `-h` | - | Print help | - | - | - |
2 changes: 1 addition & 1 deletion demo/protocol-demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Clone for Config {

#[derive(Subcommand, Debug, PartialEq)]
enum DemoCommands {
#[clap(alias("doc"))]
#[clap(alias("doc"), hide(true))]
GenerateDoc(GenerateDocCommands),
}

Expand Down
Loading

0 comments on commit ae747bd

Please sign in to comment.