Home | Trees | Index | Help |
|
---|
Package cheesecake :: Module cheesecake_index :: Class Cheesecake |
|
object
--+
|
Cheesecake
Computes 'goodness' of Python packages.
Generates "cheesecake index" that takes into account things like:
- whether the package can be downloaded
- whether the package can be unpacked
- whether the package can be installed into an alternate directory
- existence of certain files such as README, INSTALL, LICENSE, setup.py etc.
- existence of certain directories such as doc, test, demo, examples
- percentage of modules/functions/classes/methods with docstrings
- percentage of functions/methods that are unit tested
- average pylint score for all non-test and non-demo modules
Method Summary | |
---|---|
Initialize critical variables, download and unpack package, walk package tree. | |
Delete temporary directories and files that were created in the sandbox. | |
Compute overall Cheesecake index for the package by adding up specific indexes. | |
Default settings for logging. | |
Copy package file to sandbox directory. | |
Use urllib.urlretrieve to download package to file in sandbox dir. | |
Download package using setuptools utilities. | |
Verify that package can be installed in alternate directory. | |
Cleanup, print error message and raise CheesecakeError. | |
Run step if its decide() method returns True. | |
Unpack the package in the sandbox directory. | |
Get package files and directories. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
dict |
package_types = {'tar.gz': <function untar_package at 0x...
|
dict |
steps = {'install_pkg': <cheesecake.cheesecake_index.Ste...
|
Method Details |
---|
__init__(self,
keep_log=False,
lite=False,
logfile=None,
name='',
path='',
pylint_max_execution_time=None,
quiet=False,
sandbox=None,
static_only=False,
url='',
verbose=False,
with_pep8=False)
|
cleanup(self, remove_log_file=True)Delete temporary directories and files that were created in the sandbox. At the end delete the sandbox itself. |
compute_cheesecake_index(self)Compute overall Cheesecake index for the package by adding up specific indexes. |
configure_logging(self, logfile=None)Default settings for logging. If verbose, log goes to console, else it goes to logfile. log.debug and log.info goes to logfile. log.warn and log.error go to both logfile and stdout. |
copy_pkg(self)Copy package file to sandbox directory. |
download_pkg(self)Use urllib.urlretrieve to download package to file in sandbox dir. |
get_pkg_from_pypi(self)Download package using setuptools utilities.
|
install_pkg(self)Verify that package can be installed in alternate directory.
|
raise_exception(self, msg)Cleanup, print error message and raise CheesecakeError. Don't use logging, since it can be called before logging has been setup. |
run_step(self, step_name)Run step if its decide() method returns True. |
unpack_pkg(self)Unpack the package in the sandbox directory. Check
|
walk_pkg(self)Get package files and directories.
|
Class Variable Details |
---|
steps
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Feb 9 02:15:12 2007 | http://epydoc.sf.net |