diff options
author | Hugh Brown <hbrown@amplify.com> | 2013-10-10 17:47:56 -0400 |
---|---|---|
committer | Hugh Brown <hbrown@amplify.com> | 2013-10-10 18:41:39 -0400 |
commit | 3fa43cb167c68a8b8a9cb80af6c5e9638cb16250 (patch) | |
tree | 559ced0a533501a1da7ea66775e84a327636e2fd | |
parent | 7d93126f4ca78e3ed456cc27ac1c8cf1140305af (diff) | |
download | python-jenkinsapi-3fa43cb167c68a8b8a9cb80af6c5e9638cb16250.tar.gz python-jenkinsapi-3fa43cb167c68a8b8a9cb80af6c5e9638cb16250.tar.bz2 python-jenkinsapi-3fa43cb167c68a8b8a9cb80af6c5e9638cb16250.zip |
Add module and class docstrings
-rw-r--r-- | jenkinsapi/command_line/__init__.py | 3 | ||||
-rw-r--r-- | jenkinsapi/command_line/jenkins_invoke.py | 4 | ||||
-rw-r--r-- | jenkinsapi/exceptions.py | 5 | ||||
-rw-r--r-- | jenkinsapi/fingerprint.py | 4 | ||||
-rw-r--r-- | jenkinsapi/invocation.py | 4 | ||||
-rw-r--r-- | jenkinsapi/jenkins.py | 5 | ||||
-rw-r--r-- | jenkinsapi/jenkinsbase.py | 4 | ||||
-rw-r--r-- | jenkinsapi/job.py | 4 | ||||
-rw-r--r-- | jenkinsapi/mutable_jenkins_thing.py | 4 | ||||
-rw-r--r-- | jenkinsapi/node.py | 4 | ||||
-rw-r--r-- | jenkinsapi/nodes.py | 4 | ||||
-rw-r--r-- | jenkinsapi/plugin.py | 8 | ||||
-rw-r--r-- | jenkinsapi/plugins.py | 7 | ||||
-rw-r--r-- | jenkinsapi/queue.py | 4 | ||||
-rw-r--r-- | jenkinsapi/result.py | 11 | ||||
-rw-r--r-- | jenkinsapi/result_set.py | 4 | ||||
-rw-r--r-- | jenkinsapi/utils/__init__.py | 3 | ||||
-rw-r--r-- | jenkinsapi/utils/requester.py | 4 | ||||
-rw-r--r-- | jenkinsapi/view.py | 7 | ||||
-rw-r--r-- | jenkinsapi/views.py | 11 |
20 files changed, 97 insertions, 7 deletions
diff --git a/jenkinsapi/command_line/__init__.py b/jenkinsapi/command_line/__init__.py index e69de29..bbea723 100644 --- a/jenkinsapi/command_line/__init__.py +++ b/jenkinsapi/command_line/__init__.py @@ -0,0 +1,3 @@ +""" +__init__,py for commandline module +""" diff --git a/jenkinsapi/command_line/jenkins_invoke.py b/jenkinsapi/command_line/jenkins_invoke.py index b466d7a..ef2b742 100644 --- a/jenkinsapi/command_line/jenkins_invoke.py +++ b/jenkinsapi/command_line/jenkins_invoke.py @@ -1,3 +1,7 @@ +""" +jenkinsapi class for invoking Jenkins +""" + import os import sys import logging diff --git a/jenkinsapi/exceptions.py b/jenkinsapi/exceptions.py index 65d9aeb..48539cc 100644 --- a/jenkinsapi/exceptions.py +++ b/jenkinsapi/exceptions.py @@ -1,3 +1,8 @@ +""" +Module for exceptions specialized for jenkinsapi +""" + + class JenkinsAPIException(Exception): """ Base class for all errors diff --git a/jenkinsapi/fingerprint.py b/jenkinsapi/fingerprint.py index 7ca13b7..539c10f 100644 --- a/jenkinsapi/fingerprint.py +++ b/jenkinsapi/fingerprint.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi Fingerprint +""" + from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.exceptions import ArtifactBroken diff --git a/jenkinsapi/invocation.py b/jenkinsapi/invocation.py index b305f0a..f578dab 100644 --- a/jenkinsapi/invocation.py +++ b/jenkinsapi/invocation.py @@ -1,3 +1,7 @@ +""" +Module for Jenkinsapi Invocation object +""" + import time import datetime from jenkinsapi.exceptions import UnknownQueueItem, TimeOut diff --git a/jenkinsapi/jenkins.py b/jenkinsapi/jenkins.py index bfd4aa2..9b61d85 100644 --- a/jenkinsapi/jenkins.py +++ b/jenkinsapi/jenkins.py @@ -1,3 +1,8 @@ +""" +Module for jenkinsapi Jenkins object +""" + + import json import urllib import logging diff --git a/jenkinsapi/jenkinsbase.py b/jenkinsapi/jenkinsbase.py index f2b3238..5fd59ab 100644 --- a/jenkinsapi/jenkinsbase.py +++ b/jenkinsapi/jenkinsbase.py @@ -1,3 +1,7 @@ +""" +Module for JenkinsBase class +""" + import logging from jenkinsapi import config from jenkinsapi.exceptions import JenkinsAPIException diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py index 548de72..de3494c 100644 --- a/jenkinsapi/job.py +++ b/jenkinsapi/job.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi Job +""" + import json import logging import urlparse diff --git a/jenkinsapi/mutable_jenkins_thing.py b/jenkinsapi/mutable_jenkins_thing.py index b99eddf..2a8a3f6 100644 --- a/jenkinsapi/mutable_jenkins_thing.py +++ b/jenkinsapi/mutable_jenkins_thing.py @@ -1,3 +1,7 @@ +""" +Module for MutableJenkinsThing +""" + class MutableJenkinsThing(object): """ A mixin for certain mutable objects which can be renamed and deleted. diff --git a/jenkinsapi/node.py b/jenkinsapi/node.py index 3d804f6..e2409f0 100644 --- a/jenkinsapi/node.py +++ b/jenkinsapi/node.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi Node class +""" + from jenkinsapi.jenkinsbase import JenkinsBase import logging import urllib diff --git a/jenkinsapi/nodes.py b/jenkinsapi/nodes.py index 4095031..56a5068 100644 --- a/jenkinsapi/nodes.py +++ b/jenkinsapi/nodes.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi nodes +""" + import logging from jenkinsapi.node import Node from jenkinsapi.exceptions import UnknownNode diff --git a/jenkinsapi/plugin.py b/jenkinsapi/plugin.py index 17f48d6..44d542b 100644 --- a/jenkinsapi/plugin.py +++ b/jenkinsapi/plugin.py @@ -1,4 +1,12 @@ +""" +Module for jenkinsapi Plugin +""" + class Plugin(object): + """ + Plugin class + """ + def __init__(self, plugin_dict): assert(isinstance(plugin_dict, dict)) self.__dict__ = plugin_dict diff --git a/jenkinsapi/plugins.py b/jenkinsapi/plugins.py index a509287..ea38b5d 100644 --- a/jenkinsapi/plugins.py +++ b/jenkinsapi/plugins.py @@ -1,3 +1,7 @@ +""" +jenkinsapi plugins +""" + import logging from jenkinsapi.jenkinsbase import JenkinsBase @@ -8,6 +12,9 @@ log = logging.getLogger(__name__) class Plugins(JenkinsBase): + """ + Plugins class for jenkinsapi + """ def __init__(self, url, jenkins_obj): self.jenkins_obj = jenkins_obj JenkinsBase.__init__(self, url) diff --git a/jenkinsapi/queue.py b/jenkinsapi/queue.py index 8aa80e1..5c5b506 100644 --- a/jenkinsapi/queue.py +++ b/jenkinsapi/queue.py @@ -1,3 +1,7 @@ +""" +Queue module for jenkinsapi +""" + from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.exceptions import UnknownQueueItem import logging diff --git a/jenkinsapi/result.py b/jenkinsapi/result.py index b643ed7..862999b 100644 --- a/jenkinsapi/result.py +++ b/jenkinsapi/result.py @@ -1,8 +1,13 @@ +""" +Module for jenkinsapi Result +""" + class Result(object): - def __init__(self, **kwargs): - """ + """ + Result class + """ - """ + def __init__(self, **kwargs): self.__dict__.update(kwargs) def __str__(self): diff --git a/jenkinsapi/result_set.py b/jenkinsapi/result_set.py index b635e4e..88fd1e9 100644 --- a/jenkinsapi/result_set.py +++ b/jenkinsapi/result_set.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi ResultSet +""" + from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.result import Result diff --git a/jenkinsapi/utils/__init__.py b/jenkinsapi/utils/__init__.py index e69de29..1cf8c6e 100644 --- a/jenkinsapi/utils/__init__.py +++ b/jenkinsapi/utils/__init__.py @@ -0,0 +1,3 @@ +""" +Module __init__ for utils +""" diff --git a/jenkinsapi/utils/requester.py b/jenkinsapi/utils/requester.py index 72b4db4..290fe6c 100644 --- a/jenkinsapi/utils/requester.py +++ b/jenkinsapi/utils/requester.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi requester (which is a wrapper around python-requests) +""" + import requests from jenkinsapi.exceptions import JenkinsAPIException # import logging diff --git a/jenkinsapi/view.py b/jenkinsapi/view.py index ff2f03d..5312d06 100644 --- a/jenkinsapi/view.py +++ b/jenkinsapi/view.py @@ -1,3 +1,6 @@ +""" +Module for jenkinsapi views +""" import urllib import logging @@ -9,6 +12,10 @@ log = logging.getLogger(__name__) class View(JenkinsBase): + """ + View class + """ + def __init__(self, url, name, jenkins_obj): self.name = name self.jenkins_obj = jenkins_obj diff --git a/jenkinsapi/views.py b/jenkinsapi/views.py index 0dba4dd..4926f5b 100644 --- a/jenkinsapi/views.py +++ b/jenkinsapi/views.py @@ -1,3 +1,7 @@ +""" +Module for jenkinsapi Views +""" + import logging import json from jenkinsapi.view import View @@ -6,6 +10,9 @@ log = logging.getLogger(__name__) class Views(object): + """ + An abstraction on a Jenkins object's views + """ # TODO @lechat 20130702: Add check that plugin for view actually exists in Jenkins LIST_VIEW = 'hudson.model.ListView' @@ -14,10 +21,6 @@ class Views(object): DASHBOARD_VIEW = 'hudson.plugins.view.dashboard.Dashboard' PIPELINE_VIEW = 'au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView' - """ - An abstraction on a Jenkins object's views - """ - def __init__(self, jenkins): self.jenkins = jenkins |