Skip to content

Commit bc9aa23

Browse files
seafoodfryroypat
authored andcommitted
Updated contributing documentation regarding md and py linting
Since the `./tools/devctr` Python project is a poetry project, it made more sense to actually add instructions that encouraged the use of poetry as opposed to plain ol' python virtual environments. Also, since the poetry project is using an old version of python, `3.10.*`, we added a `.python-version` file so that people could use pyenv - which is the recommended tool to manage python versions by poetry, see https://python-poetry.org/docs/managing-environments/ Signed-off-by: seafoodfry <[email protected]>
1 parent e67b2be commit bc9aa23

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.14

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,32 @@ cargo install rusty-hook
6565
rusty-hook init
6666
```
6767

68+
This project also has linters for Python and Markdown. These will be called by
69+
the pre-commit when you modify any Python and Markdown files. In order to make
70+
sure you are setup we recommend you install
71+
[poetry](https://python-poetry.org/docs/) and
72+
[pyenv](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation).
73+
74+
Poetry is used by this project and pyenv will help you make sure you have a
75+
Python version compatible with the poetry python project we use as part of
76+
`./tools/devctr`.
77+
78+
Once you have these two installed you can run the following to install the dev
79+
container poetry project:
80+
81+
```
82+
poetry -C ./tools/devctr install --no-root
83+
```
84+
85+
Then, you can activate the poetry virtual environment by running:
86+
87+
```
88+
poetry shell -C ./tools/devctr
89+
```
90+
91+
Which you will need to do after modifying python or markdown files so that the
92+
pre-commit can finish successfully.
93+
6894
Your contribution needs to meet the following standards:
6995

7096
- Separate each **logical change** into its own commit.

docs/getting-started.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,25 @@ distro installed, you can grant Read+Write access with:
4848
sudo setfacl -m u:${USER}:rw /dev/kvm
4949
```
5050

51-
Otherwise, if access is managed via the `kvm` group:
51+
If access is managed via the `kvm` group, check that the KVM group exists:
52+
53+
```bash
54+
getent group kvm
55+
```
56+
57+
and check that `/dev/kvm` is associated with the kvm group:
58+
59+
```bash
60+
ls -l /dev/kvm
61+
```
62+
63+
You can see if your current user is already in the kvm group by running:
64+
65+
```bash
66+
groups
67+
```
68+
69+
Otherwise, add your current user to the group by running:
5270

5371
```bash
5472
[ $(stat -c "%G" /dev/kvm) = kvm ] && sudo usermod -aG kvm ${USER} \

0 commit comments

Comments
 (0)