Skip to content

Commit 9223528

Browse files
committed
Add more demos to section 1
1 parent d40efa4 commit 9223528

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

demo-notes.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,32 @@ Run the demos in VS Code for the combined view of the file contents and the term
7474
### Validating docstrings
7575

7676
1. Run `pre-commit run numpydoc-validation --files example.py`.
77-
2. Copy exercise 1.3 solution into `pyproject.toml` and `example.py`, accordingly.
77+
2. Copy `ruff` settings from slide to `pyproject.toml`.
7878
3. Commit the changes.
7979

80+
### Exercise 1.3 solution
81+
82+
1. Copy exercise 1.3 solution into `pyproject.toml` and `example.py`, accordingly.
83+
2. Commit the changes.
84+
85+
## Excluding files
86+
87+
1. Add `exclude` section to `.pre-commit-config.yaml` for `numpydoc-validation`.
88+
2. Create `tests/test_check.py` (to test the `check.py` module) as a blank file.
89+
3. Commit these changes and emphasize that `numpydoc-validation` has `no files to check` in the output.
90+
8091
### Keeping hooks up-to-date
8192

8293
1. Run `pre-commit autoupdate`.
8394
2. Run `pre-commit run --all-files`.
8495
3. Commit the changes.
8596

97+
### `--no-verify`
98+
99+
1. Edit `example.py` to remove the function docstring.
100+
2. Attempt to commit the changes without `--no-verify` and show that it fails.
101+
3. Commit again, but this time with `--no-verify` and show that none of the hooks run.
102+
86103
## Section 2 demos
87104

88105
### Exercise 2.1 solution

0 commit comments

Comments
 (0)