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

#86 upgrade requirements #87

Merged
merged 4 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kben eens bij bram gaan horen. Nieuwe servers zijn weliswaar 3.8, maar omdat er nog steeds bestaande servers zijn die 3.6 draaien zouden we hier best ook op 3.6 blijven testen nog een tijdje, zoals oe-utils.

In de praktijk draaien we 3.7 niet, dus als we travis load willen verkleinen zouden we wel 3.7 kunnen skippen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aie, rdflib vereist python 3,7+. Dan moet die terug downgegrade worden, tenzij python op de bestaande servers omhoog mag.
Fyi, support voor python 3.6 eindigt op 23 Dec, dus misschien wel een goeie reden om dat uit te voeren ineens

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDFlib 6.0.0 is een vrij grote change, die heeft ook ingebakken support voor JSON/LD. Ik zou die voor skosprovider_getty en skosprovider_rdf liever eens apart aangepakt zien worden, kan zijn dat dat nog meer gevolgen zal hebben.

Dus, nu liefst houden op de laatste versie in de 5.x.x reeks en compatibiliteit met Python 3.6 behouden.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lijn 5 kan weg en 6 kan hoger.

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
Loading