Skip to content

Commit

Permalink
mechanical rename of repoze.catalog to hypatia
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Jun 13, 2012
1 parent d965904 commit 6bb04d4
Show file tree
Hide file tree
Showing 34 changed files with 226 additions and 231 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTORS.txt
Expand Up @@ -104,3 +104,6 @@ Contributors
------------

- Tres Seaver, 2011/02/22

- Chris McDonough, 2012/06/13

2 changes: 1 addition & 1 deletion COPYRIGHT.txt
@@ -1,3 +1,3 @@
Copyright (c) 2008 Agendaless Consulting and Contributors.
Copyright (c) 2012 Agendaless Consulting and Contributors.
(http://www.agendaless.com), All Rights Reserved

11 changes: 3 additions & 8 deletions README.rst
@@ -1,11 +1,6 @@
================
repoze.catalog
================
Hypatia
=======

A Python indexing and searching system based on `zope.index`_.
A Python indexing and searching system.

.. _`zope.index`: http://pypi.python.org/pypi/zope.index

See the ``docs`` subdirectory for documentation or the `online docs
<http://docs.repoze.org/catalog/>`_.

File renamed without changes.
10 changes: 5 additions & 5 deletions repoze/catalog/catalog.py → hypatia/catalog.py
Expand Up @@ -4,8 +4,8 @@

from zope.interface import implements

from repoze.catalog.interfaces import ICatalog
from repoze.catalog.interfaces import ICatalogIndex
from .interfaces import ICatalog
from .interfaces import ICatalogIndex

class Catalog(PersistentMapping):

Expand Down Expand Up @@ -47,7 +47,7 @@ def reindex_doc(self, docid, obj):

def __setitem__(self, name, index):
""" Add an object which implements
``repoze.catalog.interfaces.ICatalogIndex`` to the catalog.
``hypatia.interfaces.ICatalogIndex`` to the catalog.
No other type of object may be added to a catalog."""
if not ICatalogIndex.providedBy(index):
raise ValueError('%s does not provide ICatalogIndex')
Expand All @@ -61,7 +61,7 @@ def search(self, **query):
.. note::
this method is deprecated as of :mod:`repoze.catalog`
version 0.8. Use :meth:`repoze.catalog.Catalog.query`
version 0.8. Use :meth:`hypatia.Catalog.query`
instead.
Expand Down Expand Up @@ -146,7 +146,7 @@ def query(self, queryobject, sort_index=None, limit=None, sort_type=None,
""" Use the arguments to perform a query. Return a tuple of
(num, resultseq)."""
try:
from repoze.catalog.query import parse_query
from .query import parse_query
if isinstance(queryobject, basestring):
queryobject = parse_query(queryobject)
except ImportError: #pragma NO COVERAGE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions repoze/catalog/indexes/facet.py → hypatia/indexes/facet.py
Expand Up @@ -6,8 +6,8 @@
from persistent import Persistent
from zope.interface import implements

from repoze.catalog.indexes.keyword import CatalogKeywordIndex
from repoze.catalog.interfaces import ICatalogIndex
from .keyword import CatalogKeywordIndex
from ..interfaces import ICatalogIndex

_marker = ()

Expand Down
6 changes: 3 additions & 3 deletions repoze/catalog/indexes/field.py → hypatia/indexes/field.py
Expand Up @@ -6,9 +6,9 @@

from zope.index.field import FieldIndex

from repoze.catalog.interfaces import ICatalogIndex
from repoze.catalog.indexes.common import CatalogIndex
from repoze.catalog import RangeValue
from ..interfaces import ICatalogIndex
from .common import CatalogIndex
from .. import RangeValue

_marker = []

Expand Down
Expand Up @@ -2,8 +2,8 @@

from zope.index.keyword import KeywordIndex

from repoze.catalog.interfaces import ICatalogIndex
from repoze.catalog.indexes.common import CatalogIndex
from ..interfaces import ICatalogIndex
from .common import CatalogIndex


class CatalogKeywordIndex(CatalogIndex, KeywordIndex):
Expand Down
4 changes: 2 additions & 2 deletions repoze/catalog/indexes/path.py → hypatia/indexes/path.py
Expand Up @@ -5,8 +5,8 @@

from BTrees.Length import Length

from repoze.catalog.interfaces import ICatalogIndex
from repoze.catalog.indexes.common import CatalogIndex
from ..interfaces import ICatalogIndex
from .common import CatalogIndex

_marker = ()

Expand Down
6 changes: 3 additions & 3 deletions repoze/catalog/indexes/path2.py → hypatia/indexes/path2.py
Expand Up @@ -2,8 +2,8 @@

import BTrees

from repoze.catalog.interfaces import ICatalogIndex
from repoze.catalog.indexes.common import CatalogIndex
from ..interfaces import ICatalogIndex
from .common import CatalogIndex

_marker = object()

Expand All @@ -19,7 +19,7 @@ class CatalogPathIndex2(CatalogIndex): #pragma NO COVERAGE
limited by depth) of a certain path.
This index differs from the original
``repoze.catalog.indexes.path.CatalogPath`` index inasmuch as it
``hypatia.indexes.path.CatalogPath`` index inasmuch as it
actually retains a graph representation of the objects in the path
space instead of relying on 'level' information; query results
relying on this level information may or may not be correct for
Expand Down
File renamed without changes.
Expand Up @@ -2,7 +2,7 @@

class TestCatalogIndex(unittest.TestCase):
def _getTargetClass(self):
from repoze.catalog.indexes.common import CatalogIndex
from ..common import CatalogIndex
return CatalogIndex

def test_ctor(self):
Expand Down Expand Up @@ -197,7 +197,7 @@ class Test(klass, DummyIndex):
self.assertEqual(set(index.docids()), set([1, 2, 3, 4]))


from repoze.catalog.interfaces import ICatalogIndex
from ...interfaces import ICatalogIndex
from zope.interface import implements


Expand Down
Expand Up @@ -22,7 +22,7 @@

class TestCatalogFacetIndex(unittest.TestCase):
def _getTargetClass(self):
from repoze.catalog.indexes.facet import CatalogFacetIndex
from ..facet import CatalogFacetIndex
return CatalogFacetIndex

def _makeOne(self, discriminator=None, facets=FACETS, family=_marker):
Expand All @@ -43,12 +43,12 @@ def _populateIndex(self, idx):

def test_class_conforms_to_ICatalogIndex(self):
from zope.interface.verify import verifyClass
from repoze.catalog.interfaces import ICatalogIndex
from ...interfaces import ICatalogIndex
verifyClass(ICatalogIndex, self._getTargetClass())

def test_instance_conforms_to_ICatalogIndex(self):
from zope.interface.verify import verifyObject
from repoze.catalog.interfaces import ICatalogIndex
from ...interfaces import ICatalogIndex
verifyObject(ICatalogIndex, self._makeOne())

def test_ctor_defaults(self):
Expand Down

0 comments on commit 6bb04d4

Please sign in to comment.