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 -*-
#
# 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'),
]

17
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,
)

2
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')

2
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')

2
svg/charts/graph.css

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

18
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)

2
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):

4
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]

2
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

2
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')

6
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

12
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():

2
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()

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():

Loading…
Cancel
Save