Skip to content

Commit 6930b67

Browse files
authored
Merge pull request #89 from GenomicDataInfrastructure/dcat-2.2.0
feat: integrate Health DCAT file on top of DCAT-AP 3 profile
2 parents 373465c + c3819c4 commit 6930b67

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
# The CKAN version tag of the Solr and Postgres containers should match
1515
# the one of the container the tests run on.
1616
# You can switch this base image with a custom image tailored to your project
17-
image: openknowledge/ckan-dev:2.10
17+
image: ckan/ckan-dev:2.11-py3.10
18+
options: --user root
1819
services:
1920
solr:
2021
image: ckan/ckan-solr:2.11-solr9
@@ -42,15 +43,16 @@ jobs:
4243
pip install -r requirements.txt
4344
pip install -r dev-requirements.txt
4445
pip install --upgrade pytest-rerunfailures
45-
pip install -e 'git+https://github.com/CivityNL/[email protected]#egg=ckanext-scheming[requirements]'
46+
pip install -e 'git+https://github.com/CivityNL/[email protected]-1#egg=ckanext-scheming[requirements]'
4647
pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-harvest[requirements]'
47-
pip install -e 'git+https://github.com/ckan/ckanext-dcat.git@v2.1.0#egg=ckanext-dcat[requirements]'
48-
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v2.1.0/requirements.txt
48+
pip install -e 'git+https://github.com/ckan/ckanext-dcat.git@v2.2.0#egg=ckanext-dcat[requirements]'
49+
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v2.2.0/requirements.txt
4950
python3 setup.py develop
5051
- name: Setup extension
5152
run: |
5253
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
5354
ckan -c test.ini db init
55+
ckan -c test.ini db pending-migrations --apply
5456
- name: Run tests
5557
run: |
5658
pytest --ckan-ini=test.ini --cov=ckanext.fairdatapoint --disable-warnings ckanext/fairdatapoint

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ otherwise run:
115115
```commandline
116116
pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-scheming[requirements]'
117117
pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-harvest[requirements]'
118-
pip install -e 'git+https://github.com/ckan/ckanext-dcat.git@v2.1.0#egg=ckanext-dcat'
119-
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v2.1.0/requirements.txt
118+
pip install -e 'git+https://github.com/ckan/ckanext-dcat.git@v2.2.0#egg=ckanext-dcat'
119+
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v2.2.0/requirements.txt
120120
```
121121

122122
## Tests

ckanext/fairdatapoint/profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from dateutil.parser import ParserError
1717
from rdflib import DCAT, DCTERMS, FOAF, Namespace, URIRef
1818

19-
from ckanext.dcat.profiles import EuropeanDCATAP3Profile
19+
from ckanext.dcat.profiles import EuropeanHealthDCATAPProfile
2020
from ckanext.fairdatapoint.labels import PACKAGE_REPLACE_FIELDS
2121

2222
log = logging.getLogger(__name__)
@@ -56,7 +56,7 @@ def validate_tags(values_list: List[Dict]) -> List:
5656
return tags
5757

5858

59-
class FAIRDataPointDCATAPProfile(EuropeanDCATAP3Profile):
59+
class FAIRDataPointDCATAPProfile(EuropeanHealthDCATAPProfile):
6060
"""
6161
An RDF profile for FAIR data points
6262
"""

ckanext/fairdatapoint/tests/test_processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_fdp_record_converter_dataset_dict(self):
5353
license_id="", identifier="27866022694497978",
5454
has_version=[
5555
"https://repo.metadatacenter.org/template-instances/2836bf1c-76e9-44e7-a65e-80e9ca63025a"],
56-
contact=[{'email': '', 'identifier': 'https://orcid.org/0000-0002-4348-707X', 'name': 'N.K. De Vries','uri': ''}
56+
contact=[{'email': '', 'identifier': 'https://orcid.org/0000-0002-4348-707X', 'name': 'N.K. De Vries','uri': '', 'url': ''}
5757
], creator=[{'email': '', 'identifier': '', 'name': '', 'type': '', 'uri': 'https://orcid.org/0000-0002-0180-3636', 'url': ''}],
5858
publisher=[{'email': '','identifier': '','name': '','type': '','uri': 'https://opal.health-ri.nl/pub', 'url': ''}],
5959
temporal_start='2020-01-01', temporal_end='2025-12-31')

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# SPDX-License-Identifier: AGPL-3.0-only
44

55
rdflib~=7.1.0
6-
six~=1.16.0
76
setuptools~=70.3.0
87
nose~=1.3.7
98
requests~=2.32.3

test.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ smtp_server = localhost
99
error_email_from = ckan@localhost
1010

1111
[app:main]
12-
scheming.dataset_schemas = ckanext.dcat.schemas:dcat_ap_full.yaml ckanext.fairdatapoint:tests/test_data/scheming/schemas/gdi_userportal.yaml
12+
scheming.dataset_schemas = ckanext.dcat.schemas:health_dcat_ap.yaml ckanext.fairdatapoint:tests/test_data/scheming/schemas/gdi_userportal.yaml
1313
scheming.presets = ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml ckanext.fairdatapoint:tests/test_data/scheming/presets/gdi_presets.yaml
1414
scheming.dataset_fallback = false
1515
use = config:../../src/ckan/test-core.ini
1616

1717
# Insert any custom config settings to be used when running your extension's
1818
# tests here. These will override the one defined in CKAN core's test-core.ini
1919
ckan.plugins = dcat scheming_datasets fairdatapoint
20-
ckanext.dcat.rdf.profiles = euro_dcat_ap_3 euro_dcat_ap_scheming fairdatapoint_dcat_ap
20+
ckanext.dcat.rdf.profiles = euro_health_dcat_ap euro_dcat_ap_3 euro_dcat_ap_scheming fairdatapoint_dcat_ap
2121

2222
# Logging configuration
2323
[loggers]

0 commit comments

Comments
 (0)