Skip to content

Commit 6fae2e1

Browse files
committedMay 18, 2021
docs: Clean up repository docs
This adds a first version 0.1.0 to the project and a start for a changelog. This also updates the readme and the contributing docs.
1 parent d1b76b0 commit 6fae2e1

File tree

4 files changed

+94
-43
lines changed

4 files changed

+94
-43
lines changed
 

‎CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## [0.0.1] - 09 June 2019
1+
## [0.1.0] - 14 May 2021
22

3-
Initial commit.
3+
First stable version

‎CONTRIBUTING.md

+85-35
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,104 @@
1-
# Contributing code to famedly talk
1+
# Contributing code to Famedly
22

3-
Everyone is welcome to contribute code to FamedlySDK, provided that they are willing to license their contributions under the same license as the project itself.
4-
Please follow these rules when contributing code to famedly talk:
3+
*See also: Code of Conduct*
54

6-
## Merge Requests:
7-
- Never ever just push something directly to the master branch!
8-
- Create a new branch or fork this project and send a Merge Request.
9-
- Only Merge Requests with a working CI can be merged.
10-
- Only Merge Requests with at least one code reviewer can be merged.
11-
- Merge Requests may be refused if they don't follow the rules below.
12-
- A new Merge Request SHOULD never decrease the test coverage.
5+
We look forward to you joining our team. Everyone is welcome to contribute code via pull requests or to file issues on Gitlab or help other peoples. We communicate primarily over Gitlab and on chat channels. You should be willing to license your contributions under the same license as the project itself.
136

14-
## Branches
15-
### Naming
7+
# How to contribute
8+
The only way to contribute changes to our project is to create a new branch or to fork it on Gitlab. Then create a merge request to ask us to merge your changes into the main branch of our repository. (https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html)
169

17-
Branches should get named by this pattern: `[Module Name]-[Type]-[Detail]`.
10+
**The main branch is our development branch where all the work happens.**
1811

19-
That means for example: "users-fix-attach-roles-issue#765".
12+
## Merge request workflow in detail
13+
- Create a new branch or fork the main branch of the project (Please follow the guidlines below of naming branch and commits)
14+
- Make a merge request to merge your changes into the main branch
15+
- We use the Gitlab merge request workflow to review your contribution
16+
- Only merge requests with a working CI can be merged
17+
- Only merge requests with at least one code reviewer of the core team can be merged
18+
- Only merge requests which are signed-off can be merged
19+
- Merge Requests may be refused if they don't follow the rules below.
2020

21-
Modules are various parts of the App. This can for example be the directory list or the chat room.
21+
**Never ever just push something directly to the main branch!**
2222

23-
Types can be one of these:
24-
- **feature**
25-
- **enhance**
26-
- **cleanup**
27-
- **refactor**
28-
- **fix**
29-
- **hotfix** (should rarely get used)
23+
## Naming guidelines & code style
3024

31-
The Detail part of the pattern should be a short description of what the branch delivers.
25+
### Create a branch
3226

33-
## Commit Messages
27+
- Branches should get named by this pattern: `username/name-your-changes`.
3428

35-
Commit Messages should get written in this pattern: `[[Module Name]] [Commit Message]`.
36-
That means for example: "[users] add fetch users endpoint".
29+
*That means for example: "alice/fix-this-bug".*
3730

