From 951f6d85cb90ae3055ce31704943dde7d455bc1a Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:49:45 -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 7190009e5..44ad4aa5c 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. Please specify at least one.") + return InspectorMessage(message="Subject is missing age and date_of_birth. Please specify at least one of these fields.") 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 f15789ac5..bf0619c8b 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. Please specify at least one.", + message="Subject is missing age and date_of_birth. Please specify at least one of these fields.", importance=Importance.BEST_PRACTICE_SUGGESTION, check_function_name="check_subject_age", object_type="Subject",