@@ -10,13 +10,38 @@ python -m build
1010```
1111
1212## Local development
13+ {%- if cookiecutter.type == "api" %}
14+
15+ You need to make sure you have the ` git submodules ` updated:
16+
17+ ``` sh
18+ git submodule update --init
19+ ```
20+
21+ ### Running protolint
22+
23+ To make sure some common mistakes are avoided and to ensure a consistent style
24+ it is recommended to run ` protolint ` . After you [ installed
25+ ` protolint ` ] ( https://github.com/yoheimuta/protolint#installation ) , just run:
26+
27+ ``` sh
28+ protolint lint proto
29+ ```
30+
31+ ### Python setup
32+ {%- endif %}
1333
1434You can use editable installs to develop the project locally (it will install
1535all the dependencies too):
1636
1737``` sh
1838python -m pip install -e .
1939```
40+ {%- if cookiecutter.type == "api" %}
41+
42+ This will also generate the Python files from the ` proto/ ` files and leave them
43+ in ` py/ ` , so you can inspect them.
44+ {%- endif %}
2045
2146Or you can install all development dependencies (` mypy ` , ` pylint ` , ` pytest ` ,
2247etc.) in one go too:
3459
3560You can also use ` nox -R ` to reuse the current testing environment to speed up
3661test at the expense of a higher chance to end up with a dirty test environment.
62+ {%- if cookiecutter.type == "api" %}
63+
64+ ### Upgrading dependencies
65+
66+ If you want to update the dependency ` frequenz-api-common ` , then you need to:
67+
68+ 1 . Update the submodule ` frequenz-api-common `
69+ 2 . Update the version of the ` frequenz-api-common ` package in ` pyproject.toml `
70+
71+ The version of ` frequenz-api-common ` used in both places mentioned above should
72+ be the same.
73+
74+ Here is an example of upgrading the ` frequenz-api-common ` dependency to version
75+ ` v0.2.0 ` :
76+ ``` sh
77+ ver=" 0.2.0"
78+
79+ cd submodules/frequenz-api-common
80+ git remote update
81+ git checkout v${ver}
82+ cd -
83+
84+ sed s/" frequenz-api-common == [0-9]\.[0-9]\.[0-9]" /" frequenz-api-common == ${ver} " /g -i pyproject.toml
85+ ```
86+ {%- endif %}
3787
3888### Running tests / checks individually
3989
@@ -67,9 +117,9 @@ These are the steps to create a new release:
671171 . Get the latest head you want to create a release from.
68118
691192 . Update the ` RELEASE_NOTES.md ` file if it is not complete, up to date, and
70- clean from template comments (` <!-- ... -> ` ) and empty sections. Submit
71- a pull request if an update is needed, wait until it is merged, and update
72- the latest head you want to create a release from to get the new merged pull
120+ remove template comments (` <!-- ... -> ` ) and empty sections. Submit a pull
121+ request if an update is needed, wait until it is merged, and update the
122+ latest head you want to create a release from to get the new merged pull
73123 request.
74124
751253 . Create a new signed tag using the release notes and
0 commit comments