Skip to content

Commit

Permalink
Merge pull request #65 from koenedaele/DEV_0.6.0
Browse files Browse the repository at this point in the history
Prepare 0.6.0 for release
  • Loading branch information
koenedaele committed Jul 29, 2020
2 parents f92d5ba + db43c87 commit 2289525
Show file tree
Hide file tree
Showing 15 changed files with 443 additions and 247 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
language: python
sudo: false
python:
- 2.7
- 3.4
- 3.5
- 3.6
- "2.7"
- "3.6"
- "3.7"
- "3.8"
services:
- postgresql
env:
- DB="sqlite" SAURL="sqlite:///:memory:"
- DB="postgres" SAURL="postgresql://postgres:postgres@localhost/skosprovider_sqlalchemy"
# - DB="mysql" SAURL="mysql://travis:@localhost/skosprovider_sqlalchemy"
install:
- pip install -r requirements-dev.txt
- python setup.py -q develop
before_script:
- "if [[ $DB = 'postgres' ]]; then psql -U postgres -c 'create database skosprovider_sqlalchemy'; fi"
- "if [[ $DB = 'mysql' ]]; then mysql -e 'create database skosprovider_sqlalchemy'; fi"
script:
- py.test --sqlalchemy_url $SAURL -v --cov skosprovider_sqlalchemy
after_success: coveralls
17 changes: 17 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
0.6.0 (2020-07-29)
------------------

* Update to the latest skosprovider version and implement the
`infer_concept_relations` attribute. (#53)
* Add the ability to query on matches in line with the latest
skosprovider version. (#57)
* Drop the session decorator that was added in 0.4.0 since it did not fix the
issue we wanted it to fix and it added a lot of overhead. A provider should
now be passed a :class:`sqlachemy.orm.session.Session` at startup, or a
callable that returns such a session. (#64)
* Improved performance of getting the concept_scheme by caching it. (#71)
* Make querying a collection with depth=all possible. Before the provider would
only provide the direct members of a collection. (#76)
* Drop support for Python 3.4 and 3.5. Add support for Python 3.7 and 3.8. This
is also the last version to support Python 2. (#62)

0.5.2 (2018-11-13)
------------------

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@

# General information about the project.
project = u'Skosprovider_sqlalchemy'
copyright = u'2013-2017, Koen Van Daele'
copyright = u'2013-2020, Koen Van Daele'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X(.Y version.
version = '0.5'
version = '0.6'
# The full version, including alpha/beta/rc tags.
release = '0.5.1'
release = '0.6.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
14 changes: 8 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
--requirement requirements.txt

# Postgresql database access
psycopg2==2.8.2
psycopg2==2.8.4

# Documentation
Sphinx==1.8.5
Sphinx==1.8.5 ; python_version < '3.5'
Sphinx==3.1.2 ; python_version >= '3.5'

# Testing
pytest==4.4.1
pytest-cov==2.6.1
coveralls==1.7.0
pytest==4.6.11 ; python_version < '3.0'
pytest==5.4.3 ; python_version >= '3.0'
pytest-cov==2.10.0
coveralls==1.11.1

# Linting
flake8==3.7.7
flake8==3.7.9
mccabe==0.6.1
pep8==1.7.1
pyflakes==2.1.1
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SQLAlchemy==1.3.3
skosprovider==0.6.1
#-e git+https://github.com/koenedaele/skosprovider.git#egg=skosprovider
SQLAlchemy==1.3.18
skosprovider==0.7.1
#-e git+https://github.com/koenedaele/skosprovider.git@DEV_0.7.0#egg=skosprovider
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
]

requires = [
'skosprovider>=0.6.0',
'skosprovider>=0.7.0',
'sqlalchemy',
]

setup(
name='skosprovider_sqlalchemy',
version='0.5.2',
version='0.6.0',
description='A sqlAlchemy implementation of skosprovider.',
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
author='Koen Van Daele',
author_email='koen_van_daele@telenet.be',
url='http://github.com/koenedaele/skosprovider_sqlalchemy',
Expand All @@ -39,9 +40,9 @@
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
test_suite='nose.collector',
entry_points="""\
Expand Down
15 changes: 9 additions & 6 deletions skosprovider_sqlalchemy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Integer,
Text,
String,
Boolean,
ForeignKey,
UniqueConstraint,
Table,
Expand Down Expand Up @@ -332,9 +333,7 @@ class Collection(Thing):
A collection as know by :term:`skosprovider:SKOS`.
'''

__mapper_args__ = {
'polymorphic_identity': 'collection'
}
infer_concept_relations = Column(Boolean, nullable=False, default=True)

members = relationship(
'Thing',
Expand All @@ -345,6 +344,10 @@ class Collection(Thing):
collection_class=set
)

__mapper_args__ = {
'polymorphic_identity': 'collection'
}


class ConceptScheme(Base):
'''
Expand Down Expand Up @@ -624,15 +627,15 @@ def label(labels=[], language='any', sortLabel=False):
Provide a label for a list of labels.
.. deprecated:: 0.5.0
Please use :func:`skosprovider.skos.label`. Starting with
`skosprovider 0.6.0`, the function can function on
Please use :func:`skosprovider.skos.label`. Starting with
`skosprovider 0.6.0`, the function can function on
:class:`skosprovider_sqlalchemy.models.Label` instances as well.
:param list labels: A list of :class:`labels <Label>`.
:param str language: The language for which a label should preferentially
be returned. This should be a valid IANA language tag.
:param boolean sortLabel: Should sortLabels be considered or not? If True,
sortLabels will be preferred over prefLabels. Bear in mind that these
sortLabels will be preferred over prefLabels. Bear in mind that these
are still language dependent. So, it's possible to have a different
sortLabel per language.
:rtype: A :class:`Label` or `None` if no label could be found.
Expand Down
Loading

0 comments on commit 2289525

Please sign in to comment.