@@ -13,7 +13,7 @@ feature request][issue]. It's great to hear about new ideas.
1313
1414If you are inclined to do so, you're welcome to [ fork] [ fork ] Dotbot, work on
1515implementing the feature yourself, and submit a patch. In this case, it's
16- * highly recommended * that you first [ open an issue] [ issue ] describing your
16+ _ highly recommended _ that you first [ open an issue] [ issue ] describing your
1717enhancement to get early feedback on the new feature that you are implementing.
1818This will help avoid wasted efforts and ensure that your work is incorporated
1919into the code base.
@@ -35,7 +35,7 @@ Want to hack on Dotbot? Awesome!
3535If there are [ open issues] [ issues ] , you're more than welcome to work on those -
3636this is probably the best way to contribute to Dotbot. If you have your own
3737ideas, that's great too! In that case, before working on substantial changes to
38- the code base, it is * highly recommended * that you first [ open an issue] [ issue ]
38+ the code base, it is _ highly recommended _ that you first [ open an issue] [ issue ]
3939describing what you intend to work on.
4040
4141** Patches are generally submitted as pull requests.** Patches are also
@@ -50,6 +50,45 @@ demonstrate that the bug is fixed (or that the feature works).
5050See the [ Dotbot development guide] [ development ] to learn how to run the tests,
5151type checking, and more.
5252
53+ When preparing a patch, it's recommended that you add unit tests
54+ that demonstrate the bug is fixed (or that the feature works).
55+ You can run the tests on your local machine by installing the ` dev ` extras.
56+ The steps below do this using a virtual environment:
57+
58+ ``` shell
59+ # Create a local virtual environment
60+ $ python -m venv .venv
61+
62+ # Activate the virtual environment
63+ # Cygwin, Linux, and MacOS:
64+ $ . .venv/bin/activate
65+ # Windows Powershell:
66+ $ & .venv\S cripts\A ctivate.ps1
67+
68+ # Update pip and setuptools
69+ (.venv) $ python -m pip install -U pip setuptools
70+
71+ # Install dotbot and its development dependencies
72+ (.venv) $ python -m pip install -e .[dev]
73+
74+ # Run the unit tests
75+ (.venv) $ tox
76+ ```
77+
78+ If you prefer to run the tests in an isolated container using Docker, you can
79+ do so with the following:
80+
81+ ``` shell
82+ docker run -it --rm -v " ${PWD} :/dotbot" -w /dotbot python:3.10-alpine /bin/sh
83+ ```
84+
85+ If the machine you are running Docker on has SELinux in the enforcing state, you
86+ will have to disable that on the container. This can be done by adding
87+ ` --security-opt label:disable ` to the above command.
88+
89+ After spawning the container, follow the same instructions as above (create a
90+ virtualenv, ..., run the tests).
91+
5392---
5493
5594If you have any questions about anything, feel free to [ ask] [ email ] !
0 commit comments