From ba7d845b255e8095c72978e91b2c014675ef55d6 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 2 Oct 2024 15:14:56 -0700 Subject: [PATCH] Fix incorrect error message for opto stimulus site (#524) --- CHANGELOG.md | 2 ++ src/nwbinspector/checks/_ogen.py | 2 +- tests/unit_tests/test_ogen.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cc861849..4f053b8bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ * Swapped setup approach to the modern `pyproject.toml` standard. [#507](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/507) * Added complete annotation typing and integrated Mypy into pre-commit. [#520](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/520) +### Fixes +* Fixed incorrect error message for OptogeneticStimulusSite. [#524](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/524) # v0.5.2 diff --git a/src/nwbinspector/checks/_ogen.py b/src/nwbinspector/checks/_ogen.py index 27e8a08cd..7981bd653 100644 --- a/src/nwbinspector/checks/_ogen.py +++ b/src/nwbinspector/checks/_ogen.py @@ -16,4 +16,4 @@ def check_optogenetic_stimulus_site_has_optogenetic_series( if obj.site == ogen_site: return None - return InspectorMessage(message="OptogeneticStimulusSite is not referenced by any OptogeneticStimulusSite.") + return InspectorMessage(message="OptogeneticStimulusSite is not referenced by any OptogeneticSeries.") diff --git a/tests/unit_tests/test_ogen.py b/tests/unit_tests/test_ogen.py index 70563ffe5..42979e34b 100644 --- a/tests/unit_tests/test_ogen.py +++ b/tests/unit_tests/test_ogen.py @@ -39,5 +39,5 @@ def test_check_pass(self): def test_check_triggered(self): assert ( check_optogenetic_stimulus_site_has_optogenetic_series(self.ogen_site).message - == "OptogeneticStimulusSite is not referenced by any OptogeneticStimulusSite." + == "OptogeneticStimulusSite is not referenced by any OptogeneticSeries." )