diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 80e876a58..8b1d006fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: # hooks: # - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.2 + rev: v0.9.6 hooks: - id: ruff # - repo: https://github.com/econchick/interrogate @@ -26,7 +26,7 @@ repos: # hooks: # - id: interrogate - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell additional_dependencies: diff --git a/CHANGELOG.md b/CHANGELOG.md index 34da87402..0b213652a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - Removed `requirements-min.txt` in favor of the `min-reqs` optional dependency group in `pyproject.toml`. @rly [#1246](https://github.com/hdmf-dev/hdmf/pull/1246) - Updated GitHub actions and ruff configuration. @rly [#1246](https://github.com/hdmf-dev/hdmf/pull/1246) +- `hdmf.monitor` is unused and undocumented. It has been deprecated and will be removed in HDMF 5.0. @rly [#1245](https://github.com/hdmf-dev/hdmf/pull/1245) ## HDMF 4.0.0 (January 22, 2025) diff --git a/src/hdmf/monitor.py b/src/hdmf/monitor.py index 823ccf72d..9f8e7e0cc 100644 --- a/src/hdmf/monitor.py +++ b/src/hdmf/monitor.py @@ -1,8 +1,16 @@ from abc import ABCMeta, abstractmethod +import warnings from .data_utils import AbstractDataChunkIterator, DataChunkIterator, DataChunk from .utils import docval, getargs +warnings.warn( + "The hdmf.monitor module is deprecated and will be removed in HDMF 5.0. If you are using this module, " + "please copy this module to your codebase or raise an issue in the HDMF repository: " + "https://github.com/hdmf-dev/hdmf/issues", + DeprecationWarning, +) + class NotYetExhausted(Exception): pass diff --git a/tests/unit/test_monitor.py b/tests/unit/test_monitor.py new file mode 100644 index 000000000..f9af06a9c --- /dev/null +++ b/tests/unit/test_monitor.py @@ -0,0 +1,6 @@ +import pytest + + +def test_deprecation_warning(): + with pytest.warns(DeprecationWarning): + import hdmf.monitor # noqa: F401