Skip to content

Commit cb2d0a3

Browse files
authored
Merge pull request #2 from bci-oss/make-project-follow-conventions
Make project follow conventions
2 parents 4cbe12c + f1d648a commit cb2d0a3

10 files changed

Lines changed: 1993 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# esmf-vs-code-plugin
2-
VS Code extension for editing Aspect Models
1+
# esmf-vs-code-plugin

extension/CONTRIBUTING.md

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
# Contribution Guideline ESMF Visual Studio Code Plugin
2+
3+
Thank you for your interest in contributing to the ESMF Visual Studio Code Plugin. Use this repository to
4+
contribute to
5+
the project as easy and transparent as possible, whether it is:
6+
7+
* Reporting a bug
8+
* Submitting a fix
9+
* Proposing new features
10+
* something else
11+
12+
The ESMF Visual Studio Code Plugin is developed in the context of the [Eclipse Semantic Modeling
13+
Framework](https://projects.eclipse.org/projects/dt.esmf/). It is based on the Semantic Aspect Meta
14+
Model (SAMM) and supports its use.
15+
16+
# Contributing Source Code (using GitHub)
17+
18+
* We use this GitHub repository to track issues and feature requests.
19+
* For discussions specific to development, the preferred way is
20+
the [developer mailing list](https://accounts.eclipse.org/mailing-list/esmf-dev).
21+
22+
## Branching
23+
24+
We follow
25+
the [Git branching guidance](https://docs.microsoft.com/en-us/azure/devops/repos/git/git-branching-guidance?view=azure-devops).
26+
27+
More specifically the repository has the following branches:
28+
29+
name of branch | description
30+
-----------------------------------|------------------------------------------------------------------
31+
`main` | Contains the latest state of the repository
32+
`v{version_number}-RC{rc_number}` | A "release candidate": A version that freezes major features and
33+
34+
can be considered a pre-release of the next full release.
35+
`v{version_number}` | A full release of the respective version.
36+
`feature/#{issue_number}-{feature_name}` | Contains the development on a specific feature and is
37+
intended to be merged back into the `main` branch as soon as possible. Note, that it is recommended
38+
for contributors to create and develop feature branches in a personal fork and not the upstream
39+
repository.
40+
`bug/#{issue_number}-{bug_name}` | Contains the development of (usually smaller) changes in files of
41+
the repository that do not introduce new functionality but fix mistakes, errors or inconsistencies.
42+
These branches should be merged back into the `main`branch as soon as possible.
43+
44+
## Issues
45+
46+
We use the `Issues` feature of GitHub for tracking all types of work in the repository.
47+
48+
We distinguish between the following types of issues;
49+
50+
Issue Types | Description
51+
--------------|-----------------------------------------------------------------------------------------
52+
`Bug Report` | This `Issue` is dedicated to reporting a problem.
53+
`Task` | This `Issue` is used for describing and proposing a new work item (e.g., a new feature)
54+
55+
If there are issues that link to the same topic, the creator of the issue shall mention those other tasks in the
56+
description. To group tasks that can belong together, one could further create an issue mentioning and describing
57+
the overall user story for the referenced tasks.
58+
59+
## Pull Requests
60+
61+
Proposals for changes to the content of the repository are managed through Pull Requests (`PRs`).
62+
63+
### Opening Pull Requests
64+
65+
To open such a `PR`, implement the changes in a new `feature branch`. Each `PR` must reference an issue and follows the
66+
naming schema: `<issue-number>-<feature-name>`. For a new `PR` the target branch is the `main` branch while the source
67+
branch is your `feature branch` The `feature branch` branch should be developed in a fork of the upstream repository.
68+
So before working on your first feature, you need to create such a fork (e.g., by pressing the `Fork` button in the top
69+
right corner of the GitHub page)
70+
71+
When opening a `PR` please consider the following topics:
72+
73+
* optional: Rebase your development on the branch to which you plan to create the `PR`.
74+
* Each `PR` must be linked to an `Issue`:
75+
- Reference the `Issue` number in the name of your `feature branch` and the description of the `PR`.
76+
- Mention the `Issue` in one of the commit messages associated to the `PR` together with a GitHub keyword like
77+
`closes #IssueNumber` or `fixes #IssuesNumber`. For more details visit the
78+
[GitHub documentation on linking PR with Issues](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
79+
* Each `PR` should only contain changes related to a single work item. If the changes cover more than one work item or
80+
feature, then create one `PR` per work item. You may need to create new more specific `Issues` to reference if you
81+
split up the work into multiple `feature branches`.
82+
* Commit changes often. A `PR` may contain one or more commits.
83+
84+
## Eclipse Development Process
85+
86+
This Eclipse Foundation open project is governed by the Eclipse Foundation Development Process and
87+
operates under the terms of the Eclipse IP Policy.
88+
89+
* https://eclipse.org/projects/dev_process
90+
* https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf
91+
92+
## Eclipse Contributor Agreement
93+
94+
In order to be able to contribute to Eclipse Foundation projects you must electronically sign the
95+
Eclipse Contributor Agreement (ECA).
96+
97+
* http://www.eclipse.org/legal/ECA.php
98+
99+
The ECA provides the Eclipse Foundation with a permanent record that you agree that each of your
100+
contributions will comply with the commitments documented in the Developer Certificate of Origin
101+
(DCO). Having an ECA on file associated with the email address matching the "Author" field of your
102+
contribution's Git commits fulfills the DCO's requirement that you sign-off on your contributions.
103+
104+
For more information, please see the Eclipse Committer Handbook:
105+
https://www.eclipse.org/projects/handbook/#resources-commit
106+
107+
## Commit Messages
108+
109+
Separate the subject from the body with a blank line because the subject line is shown in the Git
110+
history and should summarize the commit body. Use the body to explain what and why with less focus
111+
on the details of the how. This [blog post](https://chris.beams.io/posts/git-commit/#seven-rules)
112+
has more tips and details. Before you push your commits to a repository, you should squash your
113+
commits into one or more logical units of work, e.g., you should organize a new feature in a single
114+
commit.
115+
116+
## License Headers & Licensing
117+
118+
All files contributed require headers - this will ensure the license and copyright clearing at the
119+
end. Also, all contributions must have the same license as the source. The header should follow the
120+
following template:
121+
122+
```
123+
/*
124+
* Copyright (c) {YEAR} {NAME OF COMPANY X}
125+
* Copyright (c) {YEAR} {NAME OF COMPANY Y}
126+
*
127+
* See the AUTHORS file(s) distributed with this work for additional
128+
* information regarding authorship.
129+
*
130+
* This Source Code Form is subject to the terms of the Mozilla Public
131+
* License, v. 2.0. If a copy of the MPL was not distributed with this
132+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
133+
*
134+
* SPDX-License-Identifier: MPL-2.0
135+
*/
136+
```
137+
138+
When using the template, one must replace "{NAME OF COMPANY X}" with the name of the involved
139+
companies and "{YEAR}" with the year of the contribution. For each involved company you need a new
140+
line starting with "Copyright" as outlined in the example.
141+
142+
The example is taken from a Java source file. If your file is of another type you may have to adapt
143+
the comment syntax accordingly.
144+
145+
If you use third-party content (e.g., import / include ...), you are required to list each
146+
third-party content explicitly with its version number in the documentation and your pull-request
147+
comment. Please also check used third party material for license compatibility with the MPL-2.0.
148+
E.g. software licensed under GPL, AGPL or, a similar strong copy-left license cannot be approved.
149+
150+
# Code Conventions
151+
152+
The ESMF Visual Studio Code Plugin is written in Typescript. Please have a look into our [Code
153+
Conventions](CONVENTIONS.md).
154+
155+
## Versioning
156+
157+
We use Semantic Versioning to identify released versions of the ESMF Visual Studio Code Plugin. Semantic Versioning
158+
is
159+
documented [here](https://semver.org). It proposes to have a versioning number with the following
160+
elements:
161+
162+
````
163+
Given a version number MAJOR.MINOR.PATCH, increment the:
164+
- MAJOR version when you make incompatible API changes,
165+
- MINOR version when you add functionality in a backwards compatible manner, and
166+
- PATCH version when you make backwards compatible bug fixes.
167+
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
168+
````
169+
170+
Whereas the Major version must be incremented if the API has backward-incompatible changes (e.g., has breaking changes),
171+
the Minor version must be changed if new backward-compatible features are introduced and,
172+
the Patch version must be incremented if backward-compatible bugfixes are introduced.
173+
174+
### Breaking Changes
175+
176+
For the definition of a breaking change, we follow the definition as in the [Microsoft REST API
177+
Guidelines](https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#123-definition-of-a-breaking-change)
178+
which are licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0). This definition
179+
states:
180+
181+
````
182+
Changes to the contract of an API are considered a breaking change. Changes that impact the backwards compatibility
183+
of an API are a breaking change.
184+
`````
185+
186+
### Version Syntax for Specific Environments
187+
188+
Git version tag
189+
190+
vX.Y.Z-[pre-release-identifier]
191+
192+
Examples:
193+
194+
v1.0.0-RC1, v1.0.0
195+
196+
# Resources
197+
198+
* [For a Repo](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
199+
* [Issue Creation](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue)
200+
* [PR Creation](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)

extension/CONVENTIONS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ESMF Code Conventions
2+
The following document contains a compilation of conventions and guidelines to format, structure and
3+
write code for the ESMF Visual Studio Code Plugin schematics.
4+
5+
## General Conventions
6+
7+
Our code conventions are based on the [Google Typescript Style Guide](https://google.github.io/styleguide/tsguide.html)
8+
but
9+
detailed and adjusted for the needs of the ESMF Visual Studio Code Plugin JS schematics.
10+
11+
## Copyright header
12+
See [CONTRIBUTING](CONTRIBUTING.md)
13+
14+
## Code Recommendations
15+
16+
This project uses the library [Prettier](https://www.npmjs.com/package/prettier) and should also be created with it, so
17+
that a clear code can be created.
18+
19+
## Documentation
20+
21+
### Developer Documentation
22+
Developer documentation is put into a README.md placed in the project root. This should contain documentation like:
23+
* Checking out the source code and getting it to run/build
24+
* Mandatory (external system) dependencies and how to set them up (e.g. databases)
25+
* Configuration options and how to apply them
26+
* General important concepts that are relevant to working on the project but are not directly obvious from the source code
27+
itself. Links to further readings and information, e.g. wiki or other external sources.
28+

0 commit comments

Comments
 (0)