Skip to content

Commit

Permalink
Use single scheming.presets config
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Oct 24, 2024
1 parent f13c196 commit 5f091a2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_multilingual.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml ckanext.fluent:presets.json",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down
16 changes: 0 additions & 16 deletions ckanext/dcat/tests/profiles/dcat_ap_2/test_scheming_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down Expand Up @@ -608,10 +604,6 @@ def test_dcat_date(self):
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down Expand Up @@ -640,10 +632,6 @@ def test_mimetype_is_guessed(self):
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down Expand Up @@ -844,10 +832,6 @@ def test_statement_literal(self):
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config("ckanext.dcat.rdf.profiles", "euro_dcat_ap_3")
class TestSchemingParseSupport(BaseParseTest):
def test_e2e_dcat_to_ckan(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class TestEuroDCATAP3ProfileSerializeDataset(BaseSerializeTest):
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config("ckanext.dcat.rdf.profiles", "euro_dcat_ap_3")
def test_e2e_ckan_to_dcat(self):
"""
Expand Down
16 changes: 0 additions & 16 deletions ckanext/dcat/tests/shacl/test_shacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ def _results_count(results_graph):
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand All @@ -75,10 +71,6 @@ def test_validate_dcat_ap_2_graph_shapes():
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down Expand Up @@ -129,10 +121,6 @@ def test_validate_dcat_ap_2_legacy_graph_shapes_recommended():
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config(
"ckanext.dcat.rdf.profiles", "euro_dcat_ap_2 euro_dcat_ap_scheming"
)
Expand Down Expand Up @@ -169,10 +157,6 @@ def test_validate_dcat_ap_2_graph_shapes_range():
@pytest.mark.ckan_config(
"scheming.dataset_schemas", "ckanext.dcat.schemas:dcat_ap_full.yaml"
)
@pytest.mark.ckan_config(
"scheming.presets",
"ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml",
)
@pytest.mark.ckan_config("ckanext.dcat.rdf.profiles", "euro_dcat_ap_3")
def test_validate_dcat_ap_3_graph():

Expand Down
4 changes: 4 additions & 0 deletions test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ ckanext.dcat.enable_content_negotiation=True
ckan.activity_streams_enabled = false
ckan.harvest.mq.type = redis

# Needed here because of https://github.com/ckan/ckanext-scheming/issues/424
scheming.presets = ckanext.scheming:presets.json ckanext.dcat.schemas:presets.yaml ckanext.fluent:presets.json


# Logging configuration
[loggers]
keys = root, ckan, sqlalchemy
Expand Down

0 comments on commit 5f091a2

Please sign in to comment.