Skip to content

Commit

Permalink
Merge branch 'release/0.32.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
xrotwang committed Apr 7, 2015
2 parents 88c8409 + a06d1da commit bd4a362
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGES.rst
Expand Up @@ -2,6 +2,13 @@
Changes
-------

0.32.1
~~~~~~

- bugfix: reduce license icon size to play well with the default footer.
- limit sqlalchemy to < 1.0 until tested for productive use.


0.32
~~~~

Expand Down
2 changes: 1 addition & 1 deletion clld/__init__.py
Expand Up @@ -5,7 +5,7 @@
from clld import interfaces


__version__ = "0.32"
__version__ = "0.32.1"


class Resource(namedtuple('Resource', 'name model interface with_index with_rdfdump')):
Expand Down
22 changes: 7 additions & 15 deletions clld/db/meta.py
Expand Up @@ -10,17 +10,8 @@
Column, Integer, Float, String, Boolean, DateTime, func, event)
from sqlalchemy.exc import DisconnectionError
from sqlalchemy.pool import Pool
from sqlalchemy.ext.declarative import (
declarative_base,
declared_attr,
)
from sqlalchemy.orm import (
scoped_session,
sessionmaker,
object_mapper,
deferred,
undefer,
)
from sqlalchemy.ext.declarative import declarative_base, declared_attr
from sqlalchemy.orm import scoped_session, sessionmaker, deferred, undefer
from sqlalchemy.types import TypeDecorator, VARCHAR
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
from sqlalchemy.orm.query import Query
Expand Down Expand Up @@ -135,11 +126,12 @@ class CsvMixin(object):
#: base name of the csv file
__csv_name__ = None

def csv_head(self):
@classmethod
def csv_head(cls):
"""return List of column names."""
exclude = {'active', 'version', 'created', 'updated', 'polymorphic_type'}
cols = sorted(
col.key for om in object_mapper(self).iterate_to_root()
col.key for om in inspect(cls).iterate_to_root()
for col in om.local_table.c
if col.key not in exclude and not exclude.add(col.key))
return cols
Expand Down Expand Up @@ -318,7 +310,7 @@ def __json__(self, req):
"""
exclude = {'active', 'version', 'created', 'updated', 'polymorphic_type'}
cols = [
col.key for om in object_mapper(self).iterate_to_root()
col.key for om in inspect(self).mapper.iterate_to_root()
for col in om.local_table.c
if col.key not in exclude and not exclude.add(col.key)]
return {col: format_json(getattr(self, col)) for col in cols}
Expand Down Expand Up @@ -358,7 +350,7 @@ def __solr__(self, req):
if value:
res[attr] = value
suffix_map = [(text_type, '_t'), (bool, '_b'), (int, '_i'), (float, '_f')]
for om in object_mapper(self).iterate_to_root():
for om in inspect(self).mapper.iterate_to_root():
for col in om.local_table.c:
if col.key not in res and col.key != 'polymorphic_type':
value = getattr(self, col.key)
Expand Down
3 changes: 2 additions & 1 deletion clld/scripts/llod.py
Expand Up @@ -14,6 +14,7 @@

from clld.lib import rdf
from clld.util import jsonload, jsondump
from clld.db.util import page_query
from clld.db.meta import DBSession
from clld.db.models.common import Dataset
from clld.scripts.util import parsed_args
Expand Down Expand Up @@ -77,7 +78,7 @@ def llod_func(args): # pragma: no cover
except InvalidRequestError:
args.log.info('... skipping')
continue
for obj in q.order_by(rsc.model.pk):
for obj in page_query(q.order_by(rsc.model.pk), n=10000, verbose=True):
graph = get_graph(obj, args.env['request'], rsc.name)
count_triples += len(graph)
count_rsc += 1
Expand Down
Binary file modified clld/web/static/images/cc-by-nc-nd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified clld/web/static/images/cc-by-nc-sa.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified clld/web/static/images/cc-by-nc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified clld/web/static/images/cc-by-nd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified clld/web/static/images/cc-by-sa.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified clld/web/static/images/cc-zero.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -51,10 +51,10 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = '0.32'
release = '0.32.1'

# The short X.Y version.
version = '0.32'
version = '0.32.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -28,7 +28,7 @@
'pyramid>=1.5.1',
'pyramid_mako>=1.0',
'pyramid_tm',
'SQLAlchemy>=0.9.8',
'SQLAlchemy>=0.9.8,<=0.9.9',
'PasteDeploy>=1.5.0', # py3 compat
'waitress',
'purl>=0.5',
Expand Down Expand Up @@ -81,7 +81,7 @@
]

setup(name='clld',
version='0.32',
version='0.32.1',
description=(
'Python library supporting the development of cross-linguistic databases'),
long_description=README + '\n\n' + CHANGES,
Expand Down

0 comments on commit bd4a362

Please sign in to comment.