Susereum User's Guide - obahy/Susereum GitHub Wiki

Background

Susereum is a software system that aids software projects towards more sustainable code. This is accomplished by restructuring incentives to reward code authors with a crypto credit (called Suse). Susereum measures quality of code using metrics defined by the project peers themselves. Alternatively, the peers can reuse default quality measures.

Using Susereum for your codebase is a seamless process as it does not require any change to your infrastructure or tooling. Susereum listens to change in your code repository and monitors code quality change over time.

The following guide provides the requirements and steps for users who wish to use Susereum for their GitHub project.

Requirements

Any operating system or a VM from the following:

  • Windows 10

  • Ubuntu 16.04

  • Python 3 or higher

    • If you do not have Python installed, you can download it here
  • GitHub account

Installation

You can install Susereum using the following steps:


  • Use the Command Prompt/Terminal/your favorite Python Editor to clone or download the Susereum Repository by using the following link:
https://github.com/obahy/Susereum.git
  • Once you clone the repository, you will need to run the install script
cd Susereum/ServerSideScripts/
sudo ./install.sh
  • Download SourcerMeter using this link

    • You will need to enter a valid email where this is where your downloadable .zip or .tar file will be sent.
    • For more information on SourceMeter, please refer to How Susereum Achieves Sustainable Code page which is located in the Code Analysis section
  • Unzip SourceMeter into Susereum/CodeAnalysis/SourceMeter_Interface/

  • Now have access to all Susereum’s project files. These include GTK+, GUI application using the PyGObject:

  • Locate the login script which can be found under, “Susereum-master/GUI/login_screen.py”. Run the script and enter your GitHub credentials.

Locating the Config File

  • In order to upload your GitHub repository to Susereum, go to the GitHub repository where Susereum has been installed and view the Config (.suse) file which should look like the following:

# Copyright 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------------------------

#
# Sawtooth -- Settings Transaction Processor Configuration
#
[about]
NewuserLink = "http://Some.IP.Address./connect/tmp.<fileID>"
Title = "Code Smell Family Configuration"

[vote_setting]
proposal_active_days = 3
approval_treshold = 1

[code_smells.method]
SmallMethod = [ 5, 1,]
LargeParameterList = [ 5, 1,]
LargeMethod = [ 50, 1,]

[code_smells.comments]
CommentsToCodeRatioUpper = [ 35.0, 1.0,]
CommentsToCodeRatioLower = [ 10.0, 1.0,]

[code_smells.class]
SmallClass = [ 10, 1,]
GodClass = [ 5, 1,]
LargeClass = [ 100, 1,]
InappropriateIntimacy = [ 5, 1,]


  • Use copy the 'NewUserLink' to Susereum so your project can be analyzed. For More information regarding the GUI, please refer to the GUI Module and Helpful Links Module found later in this guide.

Note: The config file ".suse" in you project is written in "TOML"

  • In future iterations, we will make this process a downloadable file

Congratulations! You can now start your journey on developing more sustainable code!

How to use Susereum!

Overview

Here is a general overview of how Susereum will be used

1) Request Project Listing The first step is to request your project codebase to be enlisted in Susereum. Enlisting your codebase allows Susereum to monitor your codebase sustainability, measure sustainability changes over time, and issue credit (Suse) for contributors.

Steps to Request Listing!

2) Access Project Dashboard Your project dashboard provides two functionalities to all your project team members. First, the dashboard provides information on your codebase health and allows you to participate in the Susereum Protocol.

3) Redefine Sustainability Metrics Any stakeholder in your team can propose new or edit existing metrics by following Susereum Protocol.

Video Walkthrough for Susereum GUI

User's use the following link on how to use the Susereum product on their GitHub projects:

How to Use Susereum

How to Commit a Vote

Adding Features

Currently Susereum offers the discovery of nine code smells. If you wish to see another code smell in future iterations, you can send your request to:

[email protected]


⚠️ **GitHub.com Fallback** ⚠️