As much as I appreciate everyone who wish to contribute to this project, if you want to submit a new feature/refactoring that is more than a few lines, it'll be better if you open an issue or discussion before you start working. This allows us to thoroughly exchange ideas before people invest too much time, and will help me maintain the codebase in the long run.
This project uses pre-commit to perform some formatting and linting. If you're contributing to this project, having it on your system will help you write code that passes the CI. You can also see .pre-commit-config.yaml for a list of hooks enabled for the repo.
The development and publication of this tool is managed by pdm.
Once you've cloned and cded into the repo, run make deps. This will call
some pdm commands to install development dependencies. Some of them are
actually optional, but for convenience I decided to leave them here. This will
include pytest, the testing framework,
and coverage.py, the coverage
report tool. If you're not familiar with pytest or coverage.py, you can run make test to
run tests on all python code, and make coverage to generate a coverage report.
The testing and coverage report are also in the CI configuration, but it might
still help to run them locally before you open the PR.
This project also runs static analysis with
basedpyright. GitHub Action will also run the
check when a PR is submitted. This, as well as ruff check, are both included
in make lint.
You may also find it helpful to enable logging for the CLI when developing new features or working on fixes.
At the moment, there isn't much to cover on here. As long as the code is formatted (stylua) and appropriately type-annotated, you're good. I do have plans to write some tests, but before that happens, formatting and type annotations are the only things that you need to take special care of.
The lua codebase is linted by selene.
You may run make lint or call selene from the CLI to lint the code.
You may find it useful to enable logging when you're poking around the codebase.