Skip to content

Commit

Permalink
Merge pull request #87 from OnroerendErfgoed/feature/86_upgrade_requi…
Browse files Browse the repository at this point in the history
…rements

#86 upgrade requirements
  • Loading branch information
goessebr committed Dec 14, 2021
2 parents 702fb0d + 4dd70aa commit eeee01f
Show file tree
Hide file tree
Showing 14 changed files with 207 additions and 208 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sudo: false
language: python
python:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
install:
- pip install -U setuptools
- pip install -r requirements.txt #fix versions
Expand Down
17 changes: 8 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# skosprovider_getty documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 19 10:30:09 2014.
Expand Down Expand Up @@ -49,8 +48,8 @@
master_doc = 'index'

# General information about the project.
project = u'skosprovider_getty'
copyright = u'2014-2020, Flanders Heritage Agency'
project = 'skosprovider_getty'
copyright = '2014-2020, Flanders Heritage Agency'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -202,8 +201,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'skosprovider_getty.tex', u'skosprovider\\_getty Documentation',
u'Flanders Heritage Agency', 'manual'),
('index', 'skosprovider_getty.tex', 'skosprovider\\_getty Documentation',
'Flanders Heritage Agency', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -232,8 +231,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'skosprovider_getty', u'skosprovider_getty Documentation',
[u'Flanders Heritage Agency'], 1)
('index', 'skosprovider_getty', 'skosprovider_getty Documentation',
['Flanders Heritage Agency'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -246,8 +245,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'skosprovider_getty', u'skosprovider_getty Documentation',
u'Flanders Heritage Agency', 'skosprovider_getty', 'One line description of project.',
('index', 'skosprovider_getty', 'skosprovider_getty Documentation',
'Flanders Heritage Agency', 'skosprovider_getty', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
15 changes: 7 additions & 8 deletions examples/churches.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script demonstrates using the AATProvider to get the concept of
Churches.
Expand All @@ -9,20 +8,20 @@

aat = AATProvider(metadata={'id': 'AAT'})

churches = aat.get_by_id(300007466)
churches = aat.get_by_id('300007466')

lang = ['en', 'nl', 'es', 'de', 'fr']
langs = ['en', 'nl', 'es', 'de', 'fr']

print('Label per language')
print('------------------')
for l in lang:
label = churches.label(l)
print(l + ' --> ' + label.language + ': ' + label.label + ' [' + label.type + ']')
for lang in langs:
label = churches.label(lang)
print(lang + ' --> ' + label.language + ': ' + label.label + ' [' + label.type + ']')

print('All Labels')
print('----------')
for l in churches.labels:
print(l.language + ': ' + l.label + ' [' + l.type + ']')
for lang in churches.labels:
print(lang.language + ': ' + lang.label + ' [' + lang.type + ']')

print('All Notes')
print('---------')
Expand Down
1 change: 0 additions & 1 deletion examples/collect_subclasses.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script demonstrates retrieving subclasses for a certain class.
'''
Expand Down
3 changes: 1 addition & 2 deletions examples/expand.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script demonstrates using the AATProvider to expand a collection
'''
Expand All @@ -11,4 +10,4 @@
print('Results')
print('------')
for result in results:
print(result)
print(result)
13 changes: 9 additions & 4 deletions examples/find.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script demonstrates using the AATProvider to find the concepts that are a member of a collection with 'church' in their label
This script demonstrates using the AATProvider to find the concepts that are a member of
a collection with 'church' in their label
'''

from skosprovider_getty.providers import AATProvider

results = AATProvider({'id': 'AAT', 'default_language': 'nl'}).find({'label': 'church', 'type': 'concept', 'collection': {'id': '300007466', 'depth': 'all'}})
results = AATProvider({'id': 'AAT', 'default_language': 'nl'}).find(
{
'label': 'church',
'type': 'concept',
'collection': {'id': '300007466', 'depth': 'all'}
}
)

print('Results')
print('------')
for result in results:
print(result)

13 changes: 6 additions & 7 deletions examples/flanders.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script demonstrates using the TGNProvider to get the concept of
Flanders.
Expand All @@ -11,18 +10,18 @@

flanders = aat.get_by_id(7018236)

lang = ['en', 'nl', 'es', 'de', 'fr']
langs = ['en', 'nl', 'es', 'de', 'fr']

print('Label per language')
print('------------------')
for l in lang:
label = flanders.label(l)
print(l + ' --> ' + label.language + ': ' + label.label + ' [' + label.type + ']')
for lang in langs:
label = flanders.label(lang)
print(lang + ' --> ' + label.language + ': ' + label.label + ' [' + label.type + ']')

print('Labels')
print('------')
for l in flanders.labels:
print(l.language + ': ' + l.label + ' [' + l.type + ']')
for lang in flanders.labels:
print(lang.language + ': ' + lang.label + ' [' + lang.type + ']')

print('Notes')
print('-----')
Expand Down
10 changes: 4 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
--requirement requirements.txt

# Testing
pytest==4.6.9 ; python_version < '3.0'
pytest==5.3.5 ; python_version >= '3.0'
pytest-cov==2.8.1
coveralls==1.11.1
pytest==6.2.5
pytest-cov==3.0.0
coveralls==3.3.1

# Documentation
Sphinx==1.8.5 ; python_version < '3.5'
Sphinx==3.0.4 ; python_version >= '3.5'
Sphinx==4.3.0
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests==2.24.0
skosprovider==0.7.1
requests==2.26.0
skosprovider==1.1.0
#-e git+https://github.com/koenedaele/skosprovider.git@DEV_0.7.0#egg=skosprovider
rdflib==5.0.0
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os

try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
from setuptools import setup

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
Expand Down

0 comments on commit eeee01f

Please sign in to comment.