Skip to content

Commit

Permalink
Trappl/be 491 model builder oai section component (#274)
Browse files Browse the repository at this point in the history
* add new builtin component

* add that component to setup

* bump version

* add oai section component test to doi
  • Loading branch information
jurajtrappl authored Oct 16, 2024
1 parent 2f310f6 commit dda850d
Showing 3 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions oarepo_model_builder/builtin_models/oaipmh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"service-config": {
"extend:components": [
"{{oarepo_oaipmh_harvester.components.OaiSectionComponent}}"
]
}
}


3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-model-builder
version = 4.0.92
version = 4.0.93
description = A utility library that generates OARepo required data model files from a JSON specification file
authors = Miroslav Bauer <[email protected]>, Miroslav Simek <[email protected]>
readme = README.md
@@ -94,6 +94,7 @@ oarepo_model_builder.datatypes.components =
oarepo.models =
invenio = oarepo_model_builder.builtin_models:invenio.json
doi = oarepo_model_builder.builtin_models:doi.json
oaipmh = oarepo_model_builder.builtin_models:oaipmh.json

# outputs are generic, profile independent
oarepo_model_builder.outputs =
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ def test_include_invenio():

"record": {
"module": {"qualified": "test"},
OAREPO_USE: ["invenio", "doi"],
OAREPO_USE: ["invenio", "doi", "oaipmh"],
"properties": {"a": {"type": "keyword", "required": True}},
},
},
@@ -36,4 +36,4 @@ def test_include_invenio():
os.path.join("test", "services", "records", "config.py")
).read()
data = str(data)
assert "components=[*PermissionsPresetsConfigMixin.components,*InvenioRecordServiceConfig.components,DoiComponent]" in re.sub(r"\s", "", data)
assert "components=[*PermissionsPresetsConfigMixin.components,*InvenioRecordServiceConfig.components,DoiComponent,OaiSectionComponent]" in re.sub(r"\s", "", data)

0 comments on commit dda850d

Please sign in to comment.