Add a pre-commit hook that runs ruff.sh and tells you how to auto-fix
issues, add a section to CONTRIBUTING.md to document it.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Cease merging pmbootstrap.cfg into args, implement a Context type to let
us pull globals out of thin air (as an intermediate workaround) and rip
args out of a lot of the codebase.
This is just a first pass, after this we can split all the state that
leaked over into Context into types with narrower scopes (like a
BuildContext(), etc).
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Rewrite the contributing guide. Most of this was written a long time
ago, when pmaports and pmbootstrap still were in the same repository.
This time, focus on what is important for developing pmbootstrap and
omit some of the obvious information (how to make a merge request etc.).
Add relevent information from:
https://wiki.postmarketos.org/wiki/Pmbootstrap_development_guide
...so we can replace the wiki page with a link to this file. Having the
information in a CONTRIBUTING.md seems more intuitive than having it
somewhere in the wiki.
Mention that new or modified code should use f-strings, and that we
support all active python versions.