Skip to content

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.

You need Rust 1.90 or newer. With Nix, nix develop provides the toolchain.

Terminal window
git clone https://github.com/samox73/jotter
cd jotter
cargo run -- examples/showcase.ipynb

examples/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.

CI runs these on every pull request; run them before you push:

Terminal window
nix develop .#fmt -c cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test

rustfmt.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.

Commit messages follow Conventional Commits: feat: …, fix: …, docs: …, refactor: …. The changelog is generated from them.

The site you’re reading lives in docs/ and is built with Starlight.

Terminal window
cd docs
npm ci
npm 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, which npm run dev and npm run build run first. Edit HELP in src/ui.rs, the doc comments on Config in src/config.rs, or the Args in src/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.nu and committed in docs/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 scenes
    nix develop .#docs -c nu docs/media/record.nu hero plots # some

    Each scene is a short script in docs/media/scenes/; docs/media/lib.nu has the commands they use.

  • The build fails on broken internal links.