Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Oct 26, 2023
1 parent 738dcff commit 1d9de87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nwbinspector/checks/nwbfile_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def check_doi_publications(nwbfile: NWBFile):
def check_subject_age(subject: Subject):
"""Check if the Subject age is in ISO 8601 or our extension of it for ranges."""
if subject.age is None and subject.date_of_birth is None:
return InspectorMessage(message="Subject is missing age or date_of_birth.")
return InspectorMessage(message="Subject is missing age or date_of_birth. Please specify at least one.")
elif subject.age is None and subject.date_of_birth is not None:
return
if re.fullmatch(pattern=duration_regex, string=subject.age):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_nwbfile_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def test_pass_check_subject_age_with_dob():
def test_check_subject_age_missing():
subject = Subject(subject_id="001")
assert check_subject_age(subject) == InspectorMessage(
message="Subject is missing age or date_of_birth.",
message="Subject is missing age or date_of_birth. Please specify at least one.",
importance=Importance.BEST_PRACTICE_SUGGESTION,
check_function_name="check_subject_age",
object_type="Subject",
Expand Down

0 comments on commit 1d9de87

Please sign in to comment.