Skip to content

Commit

Permalink
format: fixed formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatimah committed Jan 29, 2024
1 parent cd38e8c commit 4491ebb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
10 changes: 6 additions & 4 deletions site/zenodo_rdm/custom_fields/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
THESIS_NAMESPACE,
)

from .domain_fields import BIODIV_FIELDS, AUDIOVIS_FIELDS,\
BIODIVERSITY_FIELDS_UI, AUDIOVIS_FIELDS_UI
from .domain_fields import (
AUDIOVIS_FIELDS,
AUDIOVIS_FIELDS_UI,
BIODIV_FIELDS,
BIODIVERSITY_FIELDS_UI,
)
from .legacy import LEGACY_CUSTOM_FIELDS
from .publishing import PUBLISHING_FIELDS_UI

Expand All @@ -58,7 +62,6 @@
CUSTOM_FIELDS = [
*BIODIV_FIELDS,
*AUDIOVIS_FIELDS,

# codemeta,
*CODEMETA_CUSTOM_FIELDS,
# TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
Expand All @@ -75,7 +78,6 @@
]



# hide meeting section from Additional details in landing page
MEETING_CUSTOM_FIELDS_UI["hide_from_landing_page"] = True

Expand Down
12 changes: 3 additions & 9 deletions site/zenodo_rdm/custom_fields/domain_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def field(self):

BIODIV_FIELDS = [
# dwc

KeywordCF(name="dwc:basisOfRecord", multiple=True),
KeywordCF(name="dwc:catalogNumber", multiple=True),
KeywordCF(name="dwc:class", multiple=True),
Expand Down Expand Up @@ -119,11 +118,7 @@ def field(self):
dict(
field="dwc:basisOfRecord",
ui_widget="MultiInput",
props=dict(
label=_("Basis of record"),
type="text",
multiple_values=True
),
props=dict(label=_("Basis of record"), type="text", multiple_values=True),
),
dict(
field="dwc:catalogNumber",
Expand Down Expand Up @@ -185,8 +180,7 @@ def field(self):
field="dwc:eventDate",
ui_widget="MultiInput",
props=dict(
label=_("Event date"),
description=_("Insert date in YYYY-MM-DD format")
label=_("Event date"), description=_("Insert date in YYYY-MM-DD format")
),
),
dict(
Expand Down Expand Up @@ -461,7 +455,7 @@ def field(self):
label=_("Resource creation technique"),
note="""Information about technical aspects of the creation and
digitization process of the resource. This includes modification
steps (\"retouching\") after the initial resource capture."""
steps (\"retouching\") after the initial resource capture.""",
),
),
dict(
Expand Down
7 changes: 2 additions & 5 deletions site/zenodo_rdm/custom_fields/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
# under the terms of the MIT License; see LICENSE file for more details.

"""Custom fields."""
from invenio_records_resources.services.custom_fields import (
BaseCF,
KeywordCF,
)
from invenio_records_resources.services.custom_fields import BaseCF, KeywordCF
from marshmallow import fields
from marshmallow_utils.fields import SanitizedUnicode

Expand Down Expand Up @@ -47,4 +44,4 @@ def field(self):
KeywordCF(name="legacy:communities", multiple=True),
SubjectListCF(name="legacy:subjects"),
]
"""Legacy compatibility custom fields."""
"""Legacy compatibility custom fields."""
22 changes: 11 additions & 11 deletions site/zenodo_rdm/custom_fields/publishing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
)

PUBLISHING_FIELDS_UI = {
"section": _("Publishing information"),
"hide_from_landing_page": True, # hide meeting section from Additional details in landing page
"fields": [
# journal
*JOURNAL_CUSTOM_FIELDS_UI["fields"],
# imprint
*IMPRINT_CUSTOM_FIELDS_UI["fields"],
# thesis
*THESIS_CUSTOM_FIELDS_UI["fields"],
],
}
"section": _("Publishing information"),
"hide_from_landing_page": True, # hide meeting section from Additional details in landing page
"fields": [
# journal
*JOURNAL_CUSTOM_FIELDS_UI["fields"],
# imprint
*IMPRINT_CUSTOM_FIELDS_UI["fields"],
# thesis
*THESIS_CUSTOM_FIELDS_UI["fields"],
],
}

0 comments on commit 4491ebb

Please sign in to comment.