Skip to content
No description, website, or topics provided.
Python PHP C# Makefile HTML JavaScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


It is advised to familiar yourself with the basic concepts of 101worker

The following installation guide assumes the usage of Ubuntu Linux. OSX works similar. Windows might work to some extent.

Install on Ubuntu Linux

git clone
cd 101worker
make init -B
sudo make install-pip-pkgs -B
make download

Install on Windows

Install python3. Be sure to check "Add to path" when the installer prompts.

git clone
cd 101worker
make init
make install-pip-pkgs
make download

Environment Variables are:

  • OMIT_GITDEPS - Skips pulling gitdeps
  • FULL_SWEEP - Perform a full sweep, disables incremental features
  • OMIT_PULL - Skips pulling 101repo

The full list of modules is configured


Running a module

Use bin/run_module [moduleName] to run a single Module. The Test-Environment is specified in config/test_folders.txt which lists a number of directories from 101results/101repo to be copied to 101test/. This mode sets OMIT_GITDEPS, FULL_SWEEP and OMIT_PULL. This also deletes any dumps created by the module. Note for this to work the behavior must be configured. For more verbose output please use -v [2 or 3].

(Windows users have to use python bin/run_module [moduleName])

Resource Derivation

An example module can be found at It counts the lines of code of every source file in 101repo.

Dump Collection

An example module for this can be found at This modules collects all Loc files and puts them into a per contribution dump.

Third party Resource

An example module for this can be found at It takes a resource generated by another module to extract facts about the source code.

Wiki Dump

An example module for this can be found at It parses the wiki dump and produces some tag clouds. These kinds of modules are not incremental.



Modules define the following names:

  • run(context, c) or run(context) depending on the configuration (see below).
  • test()
  • config


A dictionary which describes the required contract for the module. Keys are:

  • wantdiff - gets called for every incremental change
  • wantsfiles - not incremental but needs all files from 101repo (like FULL_SWEEP), if set to false and wantdiff is false as well, the module run is only run(context)
  • threadsafe - not used atm
  • behavior - defines input and output (optional)


config = {
    'behavior': {
        'creates': [['dump', 'locPerContribution']],
        'uses': [['resource', 'loc']]

Note that creates and uses are lists of lists.

run(context, c)

Define this method if you use wantdiff or wantsfiles. c has the following Structure:

  'file': 'contributions/some-contribution/'

Use this for modules which operate on single files, also for modules which work on derived resources.


Define this method for modules which set wantdiff and wantsfiles to false. Use this for modules which use dumps or external resources.


This method is used for testing, run bin/test to execute all tests for every module. Executing the tests executes the test function for every module. The test function should be in most cases:

def test():
    suite = unittest.TestLoader().loadTestsFromTestCase(ExampleModuleTest)

Refer to simpleLoc for an example. Testing the run function requires some kind of mocking usually, refer to the python documentation for further details. Note that you should make sure that the necessary functions are called with the correct parameters, use assert_called_with.

You can’t perform that action at this time.