Added contribution guide.

This commit is contained in:
Nicolás A. Ortega 2017-07-03 17:18:17 +02:00
parent 0db8eb82e9
commit 1f4b0c3cdd
No known key found for this signature in database
GPG Key ID: 3D786FB3123FF1DD
2 changed files with 52 additions and 5 deletions

45
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,45 @@
Contributing Guide
==================
This file is a list of guidelines that must be followed if you would like to submit code or asset contributions to TFGCW. This document has the following sections:
- Licensing & Copyright
- Code Style
- Fractured Patches
Licensing & Copyright
---------------------
All code contributions will be licensed under the [GNU Lesser General Public License version 3 or greater](/LICENSE). If you create any new files you **must** have the following copyright notice prepended to the file:
```c
/*
* Copyright (C) 2017 <your name> <your@email.org>
* Author: <your name> <your@email.org>
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
```
Have this text commented out at the beginning of every source file you create.
Code Style
----------
Generally just try to keep your coding consistent with the project's style, if you see things done in manner X try to do them like X. That being said, there are a few things that are important to remember:
1. This project uses tabs for indentation, please do not use spaces and most definitely do not use a mix of both.
2. When using loops and conditionals, if you're going to use brackets, please use broken brackets (ie. put brackets on their own line).
3. One instruction per line is ideal, sometimes it's not necessary, but if it's a simple conditional with a `return` statement or something please put the `return` on the next line.
4. Please document any additional interfaces you add to the library using [Doxygen style comments](http://www.stack.nl/~dimitri/doxygen/) so the API documentation can be automatically generated. If internal code is obscure or requires explanation then please do so as well, for the sake of yourself and all those that come after.
Fractured Patches
-----------------
Please make sure that any patches you give do only one thing. Do not mix bug fixes with features with enhancements or anything of the sort. Even if it's just bug fixes (as an example, could be anything else) please make sure that each patch only fixes one thing. Exceptions are fine if they are required (this will be judged based on circumstance).

View File

@ -6,6 +6,7 @@ This repository provides a library with interfaces by which you can access the n
Network Model
-------------
This model moves further from the federated decentralization model, taking one closer to that of torrents with their peer discovery. There are three components to the network: nodes and directory nodes. All connected machines work as nodes, but only those that are not firewalled can function as directory nodes (nodes that other nodes can connect to). With this model the directory nodes would serve the functionality of trackers in a torrent system (those nodes that have enough uptime to be considered _directory servers_).
API Documentation
-----------------
@ -17,17 +18,18 @@ _There are currently no clients available._
Building
--------
This project has a few dependencies necessary for proper functionality. Please install the following:
- CMake
To compile run the following commands:
To build this project you will need a C99 compatible compiler ([GCC](https://gcc.gnu.org/) is recommended) and the [CMake build system](https://cmake.org/). To build run the following commands from the root directory of the project.
```
$ cd build/
$ cmake ..
$ make
```
By default this will build a `release` build, if you require a debug build run the `cmake` command with the additional parameter `-DCMAKE_BUILD_TYPE=debug`.
By default this will build a `release` build, if you require a debug build run the `cmake` command with the additional flag `-DCMAKE_BUILD_TYPE=debug`.
Contributing
------------
If you would like to contribute to the project please read over the [contribution guide](/CONTRIBUTING.md).
License
-------