Skip to content

Commit

Permalink
Remove is_shown_by validations against couchdb
Browse files Browse the repository at this point in the history
  • Loading branch information
amywieliczka committed Aug 30, 2024
1 parent 03689a8 commit f049cc4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
16 changes: 8 additions & 8 deletions metadata_mapper/mappers/flickr/flickr_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ def split_description(self):


class FlickrValidator(Validator):
def setup(self):
self.add_validatable_field(
field="is_shown_by",
validations=[
Validator.verify_type(str),
FlickrValidator.content_match_regex
]
)
# def setup(self):
# self.add_validatable_field(
# field="is_shown_by",
# validations=[
# Validator.verify_type(str),
# FlickrValidator.content_match_regex
# ]
# )

@staticmethod
def content_match_regex(validation_def: dict, rikolti_value: Any,
Expand Down
8 changes: 4 additions & 4 deletions metadata_mapper/mappers/nuxeo/nuxeo_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ def map_thumbnail_source(self):

class NuxeoValidator(Validator):
def setup(self):
self.add_validatable_field(field="is_shown_by", validations=[
NuxeoValidator.is_shown_by_validation,
Validator.verify_type(str)
])
# self.add_validatable_field(field="is_shown_by", validations=[
# NuxeoValidator.is_shown_by_validation,
# Validator.verify_type(str)
# ])

@staticmethod

Check failure on line 286 in metadata_mapper/mappers/nuxeo/nuxeo_mapper.py

View workflow job for this annotation

GitHub Actions / lint

Ruff

metadata_mapper/mappers/nuxeo/nuxeo_mapper.py:286:5: SyntaxError: Expected an indented block after function definition
def is_shown_by_validation(validation_def: dict,
Expand Down
14 changes: 7 additions & 7 deletions metadata_mapper/mappers/oai/cca_vault_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class CcaVaultValidator(Validator):

def setup(self):
self.add_validatable_fields([
{
"field": "is_shown_by",
"validations": [
CcaVaultValidator.str_match_ignore_url_protocol,
Validator.verify_type(str)
]
},
# {
# "field": "is_shown_by",
# "validations": [
# CcaVaultValidator.str_match_ignore_url_protocol,
# Validator.verify_type(str)
# ]
# },
{
"field": "source",
"validations": [CcaVaultValidator.source_content_match],
Expand Down
13 changes: 7 additions & 6 deletions metadata_mapper/mappers/oai/omeka_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ class OmekaValidator(Validator):

def setup(self):
self.add_validatable_fields([
# {
# "field": "is_shown_by",
# "validations": [
# OmekaValidator.match_signed_s3_url,
# Validator.verify_type(str)
# ]
# },
{
"field": "is_shown_by",
"validations": [
OmekaValidator.match_signed_s3_url,
Validator.verify_type(str)
]
}, {
"field": "contributor",
"validations": [OmekaValidator.contributor_match],
"level": ValidationLogLevel.WARNING
Expand Down

0 comments on commit f049cc4

Please sign in to comment.