Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-06-21 17:45:17 +1000
committerGitHub <noreply@github.com>2023-06-21 09:45:17 +0200
commit03d228fee8f850bb58249d23fd7c17f742a7701b (patch)
tree6da97846c75c852470c0a2eb809aa9117188f0a3
parent92b0d0f8332f5006f9e242d33809cd2c7c2248ea (diff)
Update contributing doc (#1873)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
-rw-r--r--CONTRIBUTING.md13
-rw-r--r--README.md5
2 files changed, 16 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5ed5142d..3faa8ae8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,8 +27,7 @@ The exceptions to PEP8 are:
* Archinstall uses [tabs instead of spaces](https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces) simply to make it
easier for non-IDE developers to navigate the code *(Tab display-width should be equal to 4 spaces)*. Exception to the
rule are comments that need fine-tuned indentation for documentation purposes.
-* [Line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) should aim for no more than 100
- characters, but not strictly enforced.
+* [Line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) a maximum line length is enforced via flake8 with 236 characters
* [Line breaks before/after binary operator](https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator)
is not enforced, as long as the style of line breaks is consistent within the same code block.
* Archinstall should always be saved with **Unix-formatted line endings** and no other platform-specific formats.
@@ -39,6 +38,16 @@ The exceptions to PEP8 are:
Most of these style guidelines have been put into place after the fact *(in an attempt to clean up the code)*.<br>
There might therefore be older code which does not follow the coding convention and the code is subject to change.
+## Git hooks
+
+`archinstall` ships pre-commit hooks that make it easier to run check such as `mypy` and `flake8` locally.
+The checks are listed in `.pre-commit-config.yaml` and can be installed via
+```
+pre-commit install
+```
+
+This will install the pre-commit hook and run it every time a `git commit` is executed.
+
## Documentation
If you'd like to contribute to the documentation, refer to [this guide](docs/README.md) on how to build the documentation locally.
diff --git a/README.md b/README.md
index 9893ddc3..15afdda4 100644
--- a/README.md
+++ b/README.md
@@ -229,3 +229,8 @@ This will create a *20 GB* `testimage.img` and create a loop device which we can
There's also a [Building and Testing](https://github.com/archlinux/archinstall/wiki/Building-and-Testing) guide.<br>
It will go through everything from packaging, building and running *(with qemu)* the installer against a dev branch.
+
+
+# Contributing
+
+Please see [CONTRIBUTING.md](https://github.com/archlinux/archinstall/blob/master/CONTRIBUTING.md)