You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* version bump
* see how grid looks with multiple tiles
* strip whitespace
* add example error
* add info about docker container setup
* more info on running tests locally
-[Push Changes and Create PR](#push-changes-and-create-pr-1)
27
27
-[Review PR Build](#review-pr-build)
28
28
29
29
30
30
## Developer Setup
31
+
Development for this project is done within [Docker containers]. Using Docker containers makes setup easy because all developer workspaces will have the same installed software / OS. If there's a tool that is not available that you think would be helpful to add to the default container image, please feel free to [open an Issue](https://github.com/ntno/mkdocs-terminal/issues/new/choose) and start a discussion.
32
+
33
+
*Note*: All software besides the two prerequisites will be installed in the Docker container and not your machine.
You should be able to visit [http://0.0.0.0:8080/mkdocs-terminal/](http://0.0.0.0:8080/mkdocs-terminal/) in your browser and view the mkdocs-terminal documentation site.
49
54
50
55
If you get a `docker.sock: connect: permission denied` error, you probably need to start the Docker engine on your machine.
56
+
57
+
**Example Error**:
58
+
```
59
+
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.project%3Dmkdocs-terminal%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied
60
+
make: *** [ubuntu] Error 1
61
+
```
62
+
63
+
**Solution**:
51
64
Open the Docker Desktop application and wait until the application indicates that the Docker engine is in a "running" state. Then retry starting your docker container.
52
65
53
66
<imgsrc="documentation/docs/img/developer-setup/engine-starting.png"width="600"title="Docker Engine Starting"alt="orange starting indicator at bottom left of Docker Desktop">
@@ -118,16 +131,32 @@ Update files in [terminal/](terminal/). You should see changes loaded in [http:
118
131
- confirm links are not broken
119
132
- confirm existing components/features still work
120
133
121
-
### Test Theme Build Locally
134
+
### Test Theme Build/Packaging Locally
122
135
Launch the project's ubuntu container and run tox build tests:
123
136
124
-
```
137
+
```bash
125
138
make ubuntu
126
139
make tox
127
140
```
128
141
129
-
### Add Tests
130
-
Test suite setup is in progress. See [GitHub issue](https://github.com/ntno/mkdocs-terminal/issues/13) for details. If you have experience creating automated tests for Jinja2 please consider making a contribution!
142
+
### Add Functional Tests
143
+
If you are adding/changing theme functionality, please add a test to the relevant test class in [tests/](tests/). You can run the test suite locally by using the commands described in this section.
144
+
145
+
After you have installed the required testing software you can rerun `make quick-tests` whenever you want to re-execute.
146
+
147
+
```bash
148
+
make ubuntu
149
+
make install-test-prereqs
150
+
make install-test-requirements
151
+
make quick-tests
152
+
```
153
+
154
+
Remember to work in the project's [Docker container](#developer-setup) to avoid Python dependency conflicts. Once you have run `make ubuntu`, your terminal prompt should include `root@CONTAINER_ID`:
Test suites can always be improved! See [GitHub issue](https://github.com/ntno/mkdocs-terminal/issues/13) for current progress/discussion. If you have experience creating automated tests for Jinja2 please consider making a contribution.
131
160
132
161
### Push Changes and Create PR
133
162
See [Work On Pull Request](https://github.com/susam/gitpr#work-on-pull-request) for help on adding/pushing changes to your feature branch.
0 commit comments