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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-141Lines changed: 8 additions & 141 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,6 @@ The following is a set of guidelines for contributing to the CoMPAS project. The
20
20
*[Github Project Boards](#github-project-boards)
21
21
22
22
[Styleguides](#styleguides)
23
-
*[Git Commit Messages](#git-commit-messages)
24
-
*[Java Styleguide](#java-styleguide)
25
23
*[Copyright Guidelines](#copyright-guidelines)
26
24
27
25
[Project Governance](#project-governance)
@@ -120,7 +118,8 @@ Current Definition of Done:
120
118
### How-to begin
121
119
122
120
Before you start your coding journey within the CoMPAS project, there are some things we have to talk about.
123
-
Some things that will make your start a little bit easier!
121
+
Some things that will make your start a little bit easier!
122
+
On the [developing](DEVELOPING.md) page information about tooling can be found.
124
123
125
124
#### Open Community Calls
126
125
It's good to know that every other monday, we are having a so called Open Community Call. Everyone participating in the CoMPAS project can join and talk about and ask question about the CoMPAS project.
@@ -132,143 +131,29 @@ The agendas can be found at the [LF Energy wiki](https://wiki.lfenergy.org/displ
132
131
If you have something to add, please add it to the agenda and notify everyone on Slack!
133
132
134
133
#### Slack channel
135
-
One of the first important things, is to meet the community. Feel free to introduce yourself on our [Slack channel](https://app.slack.com/client/TLU68MTML/C01926K9D39)!
134
+
One of the first important things, is to meet the community. Feel free to introduce yourself by joining the channel 'compas' on [LF Energy Slack](https://slack.lfenergy.org/)!
136
135
137
136
The Slack channel is the first communication platform within the CoMPAS project (besides email and the Github platform), so if you need help for example you can use Slack!
138
137
139
-
#### Github
140
-
What's Github? It's where you're looking right now! (Joking!).
141
-
142
-
We are using Github for hosting our Git repositories. Github is being used for creating issues and creating Pull Requests to review / merge each others code.
143
-
144
138
#### Documenting
145
139
A good (open source) project requires documentation.
146
140
We have two places for our documentation
147
141
148
142
##### LF Energy Wiki
149
143
LF Energy has it's own [CoMPAS specific Wiki](https://wiki.lfenergy.org/display/HOME/CoMPAS). This is the place for documenation about CoMPAS in general (like roadmap and the community call agendas).
150
144
151
-
##### CoMPAS Architecture Github Pages
152
-
There is also a [Github Pages](https://com-pas.github.io/compas-architecture/) website for CoMPAS architecture specific topics.
145
+
#### Architecture and technologies
146
+
For all architecture and technology choices (for example frameworks, build tools, database choices, etcetera),
147
+
please check the source code (duh!) and our [CoMPAS Architecture Github Pages](https://com-pas.github.io/compas-architecture/).
153
148
154
149
#### Copyright and Licensing
155
-
Copyright and license information is done on per-file basis. We use the specification of [REUSE](https://reuse.software/spec/) to ensure that copyright information of the project is clear and can be analuzed in an automated fashion.
150
+
Copyright and license information is done on per-file basis. We use the specification of [REUSE](https://reuse.software/spec/)
151
+
to ensure that copyright information of the project is clear and can be analuzed in an automated fashion.
156
152
157
153
Every source code repository within CoMPAS has a Github Action for checking against the REUSE specification.
158
154
159
155
For more information, check the [Copyright Guidelines](#copyright-guidelines) section.
160
156
161
-
#### LFX Security Tool
162
-
For checking potential security issues, we use the [LFX Security Tool](https://security.lfx.linuxfoundation.org/#/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/licenses). The LFX Security Tool scans selected repositories for potential security issues in dependencies. It also scans every license that is being used within a repository and checks if they are compatible within open source projects.
163
-
164
-
#### SonarCloud
165
-
CoMPAS is using [SonarCloud](https://sonarcloud.io/organizations/com-pas/projects) for static code analysis. Every Github repository has a Github Action which automatically pushes the code to SonarCloud with a frequency of the given Github Action (most of the time on each push).
166
-
167
-
A Pull Request can't be merged before all SonarCloud issues are being fixed!
168
-
169
-
#### Architecture and technologies
170
-
For all architecture and technology choices (for example frameworks, build tools, database choices, etcetera), please check the source code (duh!) and our [CoMPAS Architecture Github Pages](https://com-pas.github.io/compas-architecture/).
171
-
172
-
#### Github Packages
173
-
To make artifacts between the different GIT repositories available we are using Guthub Packages to ditribute these.
174
-
Every GIT repository can build its artifacts and publish these to Github Packages.
175
-
Other GIT repositories can then add Github Packages as Maven repository to their build tool.
176
-
See below how to do both action for the specific tools.
177
-
178
-
To use Github Packages a username and token is needed. The username is your Github username. The token can be genreate in Github by going to your settings, Developer settings, Personal access tokens.
179
-
Generate a new token here and make sure that the scope "read:packages" is enabled. Use this token below to configure the build tools.
180
-
181
-
#### Basic Maven
182
-
The project uses Maven to manage the build. Most projects use multi-module structures to build all code. A basic command to run Maven is:
183
-
```
184
-
$ maven clean verify
185
-
```
186
-
#### Github Packages in Maven
187
-
To use Github Packages in Maven an extra repository need to be added to the build process.
188
-
```
189
-
<repositories>
190
-
<repository>
191
-
<id>github-packages-compas</id>
192
-
<name>Github Packages CoMPAS</name>
193
-
<url>https://maven.pkg.github.com/com-pas/*</url>
194
-
</repository>
195
-
</repositories>
196
-
```
197
-
Because credentials are needed for Github Packages, these will be passed by using the Settings.xml file.
198
-
199
-
##### Local Settings.xml
200
-
Edit (or create if not already exists) the `~/.m2/settings.xml` file and add the following content:
Add this server section. The ID of the server must be the same as the ID found in the previous repository ID, it should map.
218
-
Username should be your Github username, password can both be your own [encrypted password](https://maven.apache.org/guides/mini/guide-encryption.html)
219
-
or a [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).
220
-
221
-
##### Settings.xml during Github Action
222
-
During multiple Github Actions (like building and SonarCloud analysis), the `settings.xml` file is also needed because it needs access to the Github Packages
223
-
to download certain artifacts. We can do this by adding the following step **before** the Github Packages is needed:
This basically creates a custom `settings.xml` at location `custom_maven_settings.xml`. This file can be passed to maven in the next step
232
-
by using `mvn -s custom_maven_settings.xml` and perhaps some extra parameters you wish for.
233
-
234
-
For the `servers` part, we again have the `github-packages-compas` ID that needs to be the same. We have an `OWNER` username (this is the default, because
235
-
it needs to have a username) and a password which is the GITHUB_TOKEN that's always available.
236
-
237
-
#### IDEs
238
-
If your IDE is supported by sonarlint (both IntelliJ IDEA and the Eclipse IDE are supported), it is recommended to install it. It provides immediate feedback on most sonar issues. Running tests individually is often possible in IDEs without invoking maven. Please consult the documentation of your IDE for setting up the project through maven integration.
239
-
240
-
##### Intellij IDEA
241
-
Import the project using IDEA's maven integration in the GUI. Install SonarLint. Code!
242
-
243
-
##### Eclipse IDE
244
-
Eclipse IDE has two ways to import maven projects: the eclipse GUI component m2e that understands maven or the maven CLI component maven-eclipse-plugin.
245
-
246
-
Using maven-eclipse-plugin, it is possible to recreate all the necessary eclipse files from scratch. A practical way to use it and get deterministic results is to remove all existing eclipse files, delete all eclipse projects from the workspace, regenerate all the eclipse files and reimport everything into eclipse as "existing eclipse projects". If all your projects are checked out outside of the eclipse workspace on the file system, then deleting all the projects is even simpler because you can just delete the whole workspace. The whole cycle takes only a few seconds.
247
-
```
248
-
# Ensure that eclipse is not running
249
-
# delete the projects in the GUI, or "rm -rf" all eclipse projects from the workspace
# import as existing eclipse projects in the GUI (alternatively, use eclim's :ProjectImportDiscover directly from ViM)
255
-
```
256
-
257
-
After importing the projects with either method, install SonarLint for quicker feedback on potential sonar issues.
258
-
259
-
#### Adding custom badges to your README
260
-
Badges are great for quickly checking several status reports of a specific repository.
261
-
Sometimes a application doesn't serve badges ([LFX Security tool](https://security.lfx.linuxfoundation.org/) for example), and you need to do it yourself.
262
-
We use [shields.io](https://shields.io/) for this problem.
263
-
264
-
In case of the LFX Security Tool, we used the following:
265
-
- Go to [shields.io](https://shields.io/).
266
-
- Go to the 'Dynamic' section.
267
-
- Choose JSON as data type.
268
-
- Insert 'LFX Security Tool' as the label.
269
-
- Insert the API to use, in case of our LFX Security tool projects we use [this API](https://api.security.lfx.linuxfoundation.org/v1/project/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/issues).
270
-
- Now you can query using JsonPath. To get all open high issues from the 'CoMPAS Core' project, use `issues[?(@['repository-name'] == 'compas-core')]['high-open-issues']`.
271
-
- Choose a color and a pre- or surfix text.
272
157
273
158
### Github Project Boards
274
159
For managing the CoMPAS issues created in all the separate repositories, we use the [Projects Board](https://github.com/orgs/com-pas/projects) of Github.
@@ -282,24 +167,6 @@ Issues and Pull Requests can be moved on both the Project Boards and on the boar
282
167
283
168
## Styleguides
284
169
285
-
### Git Commit Messages
286
-
287
-
As usual, please start the commit message with a short line describing the commit, then leave a blank line, then give more context and explanations. You can use GitHub's integrations, for exemple to link to existing issues. In general, pull requests with more than one commits will be squashed when merged in master.
288
-
289
-
### Java StyleGuide
290
-
291
-
- The project uses modern java, feel free to use any new APIs provided by the current java version (currently java 8).
292
-
- New API classes and methods should be documented with javadoc. Write higher level documentation for classes and lower level documentation for methods. For example, ...
293
-
- User-facing configuration options and general design decisions should be documented (where?)
294
-
- We use standard configurations of well known tools like checkstyle and sonarqube to enforce a coherent coding style, please consult those tools for justifications on these rules.
295
-
296
-
As a simple yet instructive example, consider ...
297
-
```java
298
-
/**
299
-
* Example?
300
-
*/
301
-
```
302
-
303
170
### Copyright Guidelines
304
171
305
172
Contributing to the CoMPAS project also requires to use correct copyright headers in source files.
0 commit comments