Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 0.6.0 #65

Merged
merged 38 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
626203d
Start dev on 0.6
koenedaele Sep 4, 2017
fa1f360
Drop support for python 3.3
koenedaele Sep 4, 2017
8cedb54
Merge branch 'master' into DEV_0.6.0
koenedaele Sep 15, 2017
d1a382d
Merge branch 'master' into DEV_0.6.0
koenedaele Nov 19, 2017
ef73a43
Merge branch 'master' into DEV_0.6.0
koenedaele Nov 19, 2017
9586543
Merge branch 'master' into DEV_0.6.0
koenedaele Jun 12, 2019
3833288
Update requirements.
koenedaele Jun 12, 2019
4092fa6
First draft of infer_concept_relations. Refs #53
koenedaele Jul 1, 2019
5ddeccd
Update requirements and fix tests.
koenedaele Jul 2, 2019
7839b43
Merge branch 'DEV_0.6.0' into 53_infer_concept_relatons
koenedaele Jul 2, 2019
036928e
Update postgresql travis config.
koenedaele Jul 3, 2019
fe7aade
Merge branch 'DEV_0.6.0' into 53_infer_concept_relatons
koenedaele Jul 3, 2019
f4d9ed0
Work on infer_concept_relations. Refs #53
koenedaele Jul 3, 2019
74e6762
Fix failing tests. Refs #53
koenedaele Jul 4, 2019
7d4fb82
Pin correct dep.
koenedaele Jul 4, 2019
f6f906b
Update tests. Refs #53
koenedaele Jul 9, 2019
7a315a9
Extra unit test. Refs #53
koenedaele Jul 9, 2019
d146643
Remove unneeded code. Refs #53
koenedaele Jul 9, 2019
127042a
Increase coverage. Refs #53
koenedaele Jul 29, 2019
c6dc478
Update history
koenedaele Jul 29, 2019
40b177f
53 infer concept relatons (#55)
koenedaele Jul 29, 2019
eb17d00
Update dependencies.
koenedaele Aug 20, 2019
a49d070
Add ability to find matches. Refs #57
koenedaele Oct 4, 2019
a0459da
Update Python versions. Refs #62
koenedaele Oct 4, 2019
35fd6ad
Remove the session decorator. Refs #64
koenedaele Oct 4, 2019
7acbdc6
Add allowed_instance_scopes. Refs #64
koenedaele Dec 3, 2019
4179f51
Remove official compatibility for python 3.5
koenedaele Mar 18, 2020
83e22be
Update dependencies.
koenedaele Mar 18, 2020
049a105
Fix wrong dependency.
koenedaele Mar 18, 2020
034e24d
Fix wrong dependency.
koenedaele Mar 18, 2020
fff6fc1
Fix docstring.
koenedaele May 24, 2020
cfd6767
Remove superfluous tests.
koenedaele May 24, 2020
92d57b8
Update test.
koenedaele May 24, 2020
11e42ad
Improve performance of get_conceptscheme. Refs #71 (#72)
koenedaele May 25, 2020
021b4eb
Fix querying a collection with depth all. Closes #76 (#77)
koenedaele Jul 29, 2020
6a350ae
Update dependencies to latest versions.
koenedaele Jul 29, 2020
11f944b
Dependency fix.
koenedaele Jul 29, 2020
db43c87
Update History for release.
koenedaele Jul 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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='[email protected]',
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