Browse Source

Update name

pull/8/head
Florian Mounier 13 years ago
parent
commit
6398f26baf
  1. 4
      docs/conf.py
  2. 17
      setup.py
  3. 2
      svg/charts/__init__.py
  4. 2
      svg/charts/bar.py
  5. 2
      svg/charts/graph.css
  6. 18
      svg/charts/graph.py
  7. 2
      svg/charts/line.py
  8. 4
      svg/charts/pie.py
  9. 2
      svg/charts/plot.py
  10. 2
      svg/charts/schedule.py
  11. 6
      svg/charts/time_series.py
  12. 12
      tests/samples.py
  13. 2
      tests/test_plot.py
  14. 2
      tests/test_time_series.py

4
docs/conf.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- 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. # sphinx-quickstart on Tue May 11 10:51:55 2010.
# #
# This file is execfile()d with the current directory set to its containing dir # 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 # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]) # (source start file, target name, title, author, documentclass [howto/manual])
latex_documents = [ latex_documents = [
('index', 'svgcharts.tex', u'svg.charts Documentation', ('index', 'svgcharts.tex', u'pygal Documentation',
setup_params['author'], 'manual'), setup_params['author'], 'manual'),
] ]

17
setup.py

@ -12,7 +12,7 @@ class DisabledTestCommand(Command):
def __init__(self, dist): def __init__(self, dist):
raise RuntimeError( raise RuntimeError(
"test command not supported on svg.charts." "test command not supported on pygal."
" Use setup.py nosetests instead") " Use setup.py nosetests instead")
_this_dir = os.path.dirname(__file__) _this_dir = os.path.dirname(__file__)
@ -25,16 +25,16 @@ dateutil_req = (
else ['python-dateutil>=2.0']) else ['python-dateutil>=2.0'])
setup_params = dict( setup_params = dict(
name="svg.charts", name="pygal",
use_hg_version=True, use_hg_version=True,
description="Python SVG Charting Library", description="Python svg graph abstract layer",
long_description=_long_description, long_description=_long_description,
author="Jason R. Coombs", author="Jason R. Coombs, Kozea",
author_email="jaraco@jaraco.com", author_email="jaraco@jaraco.com, gayoub@kozea.fr",
url="http://svg-charts.sourceforge.net", url="https://github.com/Kozea/pygal",
packages=find_packages(), packages=find_packages(),
zip_safe=True, zip_safe=True,
namespace_packages=['svg'], namespace_packages=['pygal'],
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
'cssutils>=0.9.8a3', 'cssutils>=0.9.8a3',
@ -57,9 +57,6 @@ setup_params = dict(
cmdclass=dict( cmdclass=dict(
test=DisabledTestCommand, test=DisabledTestCommand,
), ),
setup_requires=[
'hgtools',
],
use_2to3=True, use_2to3=True,
) )

2
svg/charts/__init__.py

@ -2,7 +2,7 @@
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
""" """
svg.charts package. pygal package.
""" """
__all__ = ('graph', 'plot', 'time_series', 'bar', 'pie', 'schedule', 'util') __all__ = ('graph', 'plot', 'time_series', 'bar', 'pie', 'schedule', 'util')

2
svg/charts/bar.py

@ -1,7 +1,7 @@
#!python #!python
from itertools import chain from itertools import chain
from lxml import etree from lxml import etree
from svg.charts.graph import Graph from pygal.graph import Graph
__all__ = ('VerticalBar', 'HorizontalBar') __all__ = ('VerticalBar', 'HorizontalBar')

2
svg/charts/graph.css

@ -1,7 +1,7 @@
/* /*
$Id$ $Id$
Base styles for svg.charts.Graph Base styles for pygal.Graph
*/ */
.svgBackground{ .svgBackground{

18
svg/charts/graph.py

@ -2,9 +2,9 @@
# -*- coding: utf-8 -*- # -*- 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 from operator import itemgetter
@ -16,7 +16,7 @@ import cssutils
from lxml import etree from lxml import etree
from xml import xpath 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: try:
import zlib import zlib
@ -44,11 +44,11 @@ class Graph(object):
For examples of how to subclass this class, see the existing specific For examples of how to subclass this class, see the existing specific
subclasses, such as svn.charts.Pie. subclasses, such as svn.charts.Pie.
* svg.charts.bar * pygal.bar
* svg.charts.line * pygal.line
* svg.charts.pie * pygal.pie
* svg.charts.plot * pygal.plot
* svg.charts.time_series * pygal.time_series
""" """
width = 500 width = 500
@ -698,7 +698,7 @@ class Graph(object):
@staticmethod @staticmethod
def load_resource_stylesheet(name, subs=dict()): 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_stream.read().decode('utf-8')
css_string = css_string % subs css_string = css_string % subs
sheet = cssutils.parseString(css_string) sheet = cssutils.parseString(css_string)

2
svg/charts/line.py

@ -6,7 +6,7 @@ from operator import itemgetter, add
from lxml import etree from lxml import etree
from util import flatten, float_range from util import flatten, float_range
from svg.charts.graph import Graph from pygal.graph import Graph
class Line(Graph): class Line(Graph):

4
svg/charts/pie.py

@ -1,7 +1,7 @@
import math import math
import itertools import itertools
from lxml import etree from lxml import etree
from svg.charts.graph import Graph from pygal.graph import Graph
def robust_add(a, b): def robust_add(a, b):
@ -22,7 +22,7 @@ class Pie(Graph):
Synopsis Synopsis
======== ========
from svg.charts.pie import Pie from pygal.pie import Pie
fields = ['Jan', 'Feb', 'Mar'] fields = ['Jan', 'Feb', 'Mar']
data_sales_02 = [12, 45, 21] data_sales_02 = [12, 45, 21]

2
svg/charts/plot.py

@ -6,7 +6,7 @@ import sys
from itertools import izip, count, chain from itertools import izip, count, chain
from lxml import etree from lxml import etree
from svg.charts.graph import Graph from pygal.graph import Graph
from .util import float_range from .util import float_range

2
svg/charts/schedule.py

@ -5,7 +5,7 @@ from dateutil.parser import parse
from dateutil.relativedelta import relativedelta from dateutil.relativedelta import relativedelta
from lxml import etree 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 from util import grouper, date_range, divide_timedelta_float, TimeScale
__all__ = ('Schedule') __all__ = ('Schedule')

6
svg/charts/time_series.py

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
import svg.charts.plot import pygal.plot
import re import re
import pkg_resources import pkg_resources
pkg_resources.require("python-dateutil>=1.1") pkg_resources.require("python-dateutil>=1.1")
@ -11,7 +11,7 @@ fromtimestamp = datetime.datetime.fromtimestamp
from .util import float_range from .util import float_range
class Plot(svg.charts.plot.Plot): class Plot(pygal.plot.Plot):
"""=== For creating SVG plots of scalar temporal data """=== For creating SVG plots of scalar temporal data
= Synopsis = Synopsis
@ -149,7 +149,7 @@ class Plot(svg.charts.plot.Plot):
# the date should be in the first element, so parse it out # the date should be in the first element, so parse it out
data['data'][0] = map(self.parse_date, data['data'][0]) 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): def get_min_x_value(self):
return self._min_x_value return self._min_x_value

12
tests/samples.py

@ -5,12 +5,12 @@ samples.
import os import os
import sys import sys
from svg.charts.plot import Plot from pygal.plot import Plot
from svg.charts import bar from pygal import bar
from svg.charts import time_series from pygal import time_series
from svg.charts import pie from pygal import pie
from svg.charts import schedule from pygal import schedule
from svg.charts import line from pygal import line
def sample_Plot(): def sample_Plot():

2
tests/test_plot.py

@ -11,7 +11,7 @@ class PlotTester(unittest.TestCase):
Credit to Jean for the test code as well. 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 = Plot(dict(scale_y_integers=True))
g.add_data(dict(data=[1, 0, 2, 1], title='foo')) g.add_data(dict(data=[1, 0, 2, 1], title='foo'))
res = g.burn() res = g.burn()

2
tests/test_time_series.py

@ -1,4 +1,4 @@
from svg.charts import time_series from pygal import time_series
def test_field_width(): def test_field_width():

Loading…
Cancel
Save