You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-10
Original file line number
Diff line number
Diff line change
@@ -49,13 +49,14 @@ cargo scaffold <day>
49
49
50
50
Individual solutions live in the `./src/bin/` directory as separate binaries. _Inputs_ and _examples_ live in the the `./data` directory.
51
51
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.
53
53
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.
55
56
56
57
### Download input & description for a day
57
58
58
-
> **Note**
59
+
> [!IMPORTANT]
59
60
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
60
61
61
62
```sh
@@ -92,7 +93,7 @@ For example, running a benchmarked, optimized execution of day 1 would look like
92
93
93
94
#### Submitting solutions
94
95
95
-
> **Note**
96
+
> [!IMPORTANT]
96
97
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
97
98
98
99
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
113
114
# Total: 0.20ms
114
115
```
115
116
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.
117
118
118
119
#### Update readme benchmarks
119
120
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.
121
122
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.
123
124
124
125
### Run all tests
125
126
@@ -143,7 +144,7 @@ cargo clippy
143
144
144
145
### Read puzzle description in terminal
145
146
146
-
> **Note**
147
+
> [!IMPORTANT]
147
148
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
148
149
149
150
```sh
@@ -163,7 +164,7 @@ cargo read <day>
163
164
1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli --version 0.12.0`
164
165
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]
165
166
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).
167
168
168
169
### Automatically track ⭐️ progress in the readme
169
170
@@ -185,7 +186,7 @@ Go to the _Secrets_ tab in your repository settings and create the following sec
185
186
186
187
Go to the _Variables_ tab in your repository settings and create the following variable:
187
188
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.
189
190
190
191
✨ 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.
0 commit comments