Skip to content

Commit 7318f00

Browse files
Enhanced Developer Documentation. Docker Setup and Readability Improvements (#10)
👀 I noticed that the developer documentation section lacked explicit instructions on setting up **Docker**, a crucial step for running unit tests and ensuring a seamless development environment. Recognizing the importance of this step for new and existing developers, I have added Docker setup instructions to the "Precondition" section of the README. 🆙 💅🏻 In addition to integrating Docker setup instructions, I took the opportunity to improve the overall readability of the README file. These improvements include better formatting, clearer descriptions of commands and modules, and a more organized presentation of content. This should make the documentation more **accessible and easier** to follow, especially for developers who are new to the project. Co-authored-by: haskiindahouse <>
1 parent faefc41 commit 7318f00

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

docs/developer.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
11

22
# Developer Docs
33

4-
* Running all unit tests: `./mill -i -w "__.test"`.
4+
## Precondition
5+
Before running the unit tests, ensure the following steps are completed:
56

6-
* Running all unit tests on one database: `./mill -i -w "__.test scalasql.sqlite"`. This
7+
1. **Start Docker on Your Machine:**
8+
Ensure that Docker is running. You can verify this by executing `docker info` in your terminal. If Docker is not running, start it using your system's preferred method (e.g., using the Docker desktop application or by running `systemctl start docker` on Linux).
9+
10+
## Running Unit Tests
11+
To facilitate efficient testing, you can choose from several commands based on your testing needs:
12+
13+
### Run all Tests
14+
* Running all unit tests:
15+
```bash
16+
./mill -i -w "__.test"
17+
```
18+
19+
### Quick Database-Specific Tests
20+
* Running all unit tests on one database. This
721
is much faster than running all tests, and useful for quick iteration for changes that
8-
are not database specific.
22+
are not database specific:
23+
```bash
24+
./mill -i -w "__.test scalasql.sqlite"
25+
```
926

10-
* Re-generating docs: `./mill -i "__.test" + generateTutorial + generateReference`
27+
### Full Test Suite with Documentation Generation
28+
* Re-generating docs:
29+
```bash
30+
./mill -i "__.test" + generateTutorial + generateReference
31+
```
1132
* Note that ScalaSql's reference docs are extracted from the test suite, and thus we need
1233
to make sure to run the test suite before re-generating them.
1334

35+
### Code Formatting and Auto-Fixes
1436
* Fix all auto-generating and auto-formatting issues at once via
15-
```
16-
./mill -i -w __.fix + mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources + "scalasql[2.13.12].test" + generateTutorial + generateReference
17-
```
37+
```bash
38+
./mill -i -w __.fix + mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources + "scalasql[2.13.12].test" + generateTutorial + generateReference
39+
```
1840

41+
## Benchmarking
1942
* You can run ad-hoc benchmarks using any test case via the `SCALASQL_RUN_BENCHMARK`
20-
environment variable, e.g.
21-
22-
```
23-
SCALASQL_RUN_BENCHMARK=5000 ./mill -i -w __.test scalasql.sqlite.SubQueryTests.deeplyNested
24-
```
43+
environment variable, e.g.
44+
```bash
45+
SCALASQL_RUN_BENCHMARK=5000 ./mill -i -w __.test scalasql.sqlite.SubQueryTests.deeplyNested
46+
```
2547

48+
## ScalaSql Modules Overview
2649
* ScalaSql comprises 4 main submodules:
2750
* `scalasql.core`: the core functionality of evaluating `SqlStr` queries, but without any typed
2851
helpers to construct them

0 commit comments

Comments
 (0)