Skip to content

Commit 47ac046

Browse files
authored
docs: improve readme formatting & wording
1 parent ae1d965 commit 47ac046

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ cargo scaffold <day>
4949

5050
Individual solutions live in the `./src/bin/` directory as separate binaries. _Inputs_ and _examples_ live in the the `./data` directory.
5151

52-
Every [solution](https://github.com/fspoettel/advent-of-code-rust/blob/main/src/bin/scaffold.rs#L11-L41) has _unit tests_ referencing its _example_ file. Use these unit tests to develop and debug your solutions against the example input.
52+
Every [solution](https://github.com/fspoettel/advent-of-code-rust/blob/main/src/template/commands/scaffold.rs#L9-L35) has _tests_ referencing its _example_ file in `./data/examples`. Use these tests to develop and debug your solutions against the example input.
5353

54-
Tip: when editing a solution, `rust-analyzer` will display buttons for running / debugging unit tests above the unit test blocks.
54+
> [!TIP]
55+
> when editing a solution, `rust-analyzer` will display buttons for running / debugging unit tests above the unit test blocks.
5556
5657
### Download input & description for a day
5758

58-
> **Note**
59+
> [!IMPORTANT]
5960
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
6061
6162
```sh
@@ -92,7 +93,7 @@ For example, running a benchmarked, optimized execution of day 1 would look like
9293

9394
#### Submitting solutions
9495

95-
> **Note**
96+
> [!IMPORTANT]
9697
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
9798
9899
In order to submit part of a solution for checking, append the `--submit <part>` option to the `solve` command.
@@ -113,13 +114,13 @@ cargo all
113114
# Total: 0.20ms
114115
```
115116

116-
This runs all solutions sequentially and prints output to the command-line. Same as for the `solve` command, `--release` controls whether real inputs will be used.
117+
This runs all solutions sequentially and prints output to the command-line. Same as for the `solve` command, the `--release` flag runs an optimized build.
117118

118119
#### Update readme benchmarks
119120

120-
The template can output a table with solution times to your readme. Please note that these are not "scientific" benchmarks, understand them as a fun approximation. 😉
121+
The template can output a table with solution times to your readme. In order to generate a benchmarking table, run `cargo all --release --time`. If everything goes well, the command will output "_Successfully updated README with benchmarks._" after the execution finishes and the readme will be updated.
121122

122-
In order to generate a benchmarking table, run `cargo all --release --time`. If everything goes well, the command will output "_Successfully updated README with benchmarks._" after the execution finishes.
123+
Please note that these are not "scientific" benchmarks, understand them as a fun approximation. 😉 Timings, especially in the microseconds range, might change a bit between invocations.
123124

124125
### Run all tests
125126

@@ -143,7 +144,7 @@ cargo clippy
143144

144145
### Read puzzle description in terminal
145146

146-
> **Note**
147+
> [!IMPORTANT]
147148
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
148149
149150
```sh
@@ -163,7 +164,7 @@ cargo read <day>
163164
1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli --version 0.12.0`
164165
2. Create an `.adventofcode.session` file in your home directory and paste your session cookie. To retrieve the session cookie, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in _Cookies_ under the _Application_ or _Storage_ tab, and copy out the `session` cookie value. [^1]
165166

166-
Once installed, you can use the [download command](#download-input--description-for-a-day) and automatically submit solutions via the [`--submit` flag](#submitting-solutions).
167+
Once installed, you can use the [download command](#download-input--description-for-a-day), the read command, and automatically submit solutions via the [`--submit` flag](#submitting-solutions).
167168

168169
### Automatically track ⭐️ progress in the readme
169170

@@ -185,7 +186,7 @@ Go to the _Secrets_ tab in your repository settings and create the following sec
185186

186187
Go to the _Variables_ tab in your repository settings and create the following variable:
187188

188-
- `AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to `true` to enable the progress tracker.
189+
- `AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to `true` to enable the progress tracker. After you complete AoC or no longer work on it, you can set this to `false` to disable the CI.
189190

190191
✨ You can now run this action manually via the _Run workflow_ button on the workflow page. If you want the workflow to run automatically, uncomment the `schedule` section in the `readme-stars.yml` workflow file or add a `push` trigger.
191192

0 commit comments

Comments
 (0)