31+
- Use [Conventional Commits](https://www.conventionalcommits.org/)
3832

39-
## File structure:
40-
- Every file must be named by the class and must be capitalized in the beginning.
33+
### File structure:
34+
- File names must be `snake_case`.
4135
- Directories need to be lowercase.
4236

43-
## Code style:
44-
Please use code formatting. You can use VSCode or Android Studio. On other editors you need to run:
45-
```
46-
flutter format lib/**/*/*.dart
47-
```
37+
### Code style:
38+
- We recommend using Android Studio or VS Code for coding
39+
- Follow the common Dart style in: https://dart.dev/guides/language/effective-dart/style
40+
- Format the code with `flutter format lib` - otherwise the CI will fail
4841

49-
## Code quality:
42+
### Code quality
5043
- Don't repeat yourself! Use local variables, functions, classes.
5144
- Don't mix UI and business logic in the same environment.
5245
- Write tests for new classes, functions and widgets.
5346
- Keep it simple stupid: https://en.wikipedia.org/wiki/KISS_principle
54-
- Describe all of your classes, methods and attributes using **dartdoc** comments. Read this for more informations: https://dart.dev/guides/language/effective-dart/documentation
47+
- Describe all of your classes, methods and attributes using **dartdoc** comments. Read this for more information: https://dart.dev/guides/language/effective-dart/documentation
48+
- Don't write functions to create new widgets. Write classes!
49+
- Don't insert unlocalized strings!
50+
- Use Dart extensions to extend class functionality instead of writing wrapper classes!
51+
- Don't mix functions which changes the state of something (functions with a return type of `void` or `Future<void>`) and functional programming which doesn't.
52+
53+
## Sign off
54+
In order to have a concrete record that your contribution is intentional and you agree to license it under the same terms as the project's license, we've adopted the same lightweight approach that [the Linux Kernel](https://www.kernel.org/doc/Documentation/SubmittingPatches), [Docker](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), and many other projects use: the [**DCO - Developer Certificate of Origin**](http://developercertificate.org/). This is a simple declaration that you wrote the contribution or otherwise have the right to contribute it to Matrix:
55+
56+
```
57+
Developer Certificate of Origin
58+
Version 1.1
59+
60+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
61+
660 York Street, Suite 102,
62+
San Francisco, CA 94110 USA
63+
64+
Everyone is permitted to copy and distribute verbatim copies of this
65+
license document, but changing it is not allowed.
66+
67+
Developer's Certificate of Origin 1.1
68+
69+
By making a contribution to this project, I certify that:
70+
71+
(a) The contribution was created in whole or in part by me and I
72+
have the right to submit it under the open source license
73+
indicated in the file; or
74+
75+
(b) The contribution is based upon previous work that, to the best
76+
of my knowledge, is covered under an appropriate open source
77+
license and I have the right under that license to submit that
78+
work with modifications, whether created in whole or in part
79+
by me, under the same open source license (unless I am
80+
permitted to submit under a different license), as indicated
81+
in the file; or
82+
83+
(c) The contribution was provided directly to me by some other
84+
person who certified (a), (b) or (c) and I have not modified
85+
it.
86+
87+
(d) I understand and agree that this project and the contribution
88+
are public and that a record of the contribution (including all
89+
personal information I submit with it, including my sign-off) is
90+
maintained indefinitely and may be redistributed consistent with
91+
this project or the open source license(s) involved.
92+
```
93+
94+
If you agree to this for your contribution, then all that's needed is to include the line in your commit or merge request comment:
95+
96+
`Signed-off-by: Your Name <your@email.example.org>`
97+
98+
We accept contributions under a legally identifiable name, such as your name on government documentation or common-law names (names claimed by legitimate usage or repute). Unfortunately, we cannot accept anonymous contributions at this time.
99+
100+
Git allows you to add this signoff automatically when using the `-s` flag to `git commit`, which uses the name and email set in your `user.name` and `user.email` git configs.
101+
102+
If you forgot to sign off your commits before making your pull request and are on Git 2.17+ you can mass signoff using rebase:
103+
104+
`git rebase --signoff origin/main`

‎README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Matrix SDK for the famedly talk app written in dart.
44

55
## Native libraries
66

7-
For E2EE, libolm must be provided (see https://pub.dev/packages/olm#using-dart-olm).
7+
For E2EE, libolm must be provided.
8+
89
Additionally, OpenSSL (libcrypto) must be provided on native platforms for E2EE.
910

11+
For flutter apps you can easily import it with the [flutter_olm](https://pub.dev/packages/flutter_olm) and the [flutter_openssl_crypto](https://pub.dev/packages/flutter_openssl_crypto) packages.
12+
1013
## API
1114

1215
The API is documented here: [famedly.gitlab.io/famedlysdk/](https://famedly.gitlab.io/famedlysdk/)
@@ -22,18 +25,16 @@ The API is documented here: [famedly.gitlab.io/famedlysdk/](https://famedly.gitl
2225
```
2326
2427
```dart
25-
import 'package:flutter/material.dart';
2628
import 'package:famedlysdk/famedlysdk.dart';
2729
```
2830

2931
2. Create a new client:
3032

3133
```dart
32-
Client client = Client("HappyChat");
34+
final client = Client("HappyChat");
3335
```
3436

35-
Take a look here for an example store:
36-
[https://gitlab.com/ChristianPauly/fluffychat-flutter/snippets](https://gitlab.com/ChristianPauly/fluffychat-flutter/snippets)
37+
The SDK works better with a Moor database. Otherwise it has no persistence. [Take a look here for an example store](https://gitlab.com/famedly/fluffychat/-/tree/main/lib/utils/database).
3738

3839
3. Connect to a Matrix Homeserver and listen to the streams:
3940

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: famedlysdk
22
description: Matrix Dart SDK
3-
version: 0.0.1
3+
version: 0.1.0
44
author: Famedly GmbH <info@famedly.com>
55
homepage: https://famedly.com
66

0 commit comments

Comments
 (0)
Please sign in to comment.