From a9b4554156bac38cd3ca1162326ce9cf554f9b50 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 30 Aug 2016 11:25:27 -0400 Subject: [pkg] add some relevant docs --- docs/core_api_contract | 41 ++++++++++++ docs/leap-autopep8.post-commit.hook | 15 +++++ docs/leap-autopep8.post-commit.hook.ADD | 2 + docs/leap-commit-template | 7 ++ docs/leap-commit-template.README | 47 ++++++++++++++ docs/leap-flake8.pre-commit.hook | 7 ++ docs/man/bitmask-root.1.rst | 74 +++++++++++++++++++++ docs/man/bitmask.1.rst | 111 ++++++++++++++++++++++++++++++++ docs/release_checklist.wiki | 90 ++++++++++++++++++++++++++ docs/testing-rcs.README | 35 ++++++++++ 10 files changed, 429 insertions(+) create mode 100755 docs/core_api_contract create mode 100755 docs/leap-autopep8.post-commit.hook create mode 100755 docs/leap-autopep8.post-commit.hook.ADD create mode 100644 docs/leap-commit-template create mode 100644 docs/leap-commit-template.README create mode 100755 docs/leap-flake8.pre-commit.hook create mode 100644 docs/man/bitmask-root.1.rst create mode 100644 docs/man/bitmask.1.rst create mode 100644 docs/release_checklist.wiki create mode 100644 docs/testing-rcs.README (limited to 'docs') diff --git a/docs/core_api_contract b/docs/core_api_contract new file mode 100755 index 0000000..b70fb8f --- /dev/null +++ b/docs/core_api_contract @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# api_contract.py +# Copyright (C) 2016 LEAP Encryption Acess Project +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +""" +Display a human-readable representation of the methods that compound the public +api for Bitmask Core. + +The values are meant to be type annotations. +""" + +if __name__ == "__main__": + from leap.bitmask.core.service import BitmaskBackend + from leap.bitmask.core import api + backend = BitmaskBackend() + + print '========= Bitmask Core API ==================' + print + + for key in api.registry: + human_key = key.replace('do_', '').lower() + value = api.registry[key] + + print("{}:\t\t{}".format( + human_key, + ' '.join([x for x in value]))) + print + print '=============================================' diff --git a/docs/leap-autopep8.post-commit.hook b/docs/leap-autopep8.post-commit.hook new file mode 100755 index 0000000..cffb1d5 --- /dev/null +++ b/docs/leap-autopep8.post-commit.hook @@ -0,0 +1,15 @@ +#!/bin/sh + +# Auto pep8 correction as a post-commit hook. +# Thanks to http://victorlin.me/posts/2014/02/05/auto-post-commit-pep8-correction + +echo "[+] running autopep8..." +FILES=$(git diff HEAD^ HEAD --name-only --diff-filter=ACM | grep -e '\.py$') + +for f in $FILES +do + # auto pep8 correction + autopep8 --in-place $f +done + +git status diff --git a/docs/leap-autopep8.post-commit.hook.ADD b/docs/leap-autopep8.post-commit.hook.ADD new file mode 100755 index 0000000..b6e07ae --- /dev/null +++ b/docs/leap-autopep8.post-commit.hook.ADD @@ -0,0 +1,2 @@ + #!/bin/sh + cd .git/hooks && ln -s ../../docs/leap-autopep8.post-commit.hook post-commit diff --git a/docs/leap-commit-template b/docs/leap-commit-template new file mode 100644 index 0000000..8a5c7cd --- /dev/null +++ b/docs/leap-commit-template @@ -0,0 +1,7 @@ +[bug|feat|docs|style|refactor|test|pkg|i18n] ... +... + +- Resolves: #XYZ +- Related: #XYZ +- Documentation: #XYZ +- Releases: XYZ diff --git a/docs/leap-commit-template.README b/docs/leap-commit-template.README new file mode 100644 index 0000000..ce8809e --- /dev/null +++ b/docs/leap-commit-template.README @@ -0,0 +1,47 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +HOW TO USE THIS TEMPLATE: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Run `git config commit.template docs/leap-commit-template` or +edit the .git/config for this project and add +`template = docs/leap-commit-template` +under the [commit] block + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +COMMIT TEMPLATE FORMAT EXPLAINED +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[type] + + +