Skip to content

Commit

Permalink
Merge pull request #196 from oarepo/edtf_import
Browse files Browse the repository at this point in the history
edtf import fix
  • Loading branch information
Alzpeta authored Jul 3, 2023
2 parents 44f0e5f + 4394c2f commit 2729524
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions oarepo_model_builder/datatypes/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class EDTFDataType(BaseDateDataType):
"imports": [
{"import": "oarepo_runtime.validation.CachedMultilayerEDTFValidator"},
{"import": "edtf.Date", "alias": "EDTFDate"},
{"import": "marshmallow_utils.fields.TrimmedString"},

],
}
mapping = {
Expand All @@ -110,6 +112,8 @@ class EDTFIntervalType(BaseDateDataType):
"imports": [
{"import": "oarepo_runtime.validation.CachedMultilayerEDTFValidator"},
{"import": "edtf.Interval", "alias": "EDTFInterval"},
{"import": "marshmallow_utils.fields.TrimmedString"},

],
}
mapping = {
Expand Down
2 changes: 1 addition & 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.21
version = 4.0.22
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
Expand Down
1 change: 1 addition & 0 deletions tests/test_builder_from_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_include_invenio():
data = builder.filesystem.open(
os.path.join("test", "services", "records", "schema.py")
).read()

assert (
strip_whitespaces(
"""
Expand Down

0 comments on commit 2729524

Please sign in to comment.