Skip to content

Commit 81a3f07

Browse files
aschaalrolandreichweinbmw
authored andcommitted
Add pull request guideline
Change-Id: Ib06883182ee9d7e4a15f317f6f3418bca6271f82
1 parent f84b3a8 commit 81a3f07

File tree

6 files changed

+109
-94
lines changed

6 files changed

+109
-94
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Before considering contributing you should be familiar with Eclipse OpenBSW project.
44

5-
* You should have [set up a working environment](https://eclipse-openbsw.github.io/openbsw/sphinx_docs/doc/dev/learning/setup/index.html)
5+
* You should have [Set Up a Working Environment](https://eclipse-openbsw.github.io/openbsw/sphinx_docs/doc/dev/learning/setup/index.html)
66
in which you can build and test.
7-
* You should be familiar with...
8-
+ [Coding Guidelines](https://eclipse-openbsw.github.io/openbsw/sphinx_docs/doc/dev/codingGuidelines/index.html)
9-
+ [Code of Conduct](CODE_OF_CONDUCT.md)
7+
* You should be familiar with
8+
the [Guidelines](https://eclipse-openbsw.github.io/openbsw/sphinx_docs/doc/index.html) and
9+
the [Code of Conduct](CODE_OF_CONDUCT.md).
1010
* Contributions should pass all automated builds and tests,
11-
including [building the documentation](doc/README.md).
11+
including [Building the Documentation](doc/README.md).
1212

1313
## How Can I Contribute?
1414

@@ -35,7 +35,7 @@ Simply choose the issue you would want to work on, and tell everyone
3535
that you are willing to do so and how you would approach it. The team will be
3636
happy to guide you and give feedback.
3737

38-
To contribute your work you need to...
38+
To contribute your work you need to:
3939

4040
1. Fork the [Eclipse OpenBSW](https://github.com/eclipse-openbsw/openbsw) project
4141
2. Create your Branch (`git checkout -b newBranchName`)
@@ -50,11 +50,6 @@ electronically sign the Eclipse Contributor Agreement (ECA).
5050

5151
* https://www.eclipse.org/legal/eca/
5252

53-
Commits that are provided by non-committers must have a Signed-off-by field in
54-
the footer indicating that the author is aware of the terms by which the
55-
contribution has been provided to the project. The non-committer must
56-
additionally have an Eclipse Foundation account and must have a signed Eclipse
57-
Contributor Agreement (ECA) on file.
5853

5954
For more information, please see the Eclipse Committer Handbook:
6055
https://www.eclipse.org/projects/handbook/#resources-commit
@@ -65,60 +60,3 @@ To complete and submit a ECA, log into the
6560
Click on "Eclipse Contributor Agreement" and complete the form.
6661
Be sure to use the same email address when you register for the account
6762
that you intend to use when you commit to Git.
68-
69-
## Sign your work
70-
71-
The sign-off is a simple line at the end of the explanation for the patch. Your
72-
signature certifies that you wrote the patch or otherwise have the right to
73-
pass it on as an open-source patch. The rules are pretty simple: if you can
74-
certify the below
75-
(from [https://www.eclipse.org/legal/dco/](https://www.eclipse.org/legal/dco/)):
76-
77-
```
78-
Developer Certificate of Origin
79-
Version 1.1
80-
81-
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
82-
1 Letterman Drive
83-
Suite D4700
84-
San Francisco, CA, 94129
85-
86-
Everyone is permitted to copy and distribute verbatim copies of this
87-
license document, but changing it is not allowed.
88-
89-
90-
Developer's Certificate of Origin 1.1
91-
92-
By making a contribution to this project, I certify that:
93-
94-
(a) The contribution was created in whole or in part by me and I
95-
have the right to submit it under the open source license
96-
indicated in the file; or
97-
98-
(b) The contribution is based upon previous work that, to the best
99-
of my knowledge, is covered under an appropriate open source
100-
license and I have the right under that license to submit that
101-
work with modifications, whether created in whole or in part
102-
by me, under the same open source license (unless I am
103-
permitted to submit under a different license), as indicated
104-
in the file; or
105-
106-
(c) The contribution was provided directly to me by some other
107-
person who certified (a), (b) or (c) and I have not modified
108-
it.
109-
110-
(d) I understand and agree that this project and the contribution
111-
are public and that a record of the contribution (including all
112-
personal information I submit with it, including my sign-off) is
113-
maintained indefinitely and may be redistributed consistent with
114-
this project or the open source license(s) involved.
115-
```
116-
117-
Then you just add a line to every git commit message:
118-
119-
Signed-off-by: Joe Smith <[email protected]>
120-
121-
Use your real name (sorry, no pseudonyms or anonymous contributions.)
122-
123-
If you set your `user.name` and `user.email` git configs, you can sign your
124-
commit automatically with `git commit -s`.

doc/README.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
1-
# Building the project documentation
1+
# Building the Project Documentation
22

3-
## Building documentation with [`Sphinx`](https://www.sphinx-doc.org/)
3+
## Building Developer Documentation With [`Sphinx`](https://www.sphinx-doc.org/)
44

5-
[`Download Zipped Documentation`](https://github.com/esrlabs/open-bsw/releases/download/preview/open-bsw-doc.zip)
5+
Sphinx is a documentation generator originally created for the Python language, but now used widely
6+
for many kinds of projects including C++.
67

7-
Documentation in RST format throughout the code can be exported to HTML as described below.
8+
Sphinx uses
9+
[`reStructuredText`](https://docutils.sourceforge.io/rst.html) as its markup language.
10+
If you are not familiar with reStructuredText, you may read the
11+
[`reStructuredText Primer`](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)
12+
on the Sphinx webpage first.
813

914
Prerequisites:
10-
- Python 3.10.x
11-
- [`plantuml`](https://plantuml.com/starting)
12-
13-
First install the required Python modules:
14-
```bash
15-
pip install -r requirements.txt
16-
```
17-
and then build the documentation calling:
15+
- Install Python 3.10 or higher
16+
- Install [`plantuml`](https://plantuml.com/starting)
17+
- Install the required Python modules:
18+
```bash
19+
pip install -r doc/dev/requirements.txt
20+
```
21+
22+
To build the documentation, go to `doc/dev` and call:
1823
```bash
1924
make html
2025
```
2126

22-
## Building documentation with [`Doxygen`](https://www.doxygen.nl/)
27+
The entry point HTML page is found at `doc/dev/build/html/doc/dev/index.html`.
2328

24-
Using the settings file ``doc/api/Doxyfile``,
25-
`Doxygen` will generate documentation
26-
from formatted comments in C/C++ code in the subdirectories...
29+
## Building API Documentation with [`Doxygen`](https://www.doxygen.nl/)
2730

28-
* ``libs/bsp``
29-
* ``libs/bsw``
30-
31-
by running the following in the ``doc/api`` directory...
31+
Using the settings file `doc/api/Doxyfile`, Doxygen generates the documentation from formatted
32+
comments in the C/C++ code across all relevant subfolders; see
33+
[Doxygen Main Page](DoxygenMainPage.md) for details.
3234

35+
To build the documentation, go to `doc/api` and call:
3336
```bash
3437
doxygen Doxyfile
3538
```
3639

37-
The entry point html file is found at `doc/api/doxygenOut/html/index.html`
40+
The entry point HTML page is found at `doc/api/doxygenOut/html/index.html`.
3841

39-
XML output is also generated in `doc/api/doxygenOut/xml/` from which coverage information can be extracted using [`coverxygen`](https://github.com/psycofdj/coverxygen). For example...
42+
XML output is also generated in `doc/api/doxygenOut/xml/` from which coverage information can
43+
be extracted using [`coverxygen`](https://github.com/psycofdj/coverxygen). For example:
4044

4145
```bash
42-
$ python3 -m coverxygen --format summary --xml-dir doxygenOut/xml/ --src-dir .. --output -
46+
$ python3 -m coverxygen --format summary --xml-dir doxygenOut/xml/ --src-dir ../.. --output -
4347
Classes : 50.2% (231/460)
4448
Defines : 2.4% (4/169)
4549
Enum Values: 35.9% (185/515)
@@ -55,5 +59,4 @@ Unions : 100.0% (1/1)
5559
Variables : 7.7% (110/1435)
5660
-----------------------------------
5761
Total : 30.9% (2743/8886)
58-
59-
```
62+
```

doc/api/DoxygenMainPage.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Eclipse OpenBSW
32

43
This documentation was generated by Doxygen from the code in the subdirectories:

doc/dev/guidelines/module.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ tools
6464

6565
Optional folder for tools or scripts related to this module.
6666

67+
.. _module_spec:
68+
6769
module.spec
6870
-----------
6971

@@ -98,6 +100,9 @@ Every module requires a ``module.spec`` file which includes the basic settings o
98100
# Additional security tests are
99101
# executed on this module.
100102
103+
unit_test: false # Module must have a unit test [true, false] true
104+
105+
101106
.. note::
102107
- Only properties differing from their respective default values should be stated in the
103108
``module.spec`` file.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Pull Request
2+
============
3+
4+
Contributing
5+
------------
6+
7+
To contribute to this project, follow the process described in
8+
`CONTRIBUTING.md <https://github.com/eclipse-openbsw/openbsw/blob/main/CONTRIBUTING.md>`_.
9+
Every author must electronically sign the Eclipse Contributor Agreement.
10+
11+
Description
12+
-----------
13+
14+
A pull request description serves a similar purpose as a :ref:`commit_message`. Therefore,
15+
**all rules for commit messages also apply to pull requests**, with the following exceptions:
16+
17+
- The **comment fields** are not limited to 72 characters per line.
18+
- All **markup syntaxes** supported on GitHub are allowed.
19+
20+
| If a PR consists of just **one commit**, the pull request description can be **identical** to the
21+
commit message.
22+
| If a PR consists of **several commits**, the pull request description should **summarize** the
23+
commits.
24+
25+
Approval Process
26+
----------------
27+
28+
As per the `Eclipse Foundation Specification Process <https://www.eclipse.org/projects/efsp/>`_,
29+
every committer has the "rights to make decisions regarding a Project", including the authority
30+
to approve commits.
31+
32+
In OpenBSW, we follow that process with the following addition:
33+
34+
If the pull request is **small enough** and the committer has the **complete overview** of the pull
35+
request and its **consequences**, the **committer can approve and merge** the pull request without
36+
consulting other committers. Examples:
37+
38+
- fixing typos or software bugs
39+
- improving documentation
40+
- making CI more robust
41+
- enhancing a feature
42+
43+
If the pull request changes **processes, strategies, fundamentals or important APIs**, the
44+
pull request must be **discussed** with other committers. Examples:
45+
46+
- changing the workspace structure
47+
- adding a completely new feature
48+
- removing support for older compilers
49+
- changing guidelines
50+
51+
There is always a grey zone. In case of doubt, the committer must consult other committers.
52+
53+
Checklist
54+
---------
55+
56+
The committer must take the following points into account before approving the pull request:
57+
58+
- Do the **commit messages** and pull request **description follow the guidelines**?
59+
- Is the code **useful** and should it be part of OpenBSW?
60+
- Is **documentation** provided?
61+
- Are **tests** changed or added?
62+
- Is the contribution, including code, tests, and documentation, **compliant with the guidelines**?
63+
64+
Some checks might not be applicable, e.g., if unit tests are explicitly excluded in
65+
:ref:`module_spec`.
66+
67+
In case of findings, the pull request must not be approved or merged.
68+
Alternatively, e.g., if it is planned to post-deliver the documentation, a GitHub issue must be
69+
created and linked in the pull request.

doc/dev/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Eclipse OpenBSW is a trademark of the Eclipse Foundation.
141141
guidelines/diagrams
142142
guidelines/3rdparty
143143
guidelines/commit_message
144+
guidelines/pull_request
144145

145146
.. toctree::
146147
:maxdepth: 2

0 commit comments

Comments
 (0)