A Software-Defined Funding Distribution
Project description
Continuous Funding
LibreSelery is a tool to distribute funding in free and open source projects. With a new funding model it offers transparent, automated and adaptable compensation of contributors. The aim is to replace the middleman of donation distribution as far as possible with a free and transparent algorithm.
This project is funded by LibreSelery itself. If you contribute to this repository, you will receive portation from the pool to your public email address.
Concept
LibreSelery is a simple command line tool that runs upon any git project manuely or automated by continuous integration. It creates as a donation pool collecting cryptocurrency in a wallet. At each run an amount is taken from the donation pool and distributed to the project's contributors and dependencies.
It is designed to run in a continuous integration pipeline like GitHub Actions. Donation transactions are automatically handled and transaction details are published for transparency into the wiki of your repository with a donation page of your project.
Donations are divided between contributors based on a public and transparent metric. The metric can be configured per repository and is based on the following weights:
- Uniform Weight: Everyone who contributed a minimum number of commits to the main branch is considered
- Activity Weight: Everyone who contributed in the last X commits
- Service Weight: Everyone who contributed to successful pull requests based on issues in the last X commits (not implemented yet #132)
More weights are under active development and will be added in the future.
The amount distributed to each contributor is calculated from an accumulation of these weights. It is sent via the cryptocurrency market API to the public email address of the git platform user profile. You can even activate to compensate contributors from your dependencies.
Implementation
LibreSelery ...
- is configured based on the selery.yml file and runs as a GitHub Action on your project.
- is triggered with every push on the main branch by the GitHub Action worflow file that is part of your project repository.
- gathers contributor information about the target project via the GitHub and Libraries.io API.
- filters out contributors with a hidden email address in the github profile and below the minimum contribution limit. LibreSelery will not send emails to the git commit email addresses in order to avoid spam.
- creates custom funding distribution weights based on the contribution rating of various projects: Minimum contribution, activity, ...
- adds the weights to the combined weight used for different distribution splitting behaviors.
- distributes the funding between the contributors based on the selected split behavior.
- pays out cryptocurrency to the selected contributors' email addresses via the Coinbase API. Contributors without a Coinbase account will receive an email to claim the donation.
- generates automatically a dotation and transaction visualization website in your GitHub wiki.
Features
- Transparent payout of GitHub project contributors with every push you make to your main (master) branch.
- Minimal changes to your GitHub project shown in the seleryexample to adapt LibreSelery with just a view steps.
- Detailed transaction history is regenerated in your github wiki every time you run LibreSelery.
- User defined payout configuration by the selery.yml.
- Dependency scanning for most languages to even include developers of your dependencies using Libraries.io.
- The money is distributed via Coinbase. Other payment methods like Uphold are currently work in progress.
- Donators can see transparent payout logs in GitHub Action.
- Self-hosted donation website for secure donations is automatically stored in the Wiki of your repository.
- Simulate the money distribution for your repository without actually transferring money to see how the money would be distributed.
- Automated statistic generation on how much money was paid out to which contributor.
- Splitting Strategies:
- full_split - All contributors receive a payout according to their weight.
- random_split - X contributors are randomly picked using the weight as probability.
Getting Started
Since the project is in its early stages the amount of funding on your wallet should therefore be limited.
GitHub Actions Integration
Use the template seleryaction to integrate LibreSelery into any GitHub project. Starting with GitHub Actions integration is the easiest way for newcomers and people without Linux knowledge.
Command Line Usage
Running with Docker
- Install Docker:
cd ~
git clone https://github.com/protontypes/libreselery.git
cd libreselery
./build.sh
- Create a token file for your user, where you store API keys and secrets:
mkdir -p ~/.libreselery/secrets ~/.libreselery/results/public
touch ~/.libreselery/secrets/tokens.env
-
LibreSelery just needs API tokens from GitHub when
simulation = True
andinclude_dependencies = False
in yourselery.yml
. The scope of your github token should not include any additional permissions beyond the standard minimum scope. Find out more about how to create GitHub tokens here. Replace XXXXX with the Coinbase and Libraries.io tokens to get started without creating an actual accounts for these APIs. -
Make the token file read only:
chmod 400 ~/.libreselery/secrets/tokens.env
- Clone your target repository:
git clone <target_repository>
- Copy a selery.yml into your <target_repository>. Set
simulation: False
in your selery.yml to enable payouts with LibreSelery. - Adjust and test different configurations in simulation mode on your repository project.
- Create a dedicated Coinbase account with limited amounts. Coinbase does not support sending emails to yourself. That's why you should use a dedicated email address when you are the owner of the Coinbase account and contributor of the project. Otherwise LibreSelery will skip these payouts.
- Buy some cryptocurrency. See the price list for transferring money into the Coinbase account.
- Configure the access control settings of the automated Coinbase wallet.
- Never transfer or store large values with automated cryptocurrency wallets. Use recurring automated buys to recharge you wallet on a regular base to avoid financial and security risks. Coinbase does not charge for transferring cryptocurrency from one Coinbase wallet to another.
- Add your coinbase API keys and secrets to the newly created file (
~/.libreselery/tokens.env
). Never store these tokens in a public repository .
COINBASE_TOKEN=<your_coinbase_token>
COINBASE_SECRET=<your_coinbase_secret>
GITHUB_TOKEN=<your_github_tokens>
LIBRARIES_API_KEY=<your_libaries_io_tokens>
- Send cryptocurrency to weighted random product contributors with a valid visible email address on GitHub:
env $(cat ~/.libreselery/secrets/tokens.env) ./run.sh <target_repository>
Run directly on your host machine
- Install the dependencies on your machine.
sudo apt update && sudo apt install git ruby ruby-dev curl python3-pip
pip3 install .
- Ensure that
$HOME/.local/bin
is in$PATH
. Check the output ofecho $PATH
. If it does not contain.local/bin
add the following line to your dotfile for example~/.bashrc
.
export PATH=$HOME/.local/bin:$PATH
- Run LibreSelery on your target project.
env $(cat ~/.libreselery/secrets/tokens.env) selery run -d ~/<target_repository> -r ~/.libreselery/results/
Roadmap
LibreSelery is gone support multiple APIs and assets in the near future like:
- GitHub
- Gitlab
- Savannah
- Libraries.io
- Coinbase
- Uphold
Support LibreSelery
Donations
Certainly we are funded by LibreSelery over direct donations via our donation website
. The usage and development of LibreSelery will always be free and without any charges. If you want to support us by using LibreSelery you need to add us to the tooling_repos.yml
.
Contributions
Those who have contributed to the master branch receive emails with cryptocurrency from Coinbase. Only git profiles with emails on the GitHub profile page will be considered. Find out more in the contribution guide or look into the good first issue labels to get into the project with some first simple tasks.
Contact and Feedback
For further information please contact us at team_at_protontypes.eu
, join our Gitter chat or check out our wiki.
Artwork by Miriam Winter and undraw
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file libreselery-0.0.1.dev74.tar.gz
.
File metadata
- Download URL: libreselery-0.0.1.dev74.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d5a6fb1cd50377c25d428ac4f140635a717d3d9836330f710ace46ea992d409 |
|
MD5 | 0683a8f9cbe92045207d53b224c4a940 |
|
BLAKE2b-256 | fe29d42e8c3b229197512a6770dbe66e532f1697b7c8477e6c9c86a0a9fec21f |
File details
Details for the file libreselery-0.0.1.dev74-py3-none-any.whl
.
File metadata
- Download URL: libreselery-0.0.1.dev74-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 563aefcd41e7245b5e6bdb1f8d45cee6bd698107f1b9f166c14bfb1a5c387bff |
|
MD5 | 4772d7df3ef7c4559a46d6a6ae8d9d1a |
|
BLAKE2b-256 | 763da5b20347051cd83161fa6d44651417308790e05cd74f2d765dfad5751a2c |