From 1d9de873ac77780dbb5abb2a13ade82a1b3f1cab Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:33:57 -0400 Subject: [PATCH] Apply suggestions from code review --- src/nwbinspector/checks/nwbfile_metadata.py | 2 +- tests/unit_tests/test_nwbfile_metadata.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwbinspector/checks/nwbfile_metadata.py b/src/nwbinspector/checks/nwbfile_metadata.py index 1b9df2fb5..7190009e5 100644 --- a/src/nwbinspector/checks/nwbfile_metadata.py +++ b/src/nwbinspector/checks/nwbfile_metadata.py @@ -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): diff --git a/tests/unit_tests/test_nwbfile_metadata.py b/tests/unit_tests/test_nwbfile_metadata.py index a785934e9..f15789ac5 100644 --- a/tests/unit_tests/test_nwbfile_metadata.py +++ b/tests/unit_tests/test_nwbfile_metadata.py @@ -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",