Skip to content

Commit

Permalink
Rename pyagg -> celiagg (celiagg#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiggins authored Nov 9, 2016
1 parent 5b4d7e6 commit 493faeb
Show file tree
Hide file tree
Showing 48 changed files with 71 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
build
dist

# pyagg specific
pyagg/_pyagg.cpp
# celiagg specific
celiagg/_celiagg.cpp
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ install:
source activate test_env;
pip install -e . ${BUILD_ARGS};
script:
nosetests -v pyagg;
nosetests -v celiagg;
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include pyagg/*.hxx
include celiagg/*.hxx
graft agg-svn/agg-2.4/include
graft agg-svn/agg-2.4/font_freetype
graft agg-svn/agg-2.4/font_win32_tt
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
pyagg
=====
celiagg
=======

pyagg provides a simple, stateless canvas object that uses [Anti-Grain Geometry 2.4] (svn://svn.code.sf.net/p/agg/svn)
with Cython to render directly into a Numpy array.
celiagg provides a simple, stateless canvas object that uses
[Anti-Grain Geometry 2.4] (svn://svn.code.sf.net/p/agg/svn) with Cython to
render directly into a Numpy array.

A respectably modern compiler is required to build pyagg (one supporting certain C++11
A respectably modern compiler is required to build celiagg (one supporting certain C++11
features).

# Installation
Expand All @@ -16,3 +17,13 @@ features).
* Numpy
* Cython
* Freetype2 (optional)

## Contributing
We encourage contributions to celiagg! If you would like to contribute, just
fork the repository on GitHub, make your changes, and issue a pull request.

## History
celiagg started as pyagg (https://github.com/erikhvatum/pyagg) but was renamed
to avoid clashing with PyAgg (https://github.com/karimbahgat/PyAgg).

celiagg is a play on Celiac (Anti grain...) and AGG (Anti-Grain Geometry).
6 changes: 3 additions & 3 deletions pyagg/__init__.py → celiagg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
# flake8: noqa
from __future__ import absolute_import

from ._pyagg import HAS_TEXT
from ._pyagg import (
from ._celiagg import HAS_TEXT
from ._celiagg import (
AggError, BlendMode, BSpline, DrawingMode, Font, FontCacheType,
GradientSpread, GradientUnits, GraphicsState, Image, InnerJoin,
LinearGradientPaint, LineCap, LineJoin, RadialGradientPaint, Path,
PatternPaint, PatternStyle, PixelFormat, Rect, ShapeAtPoints, SolidPaint,
TextDrawingMode, Transform
)
from ._pyagg import (CanvasG8, CanvasGA16, CanvasRGB24, CanvasRGBA32,
from ._celiagg import (CanvasG8, CanvasGA16, CanvasRGB24, CanvasRGBA32,
CanvasBGRA32, CanvasRGBA128)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pyagg/font.h → celiagg/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_FONT_H
#define PYAGG_FONT_H
#ifndef CELIAGG_FONT_H
#define CELIAGG_FONT_H

#include <agg_basics.h>
#include <agg_font_cache_manager.h>
Expand Down Expand Up @@ -88,4 +88,4 @@ class Font
#endif
};

#endif // PYAGG_FONT_H
#endif // CELIAGG_FONT_H
2 changes: 1 addition & 1 deletion pyagg/font.pxi → celiagg/font.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ IF _ENABLE_TEXT_RENDERING:
ELSE:
cdef class Font:
def __init__(self, *args):
msg = ("The pyagg library was compiled without font support! "
msg = ("The celiagg library was compiled without font support! "
"If you would like to render text, you will need to "
"reinstall the library.")
raise RuntimeError(msg)
File renamed without changes.
6 changes: 3 additions & 3 deletions pyagg/glyph_iter.h → celiagg/glyph_iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_GLYPH_ITER_H
#define PYAGG_GLYPH_ITER_H
#ifndef CELIAGG_GLYPH_ITER_H
#define CELIAGG_GLYPH_ITER_H

#include "font.h"

Expand Down Expand Up @@ -61,4 +61,4 @@ class GlyphIterator
bool m_is_drawing;
};

#endif // PYAGG_GLYPH_ITER_H
#endif // CELIAGG_GLYPH_ITER_H
6 changes: 3 additions & 3 deletions pyagg/graphics_state.h → celiagg/graphics_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_GRAPHICS_STATE_H
#define PYAGG_GRAPHICS_STATE_H
#ifndef CELIAGG_GRAPHICS_STATE_H
#define CELIAGG_GRAPHICS_STATE_H

#include <vector>
#include <agg_basics.h>
Expand Down Expand Up @@ -208,4 +208,4 @@ class GraphicsState
bool m_anti_aliased;
};

#endif // PYAGG_GRAPHICS_STATE_H
#endif // CELIAGG_GRAPHICS_STATE_H
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pyagg/image.h → celiagg/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_IMAGE_H
#define PYAGG_IMAGE_H
#ifndef CELIAGG_IMAGE_H
#define CELIAGG_IMAGE_H

#include <stdint.h>

Expand Down Expand Up @@ -252,4 +252,4 @@ class Image
unsigned width() const;
};

#endif // PYAGG_IMAGE_H
#endif // CELIAGG_IMAGE_H
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyagg/ndarray_canvas.pxi → celiagg/ndarray_canvas.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ cdef class CanvasBase:
fill: The Paint to use for fills
"""
IF not _ENABLE_TEXT_RENDERING:
msg = ("The pyagg library was compiled without font support! "
msg = ("The celiagg library was compiled without font support! "
"If you would like to render text, you will need to "
"reinstall the library.")
raise RuntimeError(msg)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions pyagg/paint.h → celiagg/paint.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_PAINT_H
#define PYAGG_PAINT_H
#ifndef CELIAGG_PAINT_H
#define CELIAGG_PAINT_H

#include <stdint.h>

Expand Down Expand Up @@ -198,4 +198,4 @@ class Paint

#include "paint.hxx"

#endif // PYAGG_PAINT_H
#endif // CELIAGG_PAINT_H
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions pyagg/setup.py → celiagg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"pre-made cpp file...")

# These are added to the environment by the main setup.py script
with_text_rendering = os.environ.get('PYAGG_TEXT_RENDERING', '0') == '1'
with_pkgconfig = os.environ.get('PYAGG_USE_PKGCONFIG', '0') == '1'
with_text_rendering = os.environ.get('CELIAGG_TEXT_RENDERING', '0') == '1'
with_pkgconfig = os.environ.get('CELIAGG_USE_PKGCONFIG', '0') == '1'


def get_freetype_info():
Expand Down Expand Up @@ -120,9 +120,9 @@ def configuration(parent_package='', top_path=None):
'agg-svn/agg-2.4/src/agg_vpgen_segmentator.cpp',
]
base_path = op.abspath(op.dirname(__file__))
pyagg_cython_source = op.join(base_path, '_pyagg.pyx')
pyagg_sources = ['font.cpp', 'glyph_iter.cpp', 'image.cpp', 'paint.cpp',
'vertex_source.cpp', '_pyagg.cpp']
celiagg_cython_source = op.join(base_path, '_celiagg.pyx')
celiagg_sources = ['font.cpp', 'glyph_iter.cpp', 'image.cpp', 'paint.cpp',
'vertex_source.cpp', '_celiagg.cpp']

include_dirs = ['agg-svn/agg-2.4/include',
'agg-svn/agg-2.4',
Expand Down Expand Up @@ -157,17 +157,17 @@ def configuration(parent_package='', top_path=None):
}

# Installing from an SDIST is special...
cpp_pyagg = op.join('pyagg', '_pyagg.cpp')
pyx_pyagg = op.join('pyagg', '_pyagg.pyx')
is_sdist = op.exists(cpp_pyagg) and not op.exists(pyx_pyagg)
cpp_celiagg = op.join('celiagg', '_celiagg.cpp')
pyx_celiagg = op.join('celiagg', '_celiagg.pyx')
is_sdist = op.exists(cpp_celiagg) and not op.exists(pyx_celiagg)

# Run Cython first if this is a development version
if not is_sdist and cythonize is not None:
cythonize(pyagg_cython_source, language='c++',
cythonize(celiagg_cython_source, language='c++',
compile_time_env=cython_compile_env)

config = Configuration('pyagg', parent_package, top_path)
config.add_extension('_pyagg', sources=pyagg_sources + sources,
config = Configuration('celiagg', parent_package, top_path)
config.add_extension('_celiagg', sources=celiagg_sources + sources,
**ext_kwargs)
config.add_subpackage('tests')
return config
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
from numpy.testing import assert_equal

import pyagg as agg
import celiagg as agg


def test_cleanup():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nose.tools import assert_raises
import numpy as np

import pyagg as agg
import celiagg as agg


def test_no_text_font_failure():
Expand Down
4 changes: 2 additions & 2 deletions pyagg/tests/test_paint.py → celiagg/tests/test_paint.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pyagg import (GradientSpread, GradientUnits, SolidPaint,
LinearGradientPaint, RadialGradientPaint)
from celiagg import (GradientSpread, GradientUnits, SolidPaint,
LinearGradientPaint, RadialGradientPaint)

_GRADIENT_STOPS = ((0.0, 1.0, 0.0, 0.0, 1.0),
(0.5, 1.0, 1.0, 1.0, 1.0),
Expand Down
2 changes: 1 addition & 1 deletion pyagg/tests/test_path.py → celiagg/tests/test_path.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nose.tools import assert_raises
import numpy as np

from pyagg import Path, ShapeAtPoints
from celiagg import Path, ShapeAtPoints


def test_sap_bad_init_args():
Expand Down
4 changes: 2 additions & 2 deletions pyagg/tests/test_state.py → celiagg/tests/test_state.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from nose.tools import assert_raises
import numpy as np

from pyagg import (GraphicsState, BlendMode, DrawingMode, Image, InnerJoin,
LineCap, LineJoin, PixelFormat, Rect, TextDrawingMode)
from celiagg import (GraphicsState, BlendMode, DrawingMode, Image, InnerJoin,
LineCap, LineJoin, PixelFormat, Rect, TextDrawingMode)


def array_bases_equal(arr0, arr1):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from numpy.testing import assert_allclose

from pyagg import Transform
from celiagg import Transform


def test_construction():
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pyagg/vertex_source.h → celiagg/vertex_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//
// Authors: John Wiggins

#ifndef PYAGG_VERTEX_SOURCE_H
#define PYAGG_VERTEX_SOURCE_H
#ifndef CELIAGG_VERTEX_SOURCE_H
#define CELIAGG_VERTEX_SOURCE_H

#include <math.h>
#include <agg_path_storage.h>
Expand Down Expand Up @@ -136,4 +136,4 @@ class RepeatedSource : public VertexSource
const RepeatedSource& operator=(const RepeatedSource&);
};

#endif // PYAGG_VERTEX_SOURCE_H
#endif // CELIAGG_VERTEX_SOURCE_H
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/python_logo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from skimage.io import imsave

import pyagg as agg
import celiagg as agg


top = agg.Path()
Expand Down
2 changes: 1 addition & 1 deletion examples/stencil.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from skimage.io import imsave

import pyagg as agg
import celiagg as agg

SIZE = 1000

Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
# Disable text rendering with this option
if '--no-text-rendering' in sys.argv:
del sys.argv[sys.argv.index('--no-text-rendering')]
os.environ['PYAGG_TEXT_RENDERING'] = '0'
os.environ['CELIAGG_TEXT_RENDERING'] = '0'
else:
os.environ['PYAGG_TEXT_RENDERING'] = '1'
os.environ['PYAGG_USE_PKGCONFIG'] = '1'
os.environ['CELIAGG_TEXT_RENDERING'] = '1'
os.environ['CELIAGG_USE_PKGCONFIG'] = '1'
if '--no-freetype-pkg-config' in sys.argv:
del sys.argv[sys.argv.index('--no-freetype-pkg-config')]
os.environ['PYAGG_USE_PKGCONFIG'] = '0'
os.environ['CELIAGG_USE_PKGCONFIG'] = '0'


def configuration(parent_package='', top_path=None):
Expand All @@ -48,11 +48,11 @@ def configuration(parent_package='', top_path=None):
delegate_options_to_subpackages=True,
quiet=True)

config.add_subpackage('pyagg')
config.add_subpackage('celiagg')
return config

setup(
name='pyagg',
name='celiagg',
configuration=configuration,
license='MIT',
version='0.1.0',
Expand All @@ -73,5 +73,5 @@ def configuration(parent_package='', top_path=None):
'Operating System :: MacOS',
],
requires=['numpy', 'freetype'],
packages=['pyagg', 'pyagg.tests']
packages=['celiagg', 'celiagg.tests']
)

0 comments on commit 493faeb

Please sign in to comment.