From 6398f26baf9d3eda61efd15702f1d19dc1d232e7 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Fri, 23 Sep 2011 14:51:09 +0200 Subject: [PATCH] Update name --- docs/conf.py | 4 ++-- setup.py | 17 +++++++---------- svg/charts/__init__.py | 2 +- svg/charts/bar.py | 2 +- svg/charts/graph.css | 2 +- svg/charts/graph.py | 18 +++++++++--------- svg/charts/line.py | 2 +- svg/charts/pie.py | 4 ++-- svg/charts/plot.py | 2 +- svg/charts/schedule.py | 2 +- svg/charts/time_series.py | 6 +++--- tests/samples.py | 12 ++++++------ tests/test_plot.py | 2 +- tests/test_time_series.py | 2 +- 14 files changed, 37 insertions(+), 40 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 65cff02..610c45a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# svg.charts documentation build configuration file, created by +# pygal documentation build configuration file, created by # sphinx-quickstart on Tue May 11 10:51:55 2010. # # This file is execfile()d with the current directory set to its containing dir @@ -180,7 +180,7 @@ htmlhelp_basename = 'svgchartsdoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]) latex_documents = [ - ('index', 'svgcharts.tex', u'svg.charts Documentation', + ('index', 'svgcharts.tex', u'pygal Documentation', setup_params['author'], 'manual'), ] diff --git a/setup.py b/setup.py index d81b5df..ae1a224 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ class DisabledTestCommand(Command): def __init__(self, dist): raise RuntimeError( - "test command not supported on svg.charts." + "test command not supported on pygal." " Use setup.py nosetests instead") _this_dir = os.path.dirname(__file__) @@ -25,16 +25,16 @@ dateutil_req = ( else ['python-dateutil>=2.0']) setup_params = dict( - name="svg.charts", + name="pygal", use_hg_version=True, - description="Python SVG Charting Library", + description="Python svg graph abstract layer", long_description=_long_description, - author="Jason R. Coombs", - author_email="jaraco@jaraco.com", - url="http://svg-charts.sourceforge.net", + author="Jason R. Coombs, Kozea", + author_email="jaraco@jaraco.com, gayoub@kozea.fr", + url="https://github.com/Kozea/pygal", packages=find_packages(), zip_safe=True, - namespace_packages=['svg'], + namespace_packages=['pygal'], include_package_data=True, install_requires=[ 'cssutils>=0.9.8a3', @@ -57,9 +57,6 @@ setup_params = dict( cmdclass=dict( test=DisabledTestCommand, ), - setup_requires=[ - 'hgtools', - ], use_2to3=True, ) diff --git a/svg/charts/__init__.py b/svg/charts/__init__.py index 35c89cd..ed10788 100644 --- a/svg/charts/__init__.py +++ b/svg/charts/__init__.py @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- """ -svg.charts package. +pygal package. """ __all__ = ('graph', 'plot', 'time_series', 'bar', 'pie', 'schedule', 'util') diff --git a/svg/charts/bar.py b/svg/charts/bar.py index f272acc..8ea1d2a 100644 --- a/svg/charts/bar.py +++ b/svg/charts/bar.py @@ -1,7 +1,7 @@ #!python from itertools import chain from lxml import etree -from svg.charts.graph import Graph +from pygal.graph import Graph __all__ = ('VerticalBar', 'HorizontalBar') diff --git a/svg/charts/graph.css b/svg/charts/graph.css index 18897bc..1771ade 100644 --- a/svg/charts/graph.css +++ b/svg/charts/graph.css @@ -1,7 +1,7 @@ /* $Id$ -Base styles for svg.charts.Graph +Base styles for pygal.Graph */ .svgBackground{ diff --git a/svg/charts/graph.py b/svg/charts/graph.py index ea200ec..69b5364 100644 --- a/svg/charts/graph.py +++ b/svg/charts/graph.py @@ -2,9 +2,9 @@ # -*- coding: utf-8 -*- """ -svg.charts.graph +pygal.graph -The base module for `svg.charts` classes. +The base module for `pygal` classes. """ from operator import itemgetter @@ -16,7 +16,7 @@ import cssutils from lxml import etree from xml import xpath -from svg.charts import css # causes the SVG profile to be loaded +from pygal import css # causes the SVG profile to be loaded try: import zlib @@ -44,11 +44,11 @@ class Graph(object): For examples of how to subclass this class, see the existing specific subclasses, such as svn.charts.Pie. - * svg.charts.bar - * svg.charts.line - * svg.charts.pie - * svg.charts.plot - * svg.charts.time_series + * pygal.bar + * pygal.line + * pygal.pie + * pygal.plot + * pygal.time_series """ width = 500 @@ -698,7 +698,7 @@ class Graph(object): @staticmethod def load_resource_stylesheet(name, subs=dict()): - css_stream = pkg_resources.resource_stream('svg.charts', name) + css_stream = pkg_resources.resource_stream('pygal', name) css_string = css_stream.read().decode('utf-8') css_string = css_string % subs sheet = cssutils.parseString(css_string) diff --git a/svg/charts/line.py b/svg/charts/line.py index 880b89b..9b6da6d 100644 --- a/svg/charts/line.py +++ b/svg/charts/line.py @@ -6,7 +6,7 @@ from operator import itemgetter, add from lxml import etree from util import flatten, float_range -from svg.charts.graph import Graph +from pygal.graph import Graph class Line(Graph): diff --git a/svg/charts/pie.py b/svg/charts/pie.py index 77fc4e6..462e03d 100644 --- a/svg/charts/pie.py +++ b/svg/charts/pie.py @@ -1,7 +1,7 @@ import math import itertools from lxml import etree -from svg.charts.graph import Graph +from pygal.graph import Graph def robust_add(a, b): @@ -22,7 +22,7 @@ class Pie(Graph): Synopsis ======== - from svg.charts.pie import Pie + from pygal.pie import Pie fields = ['Jan', 'Feb', 'Mar'] data_sales_02 = [12, 45, 21] diff --git a/svg/charts/plot.py b/svg/charts/plot.py index 7987a16..f9c542e 100644 --- a/svg/charts/plot.py +++ b/svg/charts/plot.py @@ -6,7 +6,7 @@ import sys from itertools import izip, count, chain from lxml import etree -from svg.charts.graph import Graph +from pygal.graph import Graph from .util import float_range diff --git a/svg/charts/schedule.py b/svg/charts/schedule.py index 52565f8..08ca671 100644 --- a/svg/charts/schedule.py +++ b/svg/charts/schedule.py @@ -5,7 +5,7 @@ from dateutil.parser import parse from dateutil.relativedelta import relativedelta from lxml import etree -from svg.charts.graph import Graph +from pygal.graph import Graph from util import grouper, date_range, divide_timedelta_float, TimeScale __all__ = ('Schedule') diff --git a/svg/charts/time_series.py b/svg/charts/time_series.py index 59feb23..4a7c9cf 100644 --- a/svg/charts/time_series.py +++ b/svg/charts/time_series.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import svg.charts.plot +import pygal.plot import re import pkg_resources pkg_resources.require("python-dateutil>=1.1") @@ -11,7 +11,7 @@ fromtimestamp = datetime.datetime.fromtimestamp from .util import float_range -class Plot(svg.charts.plot.Plot): +class Plot(pygal.plot.Plot): """=== For creating SVG plots of scalar temporal data = Synopsis @@ -149,7 +149,7 @@ class Plot(svg.charts.plot.Plot): # the date should be in the first element, so parse it out data['data'][0] = map(self.parse_date, data['data'][0]) - _min_x_value = svg.charts.plot.Plot.min_x_value + _min_x_value = pygal.plot.Plot.min_x_value def get_min_x_value(self): return self._min_x_value diff --git a/tests/samples.py b/tests/samples.py index 49219d4..528954f 100644 --- a/tests/samples.py +++ b/tests/samples.py @@ -5,12 +5,12 @@ samples. import os import sys -from svg.charts.plot import Plot -from svg.charts import bar -from svg.charts import time_series -from svg.charts import pie -from svg.charts import schedule -from svg.charts import line +from pygal.plot import Plot +from pygal import bar +from pygal import time_series +from pygal import pie +from pygal import schedule +from pygal import line def sample_Plot(): diff --git a/tests/test_plot.py b/tests/test_plot.py index d69c44a..30aca61 100644 --- a/tests/test_plot.py +++ b/tests/test_plot.py @@ -11,7 +11,7 @@ class PlotTester(unittest.TestCase): Credit to Jean for the test code as well. """ - from svg.charts.plot import Plot + from pygal.plot import Plot g = Plot(dict(scale_y_integers=True)) g.add_data(dict(data=[1, 0, 2, 1], title='foo')) res = g.burn() diff --git a/tests/test_time_series.py b/tests/test_time_series.py index e06eea0..238427e 100644 --- a/tests/test_time_series.py +++ b/tests/test_time_series.py @@ -1,4 +1,4 @@ -from svg.charts import time_series +from pygal import time_series def test_field_width():