Contributing
Contributions are welcome: bug reports, fixes, features and documentation. For anything larger than a small fix, please open an issue first, so we can agree on the approach before you invest time.
Development setup
Section titled “Development setup”You need Rust 1.90 or newer. With Nix, nix develop provides the toolchain.
git clone https://github.com/samox73/jottercd jottercargo run -- examples/showcase.ipynbexamples/showcase.ipynb exercises most features. To run it you need a Python with ipykernel, for example uv venv && uv pip install ipykernel numpy matplotlib tqdm.
Checks
Section titled “Checks”CI runs these on every pull request; run them before you push:
nix develop .#fmt -c cargo fmt --checkcargo clippy --all-targets -- -D warningscargo testrustfmt.toml uses options that only a nightly rustfmt accepts; the fmt shell in flake.nix pins one, and make fmt formats with it. Without Nix, cargo +nightly fmt does the same, though a different nightly may format slightly differently.
To run that check before every commit, enable the repository’s pre-commit hook once per clone (it needs Nix): git config core.hooksPath .githooks.
A few tests need a real kernel or Neovim and are marked #[ignore]. Run them with cargo test -- --ignored.
Commits
Section titled “Commits”Commit messages follow Conventional Commits: feat: …, fix: …, docs: …, refactor: …. The changelog is generated from them.
Documentation
Section titled “Documentation”The site you’re reading lives in docs/ and is built with Starlight.
cd docsnpm cinpm run dev # live preview at http://localhost:4321/jotter/-
Pages are MDX files in
docs/src/content/docs/. -
The Keybindings, Configuration and Command line pages are generated from the source code by
jotter --generate, whichnpm run devandnpm run buildrun first. EditHELPinsrc/ui.rs, the doc comments onConfiginsrc/config.rs, or theArgsinsrc/main.rs; not the generated files. -
A test fails if a config option has no doc comment.
-
Clips and screenshots are recorded by
docs/media/record.nuand committed indocs/public/media/. After a change that shows on screen, re-record the affected scenes and commit the results:Terminal window nix develop .#docs -c nu docs/media/record.nu # all scenesnix develop .#docs -c nu docs/media/record.nu hero plots # someEach scene is a short script in
docs/media/scenes/;docs/media/lib.nuhas the commands they use. -
The build fails on broken internal links.