#+title: tex-fmt
* Tasks
* Release process
** DONE Checkout main branch
** DONE Update release notes in NEWS.md
*** DONE git log --oneline --no-merges vX.X.X..main
** DONE Update version number in Cargo.toml to vY.Y.Y
** DONE Update version number for pre-commit in README
** DONE Update Nix flake and lock
*** DONE just nix
*** DONE nix develop
** DONE Update Rust version
*** DONE just upgrade
** DONE Run tests
*** DONE just
*** DONE just perf
*** DONE Update performance results in README.md
** TODO Push to GitHub and check action tests pass
** TODO Create a git tag
*** TODO git tag vY.Y.Y
*** TODO git push --tags
*** TODO Can delete remote tags with git push --delete origin vY.Y.Y
** TODO Publish to crates.io
*** TODO cargo package --list
*** TODO cargo publish
*** TODO Pass --allow-dirty if notes.org has changed
** TODO Publish GitHub release with notes from NEWS.md
*** TODO No need to add a title
*** TODO GitHub binaries published automatically with actions
** TODO Publish in nixpkgs
*** TODO Go to nixpkgs fork directory
*** TODO git checkout master
*** TODO git fetch upstream
*** TODO git rebase upstream/master
*** TODO git fetch
*** TODO git push --force-with-lease origin master
*** TODO git branch -d update-tex-fmt
*** TODO git switch --create update-tex-fmt upstream/master
*** TODO nvim pkgs/by-name/te/tex-fmt/package.nix
*** TODO Update version and invalidate src.hash and cargoHash
*** TODO nix-build -A tex-fmt
*** TODO Fix both hashes, get a successful build
*** TODO git add pkgs/by-name/te/tex-fmt/package.nix
*** TODO git commit -m "tex-fmt: X.X.X -> Y.Y.Y"
*** TODO git push --set-upstream origin HEAD
*** TODO Go to GitHub and create a pull request
*** TODO Submit pull request and check relevant boxes
** TODO Tidy repository
*** TODO Commit any new changes to NEWS.md or notes.org
* CLI and config structure
*** args.rs
**** Core argument definitions
**** Args struct defines arguments used internally by tex-fmt
**** OptionArgs struct defines an intermediate target
***** CLI arguments are read into OptionArgs in cli.rs
***** Config file arguments are read into OptionArgs in config.rs
***** Default values for OptionArgs are defined here
**** These OptionArgs are merged together
**** Then converted into Args
**** Conflicting arguments are resolved
**** The Display trait is implemented for args
*** command.rs
**** Contains the clap command definition
**** Sets options exposed to the user on the CLI
*** cli.rs
**** Logic for reading from CLI
**** Clap uses command.rs to read from CLI
**** This file then parses from clap into OptionArgs
*** config.rs
**** Logic for reading from config file
**** Determines the config file path by looking in several places
**** Reads from this path and parses to a toml Table
**** Values are then assigned to an OptionArgs struct
* Process for adding new arguments
** General
*** args.rs
**** Update Args struct if core argument
**** Update OptionArgs struct
**** Update Args resolve() if extra logic necessary
**** Update Args fmt::Display if core argument
** CLI arguments
*** command.rs
**** Update clap command definition
*** cli.rs
**** Update get_cli_args() and add extra logic if needed
** Config arguments
*** config.rs
**** Update get_config_args()
** Fix compiler warnings
** Implement behaviour
** Add tests
** Update README
*** CLI options
*** Config options
*** Usage section if commonly used option
