PKPMOdwily/__init__.py""" A Python application for tracking, reporting on timing and complexity in tests and applications. """ import colorlog import datetime __version__ = "0.4.2" _handler = colorlog.StreamHandler() _handler.setFormatter(colorlog.ColoredFormatter("%(log_color)s%(message)s")) logger = colorlog.getLogger(__name__) logger.addHandler(_handler) def format_date(timestamp): """ Reusable timestamp -> date """ return datetime.date.fromtimestamp(timestamp).isoformat() PK$OMi:MMwily/__main__.pyimport click from wily import logger from wily.cache import exists from wily.config import load as load_config from wily.config import DEFAULT_CONFIG_PATH from wily.archivers import resolve_archiver from wily.operators import resolve_operators @click.group() @click.option("--debug/--no-debug", default=False, help="Print debug information, used for development") @click.option( "--config", default=DEFAULT_CONFIG_PATH, help="Path to configuration file, defaults to wily.cfg", ) @click.pass_context def cli(ctx, debug, config): """Commands for creating and searching through history.""" ctx.ensure_object(dict) ctx.obj["DEBUG"] = debug if debug: logger.setLevel("DEBUG") else: logger.setLevel("INFO") ctx.obj["CONFIG"] = load_config(config) logger.debug(f"Loaded configuration from {config}") @cli.command() @click.option( "-h", "--max-revisions", default=None, type=click.INT, help="The maximum number of historical commits to archive", ) @click.option("-p", "--path", type=click.Path(resolve_path=True), help="Root path to the project folder to scan") @click.option( "-t", "--target", default=None, type=click.Path(resolve_path=True), multiple=True, help="Subdirectories or files to scan", ) @click.option("-o", "--operators", type=click.STRING, help="List of operators, seperated by commas") @click.pass_context def build(ctx, max_revisions, path, target, operators): """Build the wily cache""" config = ctx.obj["CONFIG"] from wily.commands.build import build if max_revisions: logger.debug(f"Fixing revisions to {max_revisions}") config.max_revisions = max_revisions if path: logger.debug(f"Fixing path to {path}") config.path = path if target: logger.debug(f"Fixing targets to {target}") config.targets = target if operators: logger.debug(f"Fixing operators to {operators}") config.operators = operators.split(',') build( config=config, archiver=resolve_archiver(config.archiver), operators=resolve_operators(config.operators), ) logger.info( "Completed building wily history, run `wily report` or `wily show` to see more." ) @cli.command() @click.pass_context def index(ctx): """Show the history archive in the .wily/ folder.""" config = ctx.obj["CONFIG"] if not exists(): logger.error(f"Could not locate wily cache. Run `wily build` first.") return -1 from wily.commands.index import index index(config=config) @cli.command() @click.argument("file", type=click.Path(resolve_path=False)) @click.argument("metric") @click.pass_context def report(ctx, file, metric): """Show a specific metric for a given file.""" config = ctx.obj["CONFIG"] if not exists(): logger.error(f"Could not locate wily cache. Run `wily build` first.") return -1 from wily.commands.report import report logger.debug(f"Running report on {file} for metric {metric}") report(config=config, path=file, metric=metric) @cli.command() @click.argument("file", type=click.Path(resolve_path=False)) @click.argument("metric") @click.pass_context def graph(ctx, file, metric): """Graph a specific metric for a given file.""" config = ctx.obj["CONFIG"] if not exists(): logger.error(f"Could not locate wily cache. Run `wily build` first.") return -1 from wily.commands.graph import graph logger.debug(f"Running report on {file} for metric {metric}") graph(config=config, path=file, metric=metric) @cli.command() @click.option("-y", "--yes", default=False, help="Skip prompt") @click.pass_context def clean(ctx, yes): """Clear the .wily/ folder.""" config = ctx.obj["CONFIG"] if not exists(): logger.error(f"Could not locate wily cache.") return 0 if not yes: p = input("Are you sure you want to delete wily cache? [y/N]") if p.lower() != 'y': return 0 from wily.cache import clean clean() @cli.command("list-metrics") @click.pass_context def list_metrics(ctx): """List the available metrics""" config = ctx.obj["CONFIG"] if not exists(): logger.error(f"Could not locate wily cache.") return -1 from wily.commands.list_metrics import list_metrics list_metrics() cli() PKsOM)z z wily/cache.py""" A module for working with the .wily/ cache directory """ import pathlib import json from wily.config import DEFAULT_CACHE_PATH from wily.archivers import ALL_ARCHIVERS from wily import logger def exists(): """ Check whether the .wily/ directory exists :return: Whether the .wily directory exists :rtype: ``boolean`` """ return ( pathlib.Path(DEFAULT_CACHE_PATH).exists() and pathlib.Path(DEFAULT_CACHE_PATH).is_dir() ) def create(): """ Create a wily cache """ if exists(): logger.debug("Wily cache exists, skipping") return logger.debug("Creating wily cache") pathlib.Path(DEFAULT_CACHE_PATH).mkdir() def clean(): """ Delete a wily cache """ if not exists(): logger.debug("Wily cache does not exist, skipping") return logger.debug("Deleting wily cache") # TODO: Empty directory contents pathlib.Path(DEFAULT_CACHE_PATH).rmdir() def store(archiver, revision, stats): root = pathlib.Path(DEFAULT_CACHE_PATH) / archiver.name if not root.exists(): logger.debug("Creating wily cache") root.mkdir() logger.debug(f"Creating {revision.key} output") with open(root / (revision.key + ".json"), "w") as out: out.write(json.dumps(stats, indent=2)) def store_index(archiver, index): root = pathlib.Path(DEFAULT_CACHE_PATH) / archiver.name if not root.exists(): logger.debug("Creating wily cache") root.mkdir() logger.debug(f"Creating index output") with (root / "index.json").open("w") as out: out.write(json.dumps(index, indent=2)) def list_archivers(): """ List archivers with data :return: """ root = pathlib.Path(DEFAULT_CACHE_PATH) result = [] for archiver in ALL_ARCHIVERS: if (root / archiver.name).exists(): result.append(archiver.name) return result def get_history(archiver): """ Get a list of revisions for a given archiver :param archiver: The archiver :type archiver: ``str`` :return: A ``list`` of ``dict`` """ root = pathlib.Path(DEFAULT_CACHE_PATH) / archiver revisions = [] for i in root.iterdir(): if i.name.endswith(".json"): with i.open('r') as rev_f: revision_data = json.load(rev_f) revisions.append(revision_data) return revisions def get_index(archiver): """ Get the contents of the index file """ root = pathlib.Path(DEFAULT_CACHE_PATH) / archiver with (root / "index.json").open('r') as index_f: index = json.load(index_f) return index def get(archiver, revision): """ Get the data for a given revision """ root = pathlib.Path(DEFAULT_CACHE_PATH) / archiver # TODO : string escaping!!! with (root / f"{revision}.json").open('r') as rev_f: index = json.load(rev_f) return index PK$OMQ5NAAwily/config.py""" Configuration of wily """ import configparser import pathlib import logging from dataclasses import dataclass, field from typing import Any, List import wily.operators as operators from wily.archivers import ARCHIVER_GIT logger = logging.getLogger(__name__) @dataclass class WilyConfig: operators: List archiver: Any path: str max_revisions: int targets: List[str] = None checkout_options: dict = field(default_factory=dict) def __post_init__(self): if self.targets is None or '': self.targets = [self.path] DEFAULT_OPERATORS = { operators.OPERATOR_RAW.name, operators.OPERATOR_MAINTAINABILITY.name, operators.OPERATOR_CYCLOMATIC.name, } DEFAULT_ARCHIVER = ARCHIVER_GIT.name DEFAULT_CONFIG_PATH = "wily.cfg" DEFAULT_CONFIG_SECTION = "wily" DEFAULT_CACHE_PATH = ".wily" DEFAULT_MAX_REVISIONS = 100 DEFAULT_CONFIG = WilyConfig( operators=DEFAULT_OPERATORS, archiver=DEFAULT_ARCHIVER, path=".", max_revisions=DEFAULT_MAX_REVISIONS, ) DEFAULT_GRID_STYLE = 'fancy_grid' def load(config_path=DEFAULT_CONFIG_PATH): """ Load config file :return: The configuration ``WilyConfig`` """ if not pathlib.Path(config_path).exists(): logger.debug(f"Could not locate {config_path}, using default config.") return DEFAULT_CONFIG config = configparser.ConfigParser(default_section=DEFAULT_CONFIG_SECTION) config.read(config_path) operators = config.get(option="operators", fallback=DEFAULT_OPERATORS) archiver = config.get(option="archiver", fallback=DEFAULT_ARCHIVER) path = config.get(option="path", fallback=".") max_revisions = config.get(option="max_revisions", fallback=DEFAULT_MAX_REVISIONS) return WilyConfig( operators=operators, archiver=archiver, path=path, max_revisions=max_revisions ) PK$OMy`rrwily/archivers/__init__.pyfrom collections import namedtuple from dataclasses import dataclass class BaseArchiver(object): """Abstract Archiver Class""" def revisions(self, path, max_revisions): """ Get the list of revision :param path: the path :type path: ``str`` :param max_revisions: the maximum number of revisions :type max_revisions: ``int`` :return: A list of revisions :rtype: ``list`` of :class:`Revision` """ raise NotImplementedError() def checkout(self, revision, **options): """ Checkout a specific revision :param revision: The revision identifier :type revision: :class:`Revision` :param options: Any additional options :type options: ``dict`` """ raise NotImplementedError() @dataclass class Revision: key: str author_name: str author_email: str revision_date: str from wily.archivers.git import GitArchiver """Type for an operator""" Archiver = namedtuple("Archiver", "name cls description") """Git Operator defined in `wily.archivers.git`""" ARCHIVER_GIT = Archiver(name="git", cls=GitArchiver, description="Git archiver") """Set of all available archivers""" ALL_ARCHIVERS = {ARCHIVER_GIT} def resolve_archiver(name): """ Get the :namedtuple:`wily.archivers.Archiver` for a given name :param name: The name of the archiver :return: The archiver type """ r = [archiver for archiver in ALL_ARCHIVERS if archiver.name == name.lower()] if not r: raise ValueError(f"Resolver {name} not recognised.") else: return r[0] PK$OM• wily/archivers/git.pyfrom git import Repo import logging from wily.archivers import BaseArchiver, Revision logger = logging.getLogger(__name__) class DirtyGitRepositoryError(Exception): def __init__(self, untracked_files): self.untracked_files = untracked_files self.message = "Dirty repository, make sure you commit/stash files first" class GitArchiver(BaseArchiver): name = "git" def __init__(self, config): self.repo = Repo(config.path) self.config = config self.current_branch = self.repo.active_branch assert not self.repo.bare, "Not a Git repository" def revisions(self, path, max_revisions): if self.repo.is_dirty(): raise DirtyGitRepositoryError(self.repo.untracked_files) # TODO : Determine current branch - how to handle detached head? revisions = [] for commit in self.repo.iter_commits( self.current_branch, max_count=self.config.max_revisions ): rev = Revision( key=commit.name_rev.split(" ")[0], author_name=commit.author.name, author_email=commit.author.email, revision_date=commit.committed_date, ) revisions.append(rev) return revisions def checkout(self, revision, options): rev = revision.key self.repo.git.checkout(rev) def finish(self): # Make sure you checkout HEAD on the original branch when finishing self.repo.git.checkout(self.current_branch) PK$OMwily/commands/__init__.pyPKsOM5"2^i i wily/commands/build.py""" Builds a cache based on a source-control history """ from progress.bar import Bar from wily import logger import wily.cache as cache def build(config, archiver, operators): """ Build the history given a archiver and collection of operators. :param config: The wily configuration :type config: :namedtuple:`wily.config.WilyConfig` :param archiver: The archiver to use :type archiver: :namedtuple:`wily.archivers.Archiver` :param operators: The list of operators to execute :type operators: `list` of :namedtuple:`wily.operators.Operator` """ # Check for existence of cache, else provision if not cache.exists(): logger.debug("Wily cache not found, creating.") cache.create() logger.debug("Created wily cache") logger.debug(f"Using {archiver.name} archiver module") archiver = archiver.cls(config) try: revisions = archiver.revisions(config.path, config.max_revisions) except Exception as e: logger.error(f"Failed to setup archiver: '{e.message}'") return logger.info( f"Found {len(revisions)} revisions from '{archiver.name}' archiver in {config.path}." ) if revisions is None or len(revisions) == 0: logger.warning("Could not find any revisions, using HEAD") revisions = [] # TODO: Create a special HEAD revision to use current state _op_desc = ",".join([operator.name for operator in operators]) logger.info(f"Running operators - {_op_desc}") index = [] bar = Bar('Processing', max=len(revisions)*len(operators)) try: for revision in revisions: # Checkout target revision archiver.checkout(revision, config.checkout_options) # Build a set of operators _operators = [operator.cls(config) for operator in operators] stats_header = { "revision": revision.key, "author_name": revision.author_name, "author_email": revision.author_email, "date": revision.revision_date, "operators": _op_desc } stats = stats_header.copy() stats["operator_data"] = {} for operator in _operators: logger.debug(f"Running {operator.name} operator on {revision.key}") stats["operator_data"][operator.name] = operator.run(revision, config) bar.next() index.append(stats_header) cache.store(archiver, revision, stats) cache.store_index(archiver, index) bar.finish() except Exception as e: if hasattr(e, "message"): logger.error(f"Failed to build cache: '{e.message}'") else: logger.error(f"Failed to build cache: '{e}'") finally: # Reset the archive after every run back to the head of the branch archiver.finish() PKsOMM$wily/commands/graph.pyfrom wily import logger, format_date import tabulate import pathlib from wily.config import DEFAULT_CACHE_PATH, DEFAULT_GRID_STYLE import wily.cache as cache from wily.operators import resolve_metric, MetricType import plotly.plotly as py import plotly.graph_objs as go def graph(config, path, metric): """ Graph information about the cache and runtime :param config: The configuration :type config: :class:`wily.config.WilyConfig` :param path: The path to the file :type path: ``str`` :param metric: The metric to report on :type metric: The metric :return: """ logger.debug("Running report command") i = 0 x = [] y = [] operator, key = metric.split('.') metric = resolve_metric(metric) archivers = cache.list_archivers() for archiver in archivers: # We have to do it backwards to get the deltas between releases history = cache.get_index(archiver) for rev in history: revision_entry = cache.get(archiver, rev['revision']) try: val = revision_entry["operator_data"][operator][path][key] y.append(val) except KeyError: y.append(0) finally: x.append(i) i+=1 # Create traces trace0 = go.Scatter( x = x, y = y, mode = 'lines+markers', name = metric[1] ) data = [trace0] py.iplot(data, filename='line-mode') PKsOMB>kkwily/commands/index.pyfrom wily import logger, format_date import tabulate import wily.cache as cache from wily.config import DEFAULT_GRID_STYLE def index(config): """ Show information about the cache and runtime :param config: The configuration :type config: :class:`wily.config.WilyConfig` :return: """ logger.debug("Running show command") logger.info("--------Configuration---------") logger.info(f"Path: {config.path}") logger.info(f"Archiver: {config.archiver}") logger.info(f"Operators: {config.operators}") logger.info("") logger.info("-----------History------------") data = [] archivers = cache.list_archivers() for archiver in archivers: history = cache.get_index(archiver) for rev in history: data.append( ( rev["revision"], rev["author_name"], format_date(rev["date"]), ) ) print( tabulate.tabulate( headers=("Revision", "Author", "Date"), tabular_data=data, tablefmt=DEFAULT_GRID_STYLE ) ) PKsOM%y7''wily/commands/list_metrics.pyfrom wily.operators import ALL_OPERATORS from wily.config import DEFAULT_GRID_STYLE import tabulate def list_metrics(): for operator in ALL_OPERATORS: print(f"{operator.name} operator:") if len(operator.cls.metrics) > 0 : print( tabulate.tabulate( headers=("Name", "Description", "Type"), tabular_data=operator.cls.metrics, tablefmt=DEFAULT_GRID_STYLE ) ) else: print("No metrics available") PKsOMK  wily/commands/report.pyfrom wily import logger, format_date import tabulate import pathlib from wily.config import DEFAULT_CACHE_PATH, DEFAULT_GRID_STYLE import wily.cache as cache from wily.operators import resolve_metric, MetricType def report(config, path, metric): """ Show information about the cache and runtime :param config: The configuration :type config: :class:`wily.config.WilyConfig` :param path: The path to the file :type path: ``str`` :param metric: The metric to report on :type metric: The metric :return: """ logger.debug("Running report command") logger.info(f"-----------History for {metric}------------") data = [] last = None operator, key = metric.split('.') metric = resolve_metric(metric) archivers = cache.list_archivers() # Set the delta colors depending on the metric type if metric[3] == MetricType.AimHigh: good_color = 32 bad_color = 31 elif metric[3] == MetricType.AimLow: good_color = 31 bad_color = 32 elif metric[3] == MetricType.Informational: good_color = 33 bad_color = 33 for archiver in archivers: # We have to do it backwards to get the deltas between releases history = cache.get_index(archiver)[::-1] for rev in history: revision_entry = cache.get(archiver, rev['revision']) try: val = revision_entry["operator_data"][operator][path][key] # Measure the difference between this value and the last if last: delta=val-last else: delta=0 last=val # TODO : Format floating values nicely if delta == 0: delta_col = delta elif delta < 0 : delta_col = f"\u001b[{good_color}m{delta}\u001b[0m" else: delta_col = f"\u001b[{bad_color}m+{delta}\u001b[0m" data.append( ( rev["revision"], rev["author_name"], format_date(rev["date"]), f"{val} ({delta_col})", ) ) except KeyError: data.append( ( rev["revision"], rev["author_name"], format_date(rev["date"]), "Not found", ) ) print( # But it still makes more sense to show the newest at the top, so reverse again tabulate.tabulate( headers=("Revision", "Author", "Date", metric[1]), tabular_data=data[::-1], tablefmt=DEFAULT_GRID_STYLE ) ) PKsOM%Y Y wily/operators/__init__.pyfrom collections import namedtuple from enum import Enum class MetricType(Enum): """Type of metric, used in trends""" AimLow = 1 # Low is good, high is bad AimHigh = 2 # High is good, low is bad Informational = 3 # Doesn't matter class BaseOperator(object): """Abstract Operator Class""" """Name of the operator""" name = "abstract" """Default settings""" defaults = {} """Available metrics as a list of tuple ("name", "description", "type", "metric_type")""" metrics = () def run(self, module, options): raise NotImplementedError() from wily.operators.mccabe import MccabeOperator from wily.operators.cyclomatic import CyclomaticComplexityOperator from wily.operators.maintainability import MaintainabilityIndexOperator from wily.operators.raw import RawMetricsOperator """Type for an operator""" Operator = namedtuple("Operator", "name cls description") OPERATOR_MCCABE = Operator( name="mccabe", cls=MccabeOperator, description="Number of branches via the Mccabe algorithm", ) OPERATOR_CYCLOMATIC = Operator( name="cyclomatic", cls=CyclomaticComplexityOperator, description="Cyclomatic Complexity of modules", ) OPERATOR_RAW = Operator( name="raw", cls=RawMetricsOperator, description="Raw Python statistics" ) OPERATOR_MAINTAINABILITY = Operator( name="maintainability", cls=MaintainabilityIndexOperator, description="Maintainability index (lines of code and branching)", ) """Set of all available operators""" ALL_OPERATORS = { OPERATOR_MCCABE, OPERATOR_CYCLOMATIC, OPERATOR_MAINTAINABILITY, OPERATOR_RAW, } def resolve_operator(name): """ Get the :namedtuple:`wily.operators.Operator` for a given name :param name: The name of the operator :return: The operator type """ r = [operator for operator in ALL_OPERATORS if operator.name == name.lower()] if not r: raise ValueError(f"Operator {name} not recognised.") else: return r[0] def resolve_operators(operators): return [resolve_operator(operator) for operator in operators] def resolve_metric(metric): """ Resolve metric key to a given target """ operator, key = metric.split('.') # TODO: Handle this better! return [metric for metric in resolve_operator(operator).cls.metrics if metric[0] == key][0] PKsOMh5wily/operators/cyclomatic.pyimport radon.cli.harvest as harvesters from radon.cli import Config import radon from wily import logger from wily.operators import BaseOperator class CyclomaticComplexityOperator(BaseOperator): name = "cyclomatic" defaults = { "exclude": None, "ignore": None, "min": "A", "max": "F", "no_assert": True, "show_closures": False, "order": radon.complexity.SCORE, } # TODO : Figure out how to deal with the list metrics for functions? metrics = () def __init__(self, config): # TODO: Import config for harvester from .wily.cfg logger.debug(f"Using {config.targets} with {self.defaults} for CC metrics") self.harvester = harvesters.CCHarvester( config.targets, config=Config(**self.defaults) ) def run(self, module, options): logger.debug("Running CC harvester") return dict(self.harvester.results) PKsOMVf!wily/operators/maintainability.pyimport radon.cli.harvest as harvesters from radon.cli import Config from wily import logger from wily.operators import BaseOperator, MetricType class MaintainabilityIndexOperator(BaseOperator): name = "maintainability" defaults = { "exclude": None, "ignore": None, "min": "A", "max": "C", "multi": True, "show": False, "sort": False, } metrics = ( ("rank", "Maintainability Ranking", str, MetricType.Informational), ("mi", "Maintainability Index", float, MetricType.AimLow) ) def __init__(self, config): # TODO : Import config from wily.cfg logger.debug(f"Using {config.targets} with {self.defaults} for MI metrics") self.harvester = harvesters.MIHarvester( config.targets, config=Config(**self.defaults) ) def run(self, module, options): logger.debug("Running raw harvester") return dict(self.harvester.results) PK$OM:I5awily/operators/mccabe.pyfrom wily.operators import BaseOperator class MccabeOperator(BaseOperator): name = "mccabe" def __init__(self, config): pass PKsOM~wwily/operators/raw.pyimport radon.cli.harvest as harvesters from radon.cli import Config from wily import logger from wily.operators import BaseOperator, MetricType class RawMetricsOperator(BaseOperator): name = "raw" defaults = {"exclude": None, "ignore": None, "summary": False} metrics = ( ("loc", "Lines of Code", int, MetricType.Informational), ("lloc", "L Lines of Code", int, MetricType.Informational), ("sloc", "S Lines of Code", int, MetricType.Informational), ("comments", "Multi-line comments", int, MetricType.Informational), ("multi", "Multi lines", int, MetricType.Informational), ("blank", "blank lines", int, MetricType.Informational), ("single_comments", "Single comment lines", int, MetricType.Informational) ) def __init__(self, config): # TODO: Use config from wily.cfg for harvester logger.debug(f"Using {config.targets} with {self.defaults} for Raw metrics") self.harvester = harvesters.RawHarvester( config.targets, config=Config(**self.defaults) ) def run(self, module, options): logger.debug("Running raw harvester") return dict(self.harvester.results) PK!H=d)*%wily-0.4.2.dist-info/entry_points.txtN+I/N.,()*̩z񹉙yV9\\PKtOM]{],],wily-0.4.2.dist-info/LICENSE Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. PK!H>*RQwily-0.4.2.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,rzd&Y)r$[)T&UrPK!HÚ H@wily-0.4.2.dist-info/METADATA[nO1 8Y4$j}/5F'}MZKikdɥWEHQ }40 } VВ%Ե'ٔr2FE&p tȳt$KPyB_?{yW^B\Lm]أS’!*J%I8zV+hS3—G>2,X.=RNS޻8$!re(!ebFqZ+)yH|?E[RЦbǬC9RՊD!xV%YdrN*!|mHqrPL?Ս>= B& AOFtF&owC g',,Lȍ 8,*p6c(`9R]0(JDZbnUhm^ਥ&fbw lKB=lW Vc_U P0bX+- '=dVT(Q Ej~U2R :&1YV5  F4bHh:-=DGg&T  #P18NFP#eQ$Sכ$@NqUHhZ38x1K0jJHӐCDyV(n)+aB`sJKPtNᠢ` d (Ry2dx^"hu H82:.)0ɦ|xR: CPe[Ssp'PdD4&U¥5Rڼ9Ac :Jz5Y}/FCN1՜J򲀾aëE# EF$)e7[E,zMdkɦ`0EJqqOTH;CP$Bm.wš4W ٠A6FB*.-5"*cG[Kh@ Z giWK(@or_Vi5hhT 05lP_=ňQZf//Y8K"E,p!FhME4nTe{&/yyu*&)bB$UokI:kuxjְ@GF \* K1=6ZD^λ^*E(xtbC󙐂1?I8-J@KоFh 9 q.zO?48Pv%,J#xP{\/Fx]^Ti*9gz+`%؊-J߻=ơmh'&f#ʹ).Vdm9V%2n$INq*A;D1{B%;YTECd2Űf{HGʸ7c9@y4-+5U;ٝԞr@lupm6M "V!1Yܽ! \"\^A@63R*Ҿ)ipׄ{qD??/5gn#U޽ۻ7 K]/XZ1/"RHK"E=4ho0=:Ԣ}#+B1, ֱVXاg=zwY?HfdNȷbd{q8c ~Lϵ`M=Ԉ 0 ӎeԷgo5)ox퇶Sӌ|ѧ~Z Hl쐲ØvD熁FGdX;0m2j!tM#^߱kGvHY7M8%nȍ 4|}byq6׳]#ex?rjyD8c |;$D}/crIFlcx\g;Q#9{{h\YWߴ˻Rjmq}wB'?Kistl_^a\|2Z\_7 Omմrxg:jx|m5LIɮt2hNƊD<|Iw'?ɠ:&YKV$E*~!=>K䩤@Y?]ܘGO ] d,݄߭-7{÷3|#*L>kU ߩr_ \ IWUe;|WѕNmjG[wVw}v<1Y]vdP )}t\/B<|o{t h:fvv_+nFC$lV]dC+FF+I`nh*wDJ54y|}zvOO._>'m=JhXV5ꡚ\&@@HX]ݜxQOMpu%V+=GS%S-֎?6x4rU3|t9M) h%1ߵ *g_L0FyqO> mp2Ko\#iֹu!^4Ċw2+ J܇g'eyRf.v: r-E@ 8Ji6؁$% @ߒ6YĨ\=hn. @o\ubmPkgUXC* H4ikMyq]UZ V׳Tcj[H40 y6Np^{K`-Yr0Y3j;<,I] →idhzQEv?vw->mp(XPM-%__:ak9DrcIfymZ}3Z@Ox,>G Ԙϙ}QO\hq첃]x*z\;Et ϼEsE1!s9v+* #e+ tt*d;R\Ul.C>$߳^ ~PKPMOdwily/__init__.pyPK$OMi:MMwily/__main__.pyPKsOM)z z wily/cache.pyPK$OMQ5NAA'wily/config.pyPK$OMy`rr&wily/archivers/__init__.pyPK$OM• >-wily/archivers/git.pyPK$OMq3wily/commands/__init__.pyPKsOM5"2^i i 3wily/commands/build.pyPKsOMM$E?wily/commands/graph.pyPKsOMB>kkMEwily/commands/index.pyPKsOM%y7''Iwily/commands/list_metrics.pyPKsOMK  NLwily/commands/report.pyPKsOM%Y Y Wwily/operators/__init__.pyPKsOMh50awily/operators/cyclomatic.pyPKsOMVf!ewily/operators/maintainability.pyPK$OM:I5a-iwily/operators/mccabe.pyPKsOM~wiwily/operators/raw.pyPK!H=d)*%nwily-0.4.2.dist-info/entry_points.txtPKtOM]{],],Gowily-0.4.2.dist-info/LICENSEPK!H>*RQޛwily-0.4.2.dist-info/WHEELPK!HÚ H@hwily-0.4.2.dist-info/METADATAPK!HVN=wily-0.4.2.dist-info/RECORDPK{