Mercurial > gemma
annotate docs/DEVELOPMENT.md @ 5157:673f2a00c767
add missing Author in Timeslider
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Thu, 02 Apr 2020 13:17:13 +0200 |
parents | 70444dce0b31 |
children |
rev | line source |
---|---|
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 # Development |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
4432
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
3 Main development is done on GNU/Linux systems, mainly Debian (stretch) |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
4 or Ubuntu (18.04 LTS "Bionic Beaver"). First try packages from these |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
5 distributions. |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
6 |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
7 `Makefile` requires GNU Make for building. And `.sh` files refer to Bash. |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
8 (Both are standard in GNU/Linux setups.) |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
9 |
aaab0ebde623
docs: add soem dev system requirements
Bernhard Reiter <bernhard@intevation.de>
parents:
4429
diff
changeset
|
10 |
4429
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
11 # View source code history |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
12 |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
13 If you want to see the source code structure and history |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
14 on our local machine (instead of online): |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
15 `hg serve` |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
16 from Mercurial SCM will start a local server. Install the |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
17 [HighlightExtension](https://www.mercurial-scm.org/wiki/HighlightExtension) |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
18 to enable syntax highlighting. |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
19 |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
20 |
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 ## Backend |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
4466
70444dce0b31
Suggest usage of Go 1.13+.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4432
diff
changeset
|
23 You need a working [Go](https://golang.org/dl) build environment (1.13+). |
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 * Install dependencies |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 `sh 3rdpartylibs` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 * Build |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 Prerequesite: compile server |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 ``` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 cd cmd/gemma/ |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 go build |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 cd ../../ |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 ``` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 * Run |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 Run server with `./cmd/gemma/gemma` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 |
4427
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
41 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
42 ### View source code documentation interactively |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
43 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
44 Use https://godoc.org/golang.org/x/tools/cmd/godoc |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
45 (coming with package `golang-golang-x-tools` on Ubuntu.) |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
46 to see the formatted documentation. |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
47 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
48 Started in the top level directory like |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
49 `godoc -http=:6060` |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
50 you can access the documentation at |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
51 `http://localhost:6060/pkg/gemma.intevation.de/?m=all` |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
52 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
53 Hints: |
4466
70444dce0b31
Suggest usage of Go 1.13+.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4432
diff
changeset
|
54 * A parameter like `-goroot /usr/lib/go-1.13` may avoid warnings, if |
4427
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
55 the goroot is somewhere else. |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
56 * Clicking on a function declaration header will take you to the source |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
57 code. (Or changing `?m=all` to `?m=src?`). |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
58 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
59 |
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 ## Client |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 See [client/README](../client/README.md) for details. |